-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add an example application for mobile pilot testing The app contains 3 screens: emoji game, colors game, assertions screen * feat & test: create Detox driver and add suitable tests - "Import" the driver from the Detox project - Add Detox id injection - Remove native matchers and clarify the importance of using "by id" - Add prompt handler to the package - Add Pilot tests for each screen * chore: code review changes * chore: migrate appium-driver * update package.lock * add example app script * apply lint * disable var rule * feat: add driver method for list item's * fix: increase connection timeout * update package.lock to be same as in master * revert changes to pods files * revert changes to vcs * revert * chore: remove global vars and update docs * apply lint * update package.json * chore: remove jest and use webdriverio expect * fix: chagne version selection for wedio/globals --------- Co-authored-by: lironsh <[email protected]>
- Loading branch information
1 parent
b754536
commit 5e7a282
Showing
11 changed files
with
664 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['@typescript-eslint'], | ||
env: { | ||
node: true, | ||
jest: true, | ||
es6: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
'no-console': 'off', | ||
}, | ||
ignorePatterns: ['dist/', 'node_modules/', '*.js'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import pilot from "@wix-pilot/core"; | ||
import { PromptHandler } from "../utils/promptHandler"; | ||
import { WebdriverIOAppiumFrameworkDriver } from "../index"; | ||
|
||
describe("Example Test Suite", () => { | ||
let frameworkDriver: WebdriverIOAppiumFrameworkDriver; | ||
|
||
before(async () => { | ||
const promptHandler: PromptHandler = new PromptHandler(); | ||
frameworkDriver = new WebdriverIOAppiumFrameworkDriver(); | ||
pilot.init({ | ||
frameworkDriver, | ||
promptHandler, | ||
}); | ||
}); | ||
|
||
beforeEach(async () => { | ||
pilot.start(); | ||
}); | ||
|
||
afterEach(async () => { | ||
pilot.end(); | ||
}); | ||
|
||
it("perform test with pilot", async () => { | ||
await pilot.autopilot("earn 2 points in the game"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import path from "path"; | ||
|
||
export const config = { | ||
runner: "local", | ||
specs: ["./**/*.test.ts"], | ||
maxInstances: 1, | ||
|
||
capabilities: [ | ||
{ | ||
platformName: "iOS", | ||
"appium:deviceName": "iPhone 15 Pro", | ||
"appium:automationName": "XCUITest", | ||
"appium:app": path.resolve( | ||
__dirname, | ||
"../../detox/ExampleApp/ios/build/Build/Products/Release-iphonesimulator/ExampleApp.app", | ||
), | ||
}, | ||
], | ||
|
||
logLevel: "info", | ||
bail: 0, | ||
baseUrl: "http://localhost", | ||
waitforTimeout: 10000, | ||
connectionRetryTimeout: 900000, | ||
connectionRetryCount: 3, | ||
|
||
services: ["appium"], | ||
appium: { | ||
command: "appium", | ||
}, | ||
|
||
framework: "mocha", | ||
reporters: ["spec"], | ||
mochaOpts: { | ||
ui: "bdd", | ||
timeout: 600000, | ||
}, | ||
}; |
Oops, something went wrong.