Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

[POC] Appium #2191

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
587 changes: 299 additions & 288 deletions package.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/screens/Onboarding/steps/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function OnboardingStepWelcome({ navigation }: *) {
<TouchableOpacity
style={[styles.languageButton, { borderColor: colors.fog }]}
onPress={onLanguageSelect}
accessibilityLabel="get-started-button"
>
<LText semiBold style={styles.languageLabel}>
{i18n.language}
Expand Down
40 changes: 40 additions & 0 deletions tests/config/wdio.android.app.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { join } = require("path");
const { config } = require("./wdio.shared.conf");

// ============
// Specs
// ============
config.specs = ["./tests/specs/**/*.spec.js"];

// ============
// Capabilities
// ============
// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
config.capabilities = [
{
// The defaults you need to have in your config
platformName: "Android",
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// http://appium.io/docs/en/writing-running-appium/caps/
// This is `appium:` for all Appium Capabilities which can be found here
"appium:deviceName": "Pixel XL API 30",
"appium:platformVersion": "11",
"appium:orientation": "PORTRAIT",
// `automationName` will be mandatory, see
// https://github.com/appium/appium/releases/tag/v1.13.0
"appium:automationName": "UiAutomator2",
// The path to the app
"appium:app": join(
process.cwd(),
"android/app/build/outputs/apk/stagingRelease/app-x86-stagingRelease.apk",
),
// Read the reset strategies very well, they differ per platform, see
// http://appium.io/docs/en/writing-running-appium/other/reset-strategies/
"appium:noReset": true,
"appium:newCommandTimeout": 240,
},
];

exports.config = config;
40 changes: 40 additions & 0 deletions tests/config/wdio.ios.app.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const { join } = require("path");
const { config } = require("./wdio.shared.conf");

// ============
// Specs
// ============
config.specs = ["./tests/specs/**/*.spec.js"];

// ============
// Capabilities
// ============
// For all capabilities please check
// http://appium.io/docs/en/writing-running-appium/caps/#general-capabilities
config.capabilities = [
{
// The defaults you need to have in your config
platformName: "iOS",
maxInstances: 1,
// For W3C the appium capabilities need to have an extension prefix
// This is `appium:` for all Appium Capabilities which can be found here
// http://appium.io/docs/en/writing-running-appium/caps/
"appium:deviceName": "iPhone 11 Pro",
"appium:platformVersion": "15.0",
"appium:orientation": "PORTRAIT",
// `automationName` will be mandatory, see
// https://github.com/appium/appium/releases/tag/v1.13.0
"appium:automationName": "XCUITest",
// The path to the app
"appium:app": join(
process.cwd(),
"ios/build/ledgerlivemobile/Build/Products/Staging-iphonesimulator/ledgerlivemobile.app",
),
// Read the reset strategies very well, they differ per platform, see
// http://appium.io/docs/en/writing-running-appium/other/reset-strategies/
"appium:noReset": false,
"appium:newCommandTimeout": 240,
},
];

exports.config = config;
44 changes: 44 additions & 0 deletions tests/config/wdio.shared.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
exports.config = {
// ====================
// Runner and framework
// Configuration
// ====================
runner: "local",
framework: "mocha",
jasmineNodeOpts: {
// Updated the timeout to 30 seconds due to possible longer appium calls
// When using XPATH
defaultTimeoutInterval: 90000,
},
sync: true,
logLevel: "info",
deprecationWarnings: true,
bail: 0,
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
reporters: ["spec"],

// ====================
// Appium Configuration
// ====================
services: ["appium"],
appium: {
// For options see
// https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-appium-service
args: {
// For arguments see
// https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-appium-service
},
command: "./node_modules/.bin/appium",
},

port: 4723,

// ====================
// Some hooks
// ====================
// beforeSession: (config, capabilities, specs) => {
// require("@babel/register");
// },
};
6 changes: 6 additions & 0 deletions tests/specs/poc.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
describe("WebdriverIO and Appium, when setup is fine,", () => {
it("should be able to click on 'Get Started'", async () => {
const el = await $("~get-started-button");
await el.click();
});
});
Loading