Skip to content

Commit 91d3974

Browse files
webzwo0irhansen
authored andcommitted
adminsettings test: Be a little stricter for some assertions
1 parent cc6fda6 commit 91d3974

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tests/frontend/specs/adminsettings.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ describe('Admin > Settings', function () {
3838
// reset it to the old value
3939
helper.newAdmin('settings');
4040
await helper.waitForPromise(
41-
() => helper.admin$ && helper.admin$('.settings').val().length > 0, 20000);
41+
() => helper.admin$ &&
42+
helper.admin$('.settings').val().length === settingsLength + 11, 20000);
4243

4344
// replace the test value with a line break
4445
helper.admin$('.settings').val((_, text) => text.replace('/* test */\n', ''));
@@ -50,12 +51,11 @@ describe('Admin > Settings', function () {
5051
// settings should have the old value
5152
helper.newAdmin('settings');
5253
await helper.waitForPromise(
53-
() => helper.admin$ && helper.admin$('.settings').val().length > 0, 36000);
54-
expect(settings).to.be(helper.admin$('.settings').val());
54+
() => helper.admin$ && helper.admin$('.settings').val().length === settingsLength &&
55+
settings === helper.admin$('.settings').val(), 20000);
5556
});
5657

5758
it('restart works', async function () {
58-
this.timeout(60000);
5959
const getStartTime = async () => {
6060
try {
6161
const {httpStartTime} = await $.ajax({
@@ -66,6 +66,8 @@ describe('Admin > Settings', function () {
6666
});
6767
return httpStartTime;
6868
} catch (err) {
69+
document.getElementById('console').append(
70+
`an error occurred: ${err.message} of type ${err.name}\n`);
6971
return null;
7072
}
7173
};

0 commit comments

Comments
 (0)