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

Fixed members acceptance test

- The `await wait()` worked in combination with correct assertions
This commit is contained in:
Nazar Gargol 2019-12-03 16:05:56 +07:00
parent 4bd4825902
commit 02fe1591e5

View file

@ -155,20 +155,12 @@ describe('Acceptance: Members', function () {
await click('[data-test-button="save"]'); await click('[data-test-button="save"]');
// extra timeout needed for FF on Linux - sometimes it doesn't update await wait();
// quick enough, especially on Travis, and an extra wait() call
// doesn't help
await timeout(200);
expect(find('.gh-member-basic-settings-form input[name="name"]').value, 'name has been preserved') expect(find('.gh-member-basic-settings-form input[name="name"]').value, 'name has been preserved')
.to.equal('New Name'); .to.equal('New Name');
expect(find('.gh-member-basic-settings-form input[name="email-disabled"]').disabled, 'makes sure email is disabled')
// disables email field after member has been created .to.equal(true);
// TODO: the commented out case should be valid, but it fails when run from headless
// expect(find('.gh-member-basic-settings-form input[name="email-disabled"]').disabled, 'makes sure email is disabled')
// .to.equal(true);
expect(find('.gh-member-basic-settings-form input[name="email"]').value, 'name has been preserved')
.to.equal('example@domain.com');
}); });
}); });
}); });