Skip to content

Commit

Permalink
Merge pull request #526 from webdriverio/ws/update-deps
Browse files Browse the repository at this point in the history
fix: multiple things
  • Loading branch information
wswebcreation authored Jan 2, 2025
2 parents 3336b84 + 04a7a3a commit b0dea6c
Show file tree
Hide file tree
Showing 8 changed files with 3,301 additions and 4,133 deletions.
4 changes: 2 additions & 2 deletions config/wdio.android.app.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ export const config: WebdriverIO.Config = {

//
// NOTE: Change this name according to the Emulator you have created on your local machine
"appium:deviceName": "Pixel_7_Pro_Android_14_API_34",
"appium:deviceName": "Pixel_8_Pro_Android_15_API_35",
//
// NOTE: Change this version according to the Emulator you have created on your local machine
"appium:platformVersion": "14.0",
"appium:platformVersion": "15.0",
"appium:orientation": "PORTRAIT",
"appium:automationName": "UiAutomator2",
// The path to the app
Expand Down
4 changes: 2 additions & 2 deletions config/wdio.ios.app.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const config: WebdriverIO.Config = {

//
// NOTE: Change this name according to the Simulator you have created on your local machine
"appium:deviceName": isGhActions ? "iPhone 14" : "iPhone 15",
"appium:deviceName": "iPhone 16 Pro",
//
// NOTE: Change this version according to the Simulator Version you have created on your local machine
"appium:platformVersion": "17.2",
"appium:platformVersion": "18.2",
"appium:orientation": "PORTRAIT",
"appium:automationName": "XCUITest",
// The path to the app
Expand Down
7,357 changes: 3,260 additions & 4,097 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@
"lint": "eslint config tests"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"@wdio/appium-service": "^9.0.7",
"@wdio/browserstack-service": "^9.0.7",
"@wdio/cli": "^9.0.7",
"@wdio/cucumber-framework": "^9.0.6",
"@wdio/globals": "^9.0.7",
"@wdio/local-runner": "^9.0.7",
"@wdio/mocha-framework": "^9.0.6",
"@wdio/sauce-service": "^9.0.7",
"@wdio/spec-reporter": "^9.0.7",
"@wdio/testingbot-service": "^9.0.7",
"appium": "^2.11.3",
"appium-uiautomator2-driver": "^3.7.7",
"appium-xcuitest-driver": "7.24.17",
"eslint-plugin-wdio": "^9.0.5",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"@wdio/appium-service": "^9.5.0",
"@wdio/browserstack-service": "^9.5.0",
"@wdio/cli": "^9.5.0",
"@wdio/cucumber-framework": "^9.5.0",
"@wdio/globals": "^9.5.0",
"@wdio/local-runner": "^9.5.0",
"@wdio/mocha-framework": "^9.5.0",
"@wdio/sauce-service": "^9.5.0",
"@wdio/spec-reporter": "^9.5.0",
"@wdio/testingbot-service": "^9.5.0",
"appium": "^2.13.1",
"appium-uiautomator2-driver": "^3.9.6",
"appium-xcuitest-driver": "7.35.0",
"eslint-plugin-wdio": "^9.4.4",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.7.2"
}
}
4 changes: 2 additions & 2 deletions tests/helpers/Gestures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class Gestures {
percentage=0.99,
}:
{
scrollContainer:WebdriverIO.Element,
searchableElement:WebdriverIO.Element,
scrollContainer:WebdriverIO.Element | ChainablePromiseElement,
searchableElement:WebdriverIO.Element | ChainablePromiseElement,
maxScrolls:number,
amount?: number,
direction?: SwipeDirectionType,
Expand Down
2 changes: 1 addition & 1 deletion tests/screenobjects/AndroidSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class AndroidSettings {
// Android 14 might have notifications that might block searching the right element, so we need to close them
await this.closeSettingsScreenLockNotifications();
await this.waitAndTap('Device unlock');
await this.waitAndTap('.*Fingerprint Unlock');
await this.waitAndTap('.*Fingerprint.*Unlock');
} else {
await this.waitAndTap('.*Fingerprint.*');
}
Expand Down
25 changes: 15 additions & 10 deletions tests/specs/app.swipe.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,22 @@ describe('WebdriverIO and Appium, when using swiping', () => {
await expect(await Carousel.isCardActive(await Carousel.openSourceCard)).toBeTruthy();
});

it('should be able to swipe vertical by finding the surprise', async ()=>{
// Swipe vertical and try to find the element. You can only swipe a max of 5 times
await Gestures.checkIfDisplayedWithSwipe({
scrollContainer: await SwipeScreen.screen,
searchableElement: await SwipeScreen.logo,
maxScrolls: 5,
direction: DIRECTIONS.UP,
percentage: 0.99,
// There's an issue in the Android app with the carousel. You can't swipe up the screen when you starting point is on the carousel.
// For now we skip this test for Android

if (!driver.isAndroid) {
it('should be able to swipe vertical by finding the surprise', async () => {
// Swipe vertical and try to find the element. You can only swipe a max of 5 times
await Gestures.checkIfDisplayedWithSwipe({
scrollContainer: await SwipeScreen.screen,
searchableElement: await SwipeScreen.logo,
maxScrolls: 5,
direction: DIRECTIONS.UP,
percentage: 0.99,
});
await expect(SwipeScreen.logo).toBeDisplayed();
});
await expect(SwipeScreen.logo).toBeDisplayed();
});
}

// You will find native a native swipe example below, but it is commented out because even though it looks "simple",
// there are more details you need to know about:
Expand Down
4 changes: 2 additions & 2 deletions tests/specs/app.webview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("WebdriverIO and Appium, when interacting with a WebView,", () => {
(await $(".DocSearch-HitsFooter").getText()).includes("See all")
);
// Let's take the first result
await $("#docsearch-item-0 a").click();
await $("#docsearch-hits0-item-0 a").click();

// Now wait for the header to be displayed and verify that we are on the correct page
await $("h1").waitForDisplayed({ timeout: 3000 });
Expand Down Expand Up @@ -111,7 +111,7 @@ describe("WebdriverIO and Appium, when interacting with a WebView,", () => {
(await $(".DocSearch-HitsFooter").getText()).includes("See all")
);
// Let's take the first result
await $("#docsearch-item-0 a").click();
await $("#docsearch-hits0-item-0 a").click();

// Now wait for the header to be displayed and verify that we are on the correct page
await $("header h1").waitForDisplayed({ timeout: 3000 });
Expand Down

0 comments on commit b0dea6c

Please sign in to comment.