mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Update src/tests/frontend/specs/ordered_list.js
Co-authored-by: Richard Hansen <rhansen@rhansen.org>
This commit is contained in:
parent
58604a0824
commit
d1c66123dd
1 changed files with 10 additions and 1 deletions
|
@ -37,7 +37,16 @@ describe('ordered_list.js', function () {
|
|||
const originalHTML = helper.padInner$('body').html();
|
||||
makeSureShortcutIsDisabled('cmdShiftN');
|
||||
triggerCtrlShiftShortcut('N');
|
||||
await helper.waitForPromise(() => helper.padInner$('body').html() === originalHTML);
|
||||
try {
|
||||
// The HTML should not change. Briefly wait for it to change and fail if it does change.
|
||||
await helper.waitForPromise(() => helper.padInner$('body').html() !== originalHTML, 500);
|
||||
} catch (err) {
|
||||
// We want the test to pass if the above wait timed out. (If it timed out that
|
||||
// means the HTML never changed, which is a good thing.)
|
||||
// TODO: Re-throw non-"condition never became true" errors to avoid false positives.
|
||||
}
|
||||
// This will fail if the above `waitForPromise()` succeeded.
|
||||
assert.equal(helper.padInner$('body').html(), originalHTML);
|
||||
});
|
||||
|
||||
it('does not insert unordered list', function (done) {
|
||||
|
|
Loading…
Reference in a new issue