Skip to content

Commit 69d25fe

Browse files
fix: fix multiple issues (#746)
* chore: update deps * fix: image process stalls - fix #745 * chore: fix android screenshot * chore: remove duplicate key * chore: small build fix * feat: export VisualServiceOptions - fixes #728 * chore: add changeset
1 parent e36077a commit 69d25fe

17 files changed

+417
-562
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"webdriver-image-comparison": patch
3+
"@wdio/visual-reporter": patch
4+
"@wdio/visual-service": patch
5+
"@wdio/ocr-service": patch
6+
---
7+
8+
Multiple fixes:
9+
10+
- update deps
11+
- fix #728: Missing Type Information in Service Configuration
12+
- fix #745: The image comparison process stalls when utilizing the checkElement method to compare screenshots of two different elements

package.json

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,41 @@
5454
"@wdio/ocr-service": "workspace:^",
5555
"webdriver-image-comparison": "workspace:^"
5656
},
57-
"pnpm": {
58-
"overrides": {
59-
"webdriver-image-comparison": "workspace:*"
60-
}
61-
},
6257
"devDependencies": {
63-
"@changesets/cli": "^2.27.11",
58+
"@changesets/cli": "^2.27.12",
6459
"@tsconfig/node20": "^20.1.4",
6560
"@types/eslint": "^9.6.1",
6661
"@types/jsdom": "~21.1.7",
6762
"@types/inquirer": "^9.0.7",
6863
"@types/node": "^22",
6964
"@types/xml2js": "~0.4.14",
70-
"@typescript-eslint/eslint-plugin": "^8.18.2",
71-
"@typescript-eslint/parser": "^8.18.2",
72-
"@typescript-eslint/utils": "^8.18.2",
65+
"@typescript-eslint/eslint-plugin": "^8.21.0",
66+
"@typescript-eslint/parser": "^8.21.0",
67+
"@typescript-eslint/utils": "^8.21.0",
7368
"@vitest/coverage-v8": "^2.1.8",
74-
"@wdio/appium-service": "^9.5.7",
75-
"@wdio/cli": "^9.5.1",
76-
"@wdio/globals": "^9.5.1",
77-
"wdio-lambdatest-service": "^3.0.3",
78-
"@wdio/local-runner": "^9.5.1",
79-
"@wdio/mocha-framework": "^9.5.0",
80-
"@wdio/sauce-service": "^9.4.5",
81-
"@wdio/shared-store-service": "^9.4.5",
82-
"@wdio/spec-reporter": "^9.5.0",
83-
"@wdio/types": "^9.5.0",
84-
"eslint": "^9.17.0",
69+
"@wdio/appium-service": "^9.7.1",
70+
"@wdio/cli": "^9.7.1",
71+
"@wdio/globals": "^9.7.1",
72+
"@wdio/local-runner": "^9.7.1",
73+
"@wdio/mocha-framework": "^9.6.4",
74+
"@wdio/sauce-service": "^9.7.1",
75+
"@wdio/shared-store-service": "^9.7.1",
76+
"@wdio/spec-reporter": "^9.6.3",
77+
"@wdio/types": "^9.6.3",
78+
"eslint": "^9.19.0",
8579
"eslint-plugin-import": "^2.31.0",
8680
"eslint-plugin-unicorn": "^56.0.1",
87-
"eslint-plugin-wdio": "^9.4.4",
81+
"eslint-plugin-wdio": "^9.6.0",
8882
"husky": "^9.1.7",
8983
"jsdom": "^25.0.1",
9084
"npm-run-all2": "^7.0.2",
9185
"release-it": "^17.11.0",
9286
"rimraf": "^6.0.1",
9387
"saucelabs": "^8.0.0",
9488
"ts-node": "^10.9.2",
95-
"typescript": "^5.7.2",
89+
"typescript": "^5.7.3",
9690
"vitest": "^2.1.8",
97-
"webdriverio": "^9.5.7"
91+
"webdriverio": "^9.7.1",
92+
"wdio-lambdatest-service": "^4.0.0"
9893
}
9994
}

packages/ocr-service/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"watch": "pnpm run build:tsc -w"
2929
},
3030
"dependencies": {
31-
"@wdio/globals": "^9.5.1",
31+
"@wdio/globals": "^9.7.1",
3232
"@wdio/logger": "^9.4.4",
33-
"@wdio/types": "^9.5.0",
33+
"@wdio/types": "^9.6.3",
3434
"fuse.js": "^7.0.0",
3535
"@inquirer/prompts": "7.2.3",
3636
"jimp": "^1.6.0",

packages/visual-reporter/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@
4141
"@remix-run/dev": "^2.15.2",
4242
"@types/react": "^18.3.18",
4343
"@types/react-dom": "^18.3.5",
44-
"@typescript-eslint/eslint-plugin": "^8.18.2",
45-
"@typescript-eslint/parser": "^8.18.2",
44+
"@typescript-eslint/eslint-plugin": "^8.21.0",
45+
"@typescript-eslint/parser": "^8.21.0",
4646
"autoprefixer": "^10.4.20",
47-
"eslint": "^9.17.0",
47+
"eslint": "^9.19.0",
4848
"eslint-import-resolver-typescript": "^3.7.0",
4949
"eslint-plugin-import": "^2.31.0",
5050
"eslint-plugin-jsx-a11y": "^6.10.2",
51-
"eslint-plugin-react": "^7.37.3",
51+
"eslint-plugin-react": "^7.37.4",
5252
"eslint-plugin-react-hooks": "^5.1.0",
5353
"isbot": "^5.1.21",
5454
"postcss": "^8.5.1",
5555
"react": "^18.3.1",
5656
"react-dom": "^18.3.1",
5757
"react-icons": "^5.4.0",
58-
"react-select": "^5.9.0",
58+
"react-select": "^5.10.0",
5959
"tailwindcss": "^3.4.17",
60-
"typescript": "^5.7.2",
61-
"vite": "^5.4.12",
60+
"typescript": "^5.7.3",
61+
"vite": "^5.4.14",
6262
"vite-tsconfig-paths": "^5.1.4"
6363
},
6464
"engines": {

packages/visual-service/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"watch": "pnpm run build:tsc -w"
2727
},
2828
"dependencies": {
29-
"@wdio/globals": "^9.5.1",
29+
"@wdio/globals": "^9.7.1",
3030
"@wdio/logger": "^9.4.4",
31-
"@wdio/types": "^9.5.0",
31+
"@wdio/types": "^9.6.3",
3232
"node-fetch": "^3.3.2",
3333
"webdriver-image-comparison": "^7.3.0"
3434
},

packages/visual-service/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import VisualLauncher from './storybook/launcher.js'
44
import type {
55
Output,
66
Result,
7+
VisualServiceOptions,
78
WdioCheckFullPageMethodOptions,
89
WdioSaveFullPageMethodOptions,
910
WdioSaveElementMethodOptions,
@@ -174,6 +175,7 @@ declare global {
174175
}
175176
}
176177
}
178+
export type { VisualServiceOptions }
177179

178180
export default WdioImageComparisonService
179181
export const launcher = VisualLauncher

packages/visual-service/src/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,6 @@ export function determineNativeContext(
319319
const isAutoWebviewFalse = !(
320320
capabilities['appium:autoWebview'] === true ||
321321
capabilities['appium:options']?.autoWebview === true ||
322-
// @ts-expect-error
323322
capabilities['lt:options']?.autoWebview === true
324323
)
325324

packages/webdriver-image-comparison/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
"watch:js": "node -e \"require('fs').watchFile('src/resemble/resemble.jimp.cjs', () => { require('child_process').exec('npm run copy-js'); });\""
2828
},
2929
"dependencies": {
30-
"fs-extra": "^11.2.0",
30+
"fs-extra": "^11.3.0",
3131
"jimp": "^1.6.0",
3232
"@wdio/logger": "^9.4.4"
3333
},
3434
"devDependencies": {
3535
"@types/copyfiles": "~2.4.4",
3636
"@types/fs-extra": "^11.0.4",
3737
"copyfiles": "^2.4.1",
38-
"webdriverio": "^9.5.7"
38+
"webdriverio": "^9.7.1"
3939
}
4040
}

packages/webdriver-image-comparison/src/resemble/resemble.jimp.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ const isNode = function () {
831831
// c = createCanvas(w, h);
832832
// context = c.getContext("2d");
833833
// context.putImageData(img, 0, 0);
834-
return img.contain(w, h)
834+
return img.contain({w, h})
835835
}
836836

837837
return img

0 commit comments

Comments
 (0)