0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed redirect after saving member in "old" member screen

no issue

- changed the `replaceRoute` after saving to transition to the `member-old` route instead of `member` route
- updated tests to work with the old routes (for now)
This commit is contained in:
Kevin Ansfield 2020-05-22 10:50:12 +01:00
parent 7e7bca7ff0
commit 18a910d2ab
2 changed files with 4 additions and 4 deletions

View file

@ -101,7 +101,7 @@ export default Controller.extend({
yield member.save();
member.updateLabels();
// replace 'member.new' route with 'member' route
this.replaceRoute('member', member);
this.replaceRoute('member-old', member);
return member;
} catch (error) {

View file

@ -53,7 +53,7 @@ describe('Acceptance: Members', function () {
await click('[data-test-nav="members"]');
expect(currentURL()).to.equal('/members');
expect(currentRouteName()).to.equal('members.index');
expect(currentRouteName()).to.equal('members-old.index');
expect(find('[data-test-screen-title]')).to.have.text('Members');
});
@ -98,8 +98,8 @@ describe('Acceptance: Members', function () {
await click('[data-test-button="save"]');
// // extra timeout needed for Travis - sometimes it doesn't update
// // quick enough and an extra wait() call doesn't help
// extra timeout needed for Travis - sometimes it doesn't update
// quick enough and an extra wait() call doesn't help
await timeout(100);
await click('[data-test-link="members-back"]');