@wix-pilot/webdriverio-appium 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@wix-pilot/core");
4
- const promptHandler_1 = require("../utils/promptHandler");
4
+ const prompt_handler_1 = require("@wix-pilot/prompt-handler");
5
5
  const index_1 = require("../index");
6
6
  describe("Example Test Suite", () => {
7
7
  let frameworkDriver;
8
8
  let pilot;
9
9
  before(async () => {
10
- const promptHandler = new promptHandler_1.PromptHandler();
10
+ const promptHandler = new prompt_handler_1.WixPromptHandler();
11
11
  frameworkDriver = new index_1.WebdriverIOAppiumFrameworkDriver();
12
12
  pilot = new core_1.Pilot({
13
13
  frameworkDriver,
@@ -13,7 +13,7 @@ async function waitForStableState(pollInterval = DEFAULT_POLL_INTERVAL, timeout
13
13
  const startTime = Date.now();
14
14
  let lastSnapshot;
15
15
  while (Date.now() - startTime < timeout) {
16
- const currentSnapshot = (await driver.getPageSource()) || "";
16
+ const currentSnapshot = (await getCleanPageSource()) || "";
17
17
  if (!currentSnapshot) {
18
18
  return undefined;
19
19
  }
@@ -29,6 +29,12 @@ async function waitForStableState(pollInterval = DEFAULT_POLL_INTERVAL, timeout
29
29
  // Return the last snapshot if timeout is reached
30
30
  return lastSnapshot;
31
31
  }
32
+ async function getCleanPageSource() {
33
+ const fullPageSource = await driver.getPageSource();
34
+ return fullPageSource
35
+ .replace(/\s+value="(?=[^"]{16,})[^"]*"/g, "")
36
+ .replace(/\s+label="(?=[^"]{16,})[^"]*"/g, "");
37
+ }
32
38
  function compareViewHierarchies(current, last) {
33
39
  // Use MD5 for fast comparison of view hierarchies
34
40
  const currentHash = crypto_1.default.createHash("md5").update(current).digest("hex");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix-pilot/webdriverio-appium",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "WebdriverIO and Appium driver for Wix Pilot usage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,8 +20,11 @@
20
20
  "test:example": "wdio run examples/wdio.conf.ts",
21
21
  "build:app": "cd ../detox/ExampleApp && npm run build:ios",
22
22
  "release:patch": "node ../../../scripts/release-package.js patch",
23
+ "release:patch:alpha": "node ../../../scripts/release-package.js patch --prerelease",
23
24
  "release:minor": "node ../../../scripts/release-package.js minor",
25
+ "release:minor:alpha": "node ../../../scripts/release-package.js minor --prerelease",
24
26
  "release:major": "node ../../../scripts/release-package.js major",
27
+ "release:major:alpha": "node ../../../scripts/release-package.js major --prerelease",
25
28
  "lint": "eslint . --ext .ts",
26
29
  "lint:fix": "eslint . --ext .ts --fix",
27
30
  "type-check": "tsc --noEmit"
@@ -31,20 +34,21 @@
31
34
  },
32
35
  "peerDependencies": {
33
36
  "@wdio/globals": ">=8.0.0",
34
- "@wix-pilot/core": "^3.1.6"
37
+ "@wix-pilot/core": "^3.3.4"
35
38
  },
36
39
  "devDependencies": {
37
- "@wdio/globals": "^9.9.1",
38
40
  "@wdio/appium-service": "^8.29.0",
39
41
  "@wdio/cli": "^9.9.1",
42
+ "@wdio/globals": "^9.9.1",
40
43
  "@wdio/local-runner": "^9.9.1",
41
44
  "@wdio/mocha-framework": "^9.9.0",
42
45
  "@wdio/spec-reporter": "^9.9.0",
43
46
  "@wdio/types": "^9.9.0",
44
47
  "appium": "^2.15.0",
45
- "appium-xcuitest-driver": "^8.3.1",
48
+ "appium-xcuitest-driver": "^8.4.3",
46
49
  "axios": "^1.7.9",
47
50
  "chai": "^5.2.0",
48
- "webdriverio": "^9.9.1"
51
+ "webdriverio": "^9.9.1",
52
+ "@wix-pilot/prompt-handler": "^0.1.0"
49
53
  }
50
54
  }
@@ -1,28 +0,0 @@
1
- export declare const config: {
2
- runner: string;
3
- specs: string[];
4
- maxInstances: number;
5
- capabilities: {
6
- platformName: string;
7
- deviceName: string;
8
- automationName: string;
9
- app: string;
10
- }[];
11
- logLevel: string;
12
- bail: number;
13
- baseUrl: string;
14
- waitforTimeout: number;
15
- connectionRetryTimeout: number;
16
- connectionRetryCount: number;
17
- services: string[];
18
- appium: {
19
- command: string;
20
- };
21
- framework: string;
22
- reporters: string[];
23
- mochaOpts: {
24
- ui: string;
25
- timeout: number;
26
- };
27
- before: () => void;
28
- };
package/dist/wdio.conf.js DELETED
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.config = void 0;
4
- // wdio.conf.ts
5
- exports.config = {
6
- runner: 'local',
7
- specs: ['./examples/**/*.test.ts'],
8
- maxInstances: 1,
9
- capabilities: [{
10
- platformName: 'iOS',
11
- deviceName: 'iPhone 14',
12
- automationName: 'XCUITest',
13
- app: './Users/tzviels/Library/Developer/Xcode/DerivedData/ExampleApp-ccggovixskkojadmtpriqiridvii/Build/Products/Debug-iphonesimulator/ExampleApp.app',
14
- }],
15
- logLevel: 'info',
16
- bail: 0,
17
- baseUrl: 'http://localhost',
18
- waitforTimeout: 10000,
19
- connectionRetryTimeout: 90000,
20
- connectionRetryCount: 3,
21
- services: ['appium'],
22
- appium: {
23
- command: 'appium',
24
- },
25
- framework: 'mocha',
26
- reporters: ['spec'],
27
- mochaOpts: {
28
- ui: 'bdd',
29
- timeout: 60000,
30
- },
31
- before: function () {
32
- global.driver = browser;
33
- },
34
- };