mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
tests/acceptance/editor: Restore clock early
This was never restored *after* the andThen() since that is async
This commit is contained in:
parent
d9552fa052
commit
7265d0ae67
1 changed files with 3 additions and 5 deletions
|
@ -426,6 +426,7 @@ describe('Acceptance: Editor', function() {
|
||||||
let compareDate = moment().tz('Etc/UTC').add(4, 'minutes').format('DD MMM YY @ HH:mm').toString();
|
let compareDate = moment().tz('Etc/UTC').add(4, 'minutes').format('DD MMM YY @ HH:mm').toString();
|
||||||
server.create('post', {published_at: moment.utc().add(4, 'minutes'), status: 'scheduled'});
|
server.create('post', {published_at: moment.utc().add(4, 'minutes'), status: 'scheduled'});
|
||||||
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
||||||
|
clock.restore();
|
||||||
|
|
||||||
visit('/editor/1');
|
visit('/editor/1');
|
||||||
|
|
||||||
|
@ -447,7 +448,6 @@ describe('Acceptance: Editor', function() {
|
||||||
expect(find('.gh-notification.gh-notification-schedule').text().trim(), 'notification countdown')
|
expect(find('.gh-notification.gh-notification-schedule').text().trim(), 'notification countdown')
|
||||||
.to.contain('Post will be published in');
|
.to.contain('Post will be published in');
|
||||||
});
|
});
|
||||||
clock.restore();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('only shows option to unschedule post 2 minutes before scheduled time', function () {
|
it('only shows option to unschedule post 2 minutes before scheduled time', function () {
|
||||||
|
@ -455,6 +455,7 @@ describe('Acceptance: Editor', function() {
|
||||||
let clock = sinon.useFakeTimers(moment().valueOf());
|
let clock = sinon.useFakeTimers(moment().valueOf());
|
||||||
server.create('post', {published_at: moment.utc().add(2, 'minutes'), status: 'scheduled'});
|
server.create('post', {published_at: moment.utc().add(2, 'minutes'), status: 'scheduled'});
|
||||||
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
||||||
|
clock.restore();
|
||||||
|
|
||||||
visit('/editor/1');
|
visit('/editor/1');
|
||||||
|
|
||||||
|
@ -469,8 +470,6 @@ describe('Acceptance: Editor', function() {
|
||||||
expect(find('.btn.btn-sm.dropdown-toggle').hasClass('active'), 'no dropdown menu')
|
expect(find('.btn.btn-sm.dropdown-toggle').hasClass('active'), 'no dropdown menu')
|
||||||
.to.be.false;
|
.to.be.false;
|
||||||
});
|
});
|
||||||
|
|
||||||
clock.restore();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it.skip('lets user unschedule the post shortly before scheduled date', function () {
|
it.skip('lets user unschedule the post shortly before scheduled date', function () {
|
||||||
|
@ -478,6 +477,7 @@ describe('Acceptance: Editor', function() {
|
||||||
let clock = sinon.useFakeTimers(moment().valueOf());
|
let clock = sinon.useFakeTimers(moment().valueOf());
|
||||||
server.create('post', {published_at: moment.utc().add(1, 'minute'), status: 'scheduled'});
|
server.create('post', {published_at: moment.utc().add(1, 'minute'), status: 'scheduled'});
|
||||||
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
server.create('setting', {activeTimezone: 'Europe/Dublin'});
|
||||||
|
clock.restore();
|
||||||
|
|
||||||
visit('/editor/1');
|
visit('/editor/1');
|
||||||
|
|
||||||
|
@ -512,8 +512,6 @@ describe('Acceptance: Editor', function() {
|
||||||
expect(find('.gh-notification.gh-notification-schedule').text().trim(), 'notification countdown')
|
expect(find('.gh-notification.gh-notification-schedule').text().trim(), 'notification countdown')
|
||||||
.to.equal('');
|
.to.equal('');
|
||||||
});
|
});
|
||||||
|
|
||||||
clock.restore();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue