Skip to content

Commit

Permalink
Merge pull request #695 from Kitware/upgrade-webdriver
Browse files Browse the repository at this point in the history
chore: upgrade webdriverio to v9
  • Loading branch information
floryst authored Jan 28, 2025
2 parents 20009fd + ab0e1f7 commit 186b19d
Show file tree
Hide file tree
Showing 9 changed files with 7,891 additions and 2,124 deletions.
9,980 changes: 7,877 additions & 2,103 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@sentry/vue": "^7.54.0",
"@velipso/polybool": "^2.0.11",
"@vueuse/core": "^10.7.0",
"@wdio/globals": "^9.7.1",
"core-js": "3.22.5",
"deep-equal": "^2.0.5",
"dicomweb-client-typed": "^0.8.6",
Expand Down Expand Up @@ -75,12 +76,12 @@
"@wdio/mocha-framework": "^8.32.3",
"@wdio/spec-reporter": "^8.32.2",
"@wdio/static-server-service": "^8.11.0",
"@wdio/visual-service": "^6.3.0",
"babel-eslint": "10.1.0",
"chai": "4.3.6",
"chai-almost": "^1.0.1",
"chai-as-promised": "7.1.1",
"chai-subset": "^1.6.0",
"chromedriver": "^124.0.1",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
Expand All @@ -89,7 +90,6 @@
"eslint-plugin-import": "2.26.0",
"eslint-plugin-vue": "^8.0.3",
"eslint-plugin-vuejs-accessibility": "^1.1.0",
"geckodriver": "^4.0.4",
"lint-staged": "10.5.4",
"patch-package": "^8.0.0",
"prettier": "2.8.8",
Expand All @@ -106,15 +106,10 @@
"vitepress": "^1.2.3",
"vitest": "^0.32.1",
"vue-tsc": "^1.8.8",
"wdio-chromedriver-service": "^8.1.1",
"wdio-cleanuptotal-service": "^1.0.7",
"wdio-edgedriver-service": "^3.0.2",
"wdio-geckodriver-service": "^5.0.1",
"wdio-html-nice-reporter": "^8.1.0",
"wdio-image-comparison-service": "^5.0.3",
"wdio-safaridriver-service": "^2.1.0",
"wdio-wait-for": "^3.0.4",
"webdriverio": "^8.32.3",
"webdriverio": "^9.7.1",
"yorkie": "^2.0.0"
},
"gitHooks": {
Expand Down
4 changes: 2 additions & 2 deletions tests/pageobjects/volview.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getId = () => {
};

export const setValueVueInput = async (
input: WebdriverIO.Element,
input: ChainablePromiseElement,
value: string
) => {
// input.setValue does not clear existing input, so click and backspace
Expand Down Expand Up @@ -51,7 +51,7 @@ class VolViewPage extends Page {
await browser.waitUntil(
async function viewsExist() {
const views = await this_.views;
if (views.length === 0) return false;
if ((await views.length) === 0) return false;
const inView = await Promise.all(
Array.from(views).map((v) => v.isDisplayedInViewport())
);
Expand Down
6 changes: 3 additions & 3 deletions tests/specs/layers.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ describe('Add Layer button', () => {
// Wait for both volumes to appear in list
await browser.waitUntil(
async () => {
const menus = await volViewPage.datasetMenuButtons;
return menus.length >= 2;
const menus = volViewPage.datasetMenuButtons;
return (await menus.length) >= 2;
},
{
timeout: DOWNLOAD_TIMEOUT,
Expand Down Expand Up @@ -56,7 +56,7 @@ describe('Add Layer button', () => {
await browser.waitUntil(
async function slidersExist() {
const layerOpacitySliders = await volViewPage.layerOpacitySliders;
return layerOpacitySliders.length > 0;
return (await layerOpacitySliders.length) > 0;
},
{
timeoutMsg: `Expected at least one layer opacity slider`,
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/sample-rendering.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('VolView', () => {
await AppPage.waitForViews();
await browser.pause(5000);

expect(
await expect(
await browser.checkElement(
await $('div[data-testid~="layout-grid"]'),
'prostate_sample_views'
Expand Down
6 changes: 3 additions & 3 deletions tests/specs/session-zip.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ const saveGetManifest = async () => {
return { session, manifest };
};

const getRectangleCount = async (view: WebdriverIO.Element) => {
const getRectangleCount = async (view: ChainablePromiseElement) => {
const rectangles = await view.$$(
'svg[data-testid="rectangle-tool-container"] > g'
);
return rectangles.length;
};

const waitForRectangleCount = async (
view: WebdriverIO.Element,
view: ChainablePromiseElement,
countTarget: number
) => {
await browser.waitUntil(
Expand All @@ -90,7 +90,7 @@ const waitForRectangleCount = async (
);
};

const clickTwice = async (view: WebdriverIO.Element) => {
const clickTwice = async (view: ChainablePromiseElement) => {
await view.waitForClickable();
const origin = view;
await browser
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@wdio/globals/types",
"expect-webdriverio",
"@wdio/mocha-framework",
"wdio-image-comparison-service"
"@wdio/visual-service"
],
"paths": {
"@/*": [
Expand Down
2 changes: 0 additions & 2 deletions wdio.chrome.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ config.capabilities = [
},
];

config.services?.push('chromedriver');

export { config };
2 changes: 1 addition & 1 deletion wdio.shared.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const config: Options.Testrunner = {
},
],
[
'image-comparison',
'visual',
{
baselineFolder: path.resolve(ROOT, 'tests/baseline/'),
formatImageName:
Expand Down

0 comments on commit 186b19d

Please sign in to comment.