Skip to content

Commit 8b29fb9

Browse files
Dimitar TodorovDimitar Todorov
authored andcommitted
Fix: revert android tests to android api 23.
1 parent ab6ad4f commit 8b29fb9

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ matrix:
144144
script:
145145
- npm i -g appium
146146
- cd demo && npm i
147-
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_JS
147+
- travis_wait travis_retry npm run e2e -- --runType android23 --sauceLab --appPath $ANDROID_PACKAGE_JS
148148
- os: linux
149149
env:
150150
- Android="24"
@@ -155,7 +155,7 @@ matrix:
155155
script:
156156
- npm i -g appium
157157
- cd demo-vue && npm i
158-
- travis_wait travis_retry npm run e2e -- --runType android24.sauce --sauceLab --appPath $ANDROID_PACKAGE_VUE
158+
- travis_wait travis_retry npm run e2e -- --runType android23 --sauceLab --appPath $ANDROID_PACKAGE_VUE
159159
- os: linux
160160
env:
161161
- iOS="12.0"

demo/e2e/tests.e2e.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,20 @@ describe("Camera", () => {
3333
const takePictureButton = await driver.findElementByText("Take Picture");
3434
await takePictureButton.click();
3535
if (isAndroid) {
36-
let allow = await driver.findElementByText("Allow", SearchOptions.exact);
37-
await allow.click();
38-
let allowSecond = await driver.findElementByText("Allow", SearchOptions.exact);
39-
await allowSecond.click();
40-
let allowLocation = await driver.findElementByText("Allow", SearchOptions.exact);
41-
await allowLocation.click();
42-
let geoTagConfirm = await driver.findElementByTextIfExists("Next", SearchOptions.contains)
43-
if(geoTagConfirm !== undefined){
44-
await geoTagConfirm.click();
36+
let allow = await driver.findElementByTextIfExists("Allow", SearchOptions.exact);
37+
if (allow !== undefined) {
38+
await allow.click();
39+
allow = await driver.findElementByTextIfExists("Allow", SearchOptions.exact);
40+
await allow.click();
4541
}
46-
47-
let shutterBtn = await driver.findElementByAccessibilityId("Shutter");
48-
await shutterBtn.click();
49-
let acceptBtn = await driver.findElementByAccessibilityId("Done");
50-
await acceptBtn.click();
42+
const deny = await driver.findElementByTextIfExists("Deny", SearchOptions.exact);
43+
if (deny !== undefined) {
44+
await deny.click();
45+
}
46+
let images = await driver.findElementsByClassName(driver.locators.image); // Take a picture
47+
await images[5].click();
48+
images = await driver.findElementsByClassName(driver.locators.image); // Accept it
49+
await images[4].click();
5150
} else {
5251
let ok = await driver.findElementByTextIfExists("OK", SearchOptions.exact);
5352
if(ok !== undefined){

0 commit comments

Comments
 (0)