diff --git a/ghost/admin/app/components/gh-task-button.js b/ghost/admin/app/components/gh-task-button.js index bd2e8b776b..60c8940f95 100644 --- a/ghost/admin/app/components/gh-task-button.js +++ b/ghost/admin/app/components/gh-task-button.js @@ -35,7 +35,7 @@ const GhTaskButton = Component.extend({ idleClass: '', runningClass: '', showSuccess: true, // set to false if you want the spinner to show until a transition occurs - autoReset: false, // set to false if you want don't want task button to reset after timeout + autoReset: true, // set to false if you want don't want task button to reset after timeout successText: 'Saved', successClass: 'gh-btn-green', failureText: 'Retry', diff --git a/ghost/admin/tests/acceptance/staff-test.js b/ghost/admin/tests/acceptance/staff-test.js index 5306e19cb2..158a3abfd0 100644 --- a/ghost/admin/tests/acceptance/staff-test.js +++ b/ghost/admin/tests/acceptance/staff-test.js @@ -522,7 +522,12 @@ describe('Acceptance: Staff', function () { // Save changes await click('[data-test-save-button]'); - expect(find('[data-test-save-button]').textContent.trim(), 'save button text').to.equal('Saved'); + // Since we reset save status so there's no on-screen indication + // that we've had a save, check the request was fired instead + let [lastRequest] = this.server.pretender.handledRequests.slice(-1); + let params = JSON.parse(lastRequest.requestBody); + + expect(params.users[0].name).to.equal('Test User'); // CMD-S shortcut works await fillIn('[data-test-slug-input]', 'Test User'); @@ -532,10 +537,10 @@ describe('Acceptance: Staff', function () { ctrlKey: ctrlOrCmd === 'ctrl' }); - // we've already saved in this test so there's no on-screen indication - // that we've had another save, check the request was fired instead - let [lastRequest] = this.server.pretender.handledRequests.slice(-1); - let params = JSON.parse(lastRequest.requestBody); + // Since we reset save status so there's no on-screen indication + // that we've had a save, check the request was fired instead + [lastRequest] = this.server.pretender.handledRequests.slice(-1); + params = JSON.parse(lastRequest.requestBody); expect(params.users[0].name).to.equal('Test User');