Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions tests/specs/layers-and-rendering.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,28 @@ describe('Layers and Rendering', () => {
}
);

const menus = await volViewPage.datasetMenuButtons;
const menuCount = await menus.length;
if (menuCount < 2) {
throw new Error(
`Expected at least 2 dataset menu buttons, but found ${menuCount}`
);
}
await menus[1].click();
const inactiveMenuSelector =
'.volume-card:not(.volume-card-active) button[data-testid="dataset-menu-button"]';

await browser.waitUntil(
async () => {
const activeMenus = await $$(
'.volume-card-active button[data-testid="dataset-menu-button"]'
);
const inactiveMenus = await $$(inactiveMenuSelector);
return (
(await activeMenus.length) >= 1 && (await inactiveMenus.length) >= 1
);
},
{
timeout: DOWNLOAD_TIMEOUT,
timeoutMsg:
'Expected active and inactive datasets to be available for layering',
}
);

const inactiveMenus = await $$(inactiveMenuSelector);
await inactiveMenus[0].click();

await browser.waitUntil(
async () => {
Expand All @@ -62,7 +76,10 @@ describe('Layers and Rendering', () => {
);
return addLayerButton.isClickable();
},
{ timeoutMsg: 'Expected clickable Add Layer button' }
{
timeout: DOWNLOAD_TIMEOUT,
timeoutMsg: 'Expected clickable Add Layer button',
}
);

const addLayerButton = await $(
Expand Down
6 changes: 4 additions & 2 deletions wdio.shared.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const applyTestViewport = (browser: any) =>
export const TEST_PORT = 4567;
// for slow connections try:
// DOWNLOAD_TIMEOUT=60000 && npm run test:e2e:dev
export const DOWNLOAD_TIMEOUT = Number(process.env.DOWNLOAD_TIMEOUT ?? 20000);
export const DOWNLOAD_TIMEOUT = Number(process.env.DOWNLOAD_TIMEOUT ?? 30000);

const IS_CI = !!(process.env.CI || process.env.GITHUB_ACTIONS);

Expand All @@ -68,7 +68,9 @@ export const config: Options.Testrunner = {
// ============
// Capabilities
// ============
maxInstances: IS_CI ? 1 : 6,
// WebGL rendering is resource-intensive enough that six local Chrome
// instances can starve one another and exceed view-rendering timeouts.
maxInstances: IS_CI ? 1 : 3,
//
// ===================
// Test Configurations
Expand Down
Loading