adapt tests after switch to parallel runs (#547)

Some browser tests are now run in parallel. A few tests have become unreliable, and need a little love. Also, create and save mocha webdriver logs.
This commit is contained in:
Paul Fitzpatrick
2023-06-28 22:17:14 +01:00
committed by GitHub
parent 71bff10566
commit 01069a69b0
4 changed files with 23 additions and 6 deletions

View File

@@ -7,7 +7,6 @@ describe('ColumnOps.ntest', function() {
const cleanup = test.setupTestSuite(this);
before(async function() {
this.timeout(Math.max(this.timeout(), 30000)); // Long-running test, unfortunately
await gu.supportOldTimeyTestCode();
await gu.useFixtureDoc(cleanup, "World.grist", true);
await gu.toggleSidePanel('left', 'close');

View File

@@ -223,10 +223,10 @@ describe('CustomWidgetsConfig', function () {
constructor(public frameSelector = 'iframe') {}
// Wait for a frame.
public async waitForFrame() {
await driver.wait(() => driver.find(this.frameSelector).isPresent(), 1000);
await driver.wait(() => driver.find(this.frameSelector).isPresent(), 3000);
const iframe = driver.find(this.frameSelector);
await driver.switchTo().frame(iframe);
await driver.wait(async () => (await driver.find('#ready').getText()) === 'ready', 1000);
await driver.wait(async () => (await driver.find('#ready').getText()) === 'ready', 3000);
await driver.switchTo().defaultContent();
}
public async content() {
@@ -254,7 +254,7 @@ describe('CustomWidgetsConfig', function () {
}
// Wait for frame to close.
public async waitForClose() {
await driver.wait(async () => !(await driver.find(this.frameSelector).isPresent()), 1000);
await driver.wait(async () => !(await driver.find(this.frameSelector).isPresent()), 3000);
}
// Wait for the onOptions event, and return its value.
public async onOptions() {
@@ -262,7 +262,7 @@ describe('CustomWidgetsConfig', function () {
await driver.switchTo().frame(iframe);
// Wait for options to get filled, initially this div is empty,
// as first message it should get at least null as an options.
await driver.wait(async () => await driver.find('#onOptions').getText(), 1000);
await driver.wait(async () => await driver.find('#onOptions').getText(), 3000);
const text = await driver.find('#onOptions').getText();
await driver.switchTo().defaultContent();
return JSON.parse(text);

View File

@@ -53,7 +53,7 @@ async function applyPatchesToJquerylikeObject($) {
// Adapt common old setup.
const test = {
setupTestSuite(self, ...args) {
self.timeout(20000);
self.timeout(40000);
return setupTestSuite(...args);
},
};