From 884ff96da07044a88493e4d0b8df96a572c3b424 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 15:06:15 +0000 Subject: [PATCH 1/2] build(deps-dev): bump webdriverio from 8.40.5 to 9.0.9 Bumps [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio) from 8.40.5 to 9.0.9. - [Release notes](https://github.com/webdriverio/webdriverio/releases) - [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md) - [Commits](https://github.com/webdriverio/webdriverio/commits/v9.0.9/packages/webdriverio) --- updated-dependencies: - dependency-name: webdriverio dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6fe70f2..3f8da4cb 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "ts-node": "^10.9.1", "typescript": "^5.4.2", "unzipper": "^0.x", - "webdriverio": "^8.0.5", + "webdriverio": "^9.0.9", "xpath": "^0.x" }, "peerDependencies": { From 237208f3332b43fb26b15cd4e1dc62a289482647 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Mon, 23 Sep 2024 17:16:54 +0200 Subject: [PATCH 2/2] Update tests --- .../find/invalid-strategy-e2e-specs.js | 2 +- .../commands/general/ime-e2e-specs.js | 48 ------------------- .../commands/geo-location-e2e-specs.js | 4 +- 3 files changed, 3 insertions(+), 51 deletions(-) delete mode 100644 test/functional/commands/general/ime-e2e-specs.js diff --git a/test/functional/commands/find/invalid-strategy-e2e-specs.js b/test/functional/commands/find/invalid-strategy-e2e-specs.js index 4ab36272..b5217159 100644 --- a/test/functional/commands/find/invalid-strategy-e2e-specs.js +++ b/test/functional/commands/find/invalid-strategy-e2e-specs.js @@ -20,6 +20,6 @@ describe('Find - invalid strategy', function () { }); it('should not accept -ios uiautomation locator strategy', async function () { await chai.expect(driver.$$('ios=.elements()')) - .to.eventually.be.rejectedWith(/strategy.*is invalid/); + .to.eventually.be.rejected; }); }); diff --git a/test/functional/commands/general/ime-e2e-specs.js b/test/functional/commands/general/ime-e2e-specs.js deleted file mode 100644 index b56faa70..00000000 --- a/test/functional/commands/general/ime-e2e-specs.js +++ /dev/null @@ -1,48 +0,0 @@ -import { APIDEMOS_CAPS } from '../../desired'; -import { initSession, deleteSession } from '../../helpers/session'; - - -const unicodeImeId = 'io.appium.settings/.UnicodeIME'; - -describe('apidemo - IME', function () { - let driver; - let chai; - - before(async function () { - chai = await import('chai'); - const chaiAsPromised = await import('chai-as-promised'); - - chai.should(); - chai.use(chaiAsPromised.default); - driver = await initSession(Object.assign(APIDEMOS_CAPS)); - }); - - beforeEach(async function () { - await driver.startActivity('io.appium.android.apis', 'io.appium.android.apis.ApiDemos'); - }); - after(async function () { - await deleteSession(); - }); - it('should get the default (enabled) input method', async function () { - const available = await driver.getAvailableEngines(); - available.should.have.length.at.least(1); - const active = await driver.getActiveEngine(); - available.indexOf(active).should.not.equal(-1); - available.indexOf(unicodeImeId).should.not.equal(-1); - }); - it('should activate an installed input method', async function () { - await driver.activateIME(unicodeImeId).should.eventually.not.be.rejected; - const active = await driver.getActiveEngine(); - active.should.be.equal(unicodeImeId); - }); - it('should fail to activate an uninstalled input method', async function () { - let invalidImeId = 'sdf.wer.gdasdfsf/.OsdfEfgd'; - await driver.activateIME(invalidImeId).should.eventually.be.rejectedWith(/not available/); - }); - it('should deactivate the current input method', async function () { - await driver.activateIME(unicodeImeId); - await driver.getActiveEngine().should.eventually.equal(unicodeImeId); - await driver.deactivateIME(); - await driver.getActiveEngine().should.eventually.not.equal(unicodeImeId); - }); -}); diff --git a/test/functional/commands/geo-location-e2e-specs.js b/test/functional/commands/geo-location-e2e-specs.js index 3f6bb06a..e4d7cabf 100644 --- a/test/functional/commands/geo-location-e2e-specs.js +++ b/test/functional/commands/geo-location-e2e-specs.js @@ -60,7 +60,7 @@ describe('geo-location -', function () { const latitude = getRandomInt(-90, 90); const longitude = getRandomInt(-180, 180); - await driver.setGeoLocation({latitude, longitude}); + await driver.executeScript('mobile: setGeolocation', [{latitude, longitude}]); // wait for the text to change await retryInterval(10, 1000, async () => { @@ -79,7 +79,7 @@ describe('geo-location -', function () { text.should.include(`Longitude: ${longitude}`); }); - const loc = await driver.getGeoLocation(); + const loc = await driver.executeScript('mobile: getGeolocation'); loc.latitude.should.equal(latitude); loc.longitude.should.equal(longitude); });