Skip to content
Open
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
2 changes: 1 addition & 1 deletion wdio-android-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apt-get install nodejs -y

```sh { name=clone }
git clone https://github.com/saucelabs/visual-examples
cd visual-examples/wdio
cd visual-examples/wdio-android-app
```

- install npm dependencies:
Expand Down
4 changes: 2 additions & 2 deletions wdio-android-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"typescript": "^5.4.3"
},
"scripts": {
"sauce-visual": "FPS=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-check": "FPS=true VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual": "wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-check": "VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-emulator": "wdio run ./tests/configs/wdio.saucelabs.emulator.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-emulator-check": "VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.emulator.conf.ts --spec tests/specs/visual.spec.ts"
},
Expand Down
18 changes: 8 additions & 10 deletions wdio-android-app/tests/specs/visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('Android Native App', () => {
const prices = await App.productPrices;

await browser.sauceVisualCheck(`App Catalog`, {
captureDom: true,
regions: [
// Ignore any changes on the first image
{
Expand All @@ -44,19 +45,16 @@ describe('Android Native App', () => {
it('Captures only catalog content', async () => {
const catalogContent = await App.catalogContent;
await browser.sauceVisualCheck(`Catalog Fragment`, {
captureDom: true,
clipElement: catalogContent,
});
});

// NOTE: Full page screenshot for native apps is in beta stage
// some of the functionality may not work as expected (especially virtual devices, clipping, ignore regions)
if (!!process.env.FPS) {
it('Full Page - Check App Catalog', async () => {
await browser.sauceVisualCheck(`Full Page - App Catalog`, {
fullPage: {
scrollElement: $('//androidx.recyclerview.widget.RecyclerView')
}
});
it('Full Page - Check App Catalog', async () => {
await browser.sauceVisualCheck(`Full Page - App Catalog`, {
fullPage: {
scrollElement: $("//androidx.recyclerview.widget.RecyclerView"),
},
});
}
}).timeout(1000 * 60 * 6);
});
2 changes: 1 addition & 1 deletion wdio-ios-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ apt-get install nodejs -y

```sh { name=clone }
git clone https://github.com/saucelabs/visual-examples
cd visual-examples/wdio
cd visual-examples/wdio-ios-app
```

- install npm dependencies:
Expand Down
4 changes: 2 additions & 2 deletions wdio-ios-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"typescript": "^5.4.3"
},
"scripts": {
"sauce-visual": "FPS=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-check": "FPS=true VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual": "wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-check": "VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.mobile.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-simulator": "wdio run ./tests/configs/wdio.saucelabs.simulator.conf.ts --spec tests/specs/visual.spec.ts",
"sauce-visual-simulator-check": "VISUAL_CHECK=true wdio run ./tests/configs/wdio.saucelabs.simulator.conf.ts --spec tests/specs/visual.spec.ts"
},
Expand Down
20 changes: 7 additions & 13 deletions wdio-ios-app/tests/specs/visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,11 @@ describe('iOS Native App', () => {
});
});

// NOTE: Full page screenshot for native apps is in beta stage
// some of the functionality may not work as expected (especially virtual devices, clipping, ignore regions)
if (!!process.env.FPS) {
it('Full Page - Check App Catalog', async () => {
await browser.sauceVisualCheck(`Full Page - App Catalog`, {
fullPage: {
scrollElement: $('//XCUIElementTypeCollectionView')
}
});


}).timeout(4 * 60 * 1000); // scrolling on ios require more time
}
it('Full Page - Check App Catalog', async () => {
await browser.sauceVisualCheck(`Full Page - App Catalog`, {
fullPage: {
scrollElement: $("//XCUIElementTypeCollectionView"),
},
});
}).timeout(4 * 60 * 1000); // scrolling on ios require more time
});
Loading