mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
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:
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user