mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-25 19:48:50 +03:00
Enabled auto reset state for action buttons
no issue - By default, action buttons had auto-reset off and reset had to be explicitly set - Auto reset for action buttons is on by default now, and any button that should not reset should explicitly switch it off
This commit is contained in:
parent
b7ee0839d5
commit
f198bb8a45
@ -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',
|
||||
|
@ -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');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user