Skip to content

Commit 4ac4f6b

Browse files
tests: include more images for iPhone XR
1 parent 5857386 commit 4ac4f6b

12 files changed

+15
-11
lines changed

Diff for: e2e/pages/animation-builder-page.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ export class AnimationBuilderPage extends BasePage {
1010
}
1111

1212
async enterExample() {
13-
const exampleBtn = await this._driver.findElementByAccessibilityId("builder");
13+
const exampleBtn = await this._driver.findElementByAutomationText("builder");
1414
await exampleBtn.click();
1515
}
1616

1717
async executeAnimation() {
18-
this._btnTapToDisappear = this._driver.findElementByAccessibilityId(AnimationBuilderPage.tapToDisappear);
18+
this._btnTapToDisappear = this._driver.waitForElement(AnimationBuilderPage.tapToDisappear);
1919
console.log("Btn tap to disappear should disappear");
2020
await (await this._btnTapToDisappear).click();
2121
}

Diff for: e2e/pages/base-page.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ export class BasePage {
77
this._elementHelper = new ElementHelper(this._driver.nsCapabilities);
88
}
99

10-
async waitElementTo(element: () => Promise<UIElement>, shouldBeVissible: boolean, wait: number) {
10+
async waitElementTo(element: () => Promise<UIElement>, shouldBeVisible: boolean, wait: number) {
1111
const start = Date.now();
1212
let btn = await element();
13-
while ((await this.isBtnDisplayed(btn)) !== shouldBeVissible && Date.now() - start <= wait) {
13+
while ((await this.isBtnDisplayed(btn)) !== shouldBeVisible && Date.now() - start <= wait) {
1414
btn = await element();
1515
}
1616

Diff for: e2e/pages/extarnal-animation-page.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ export class ExternalAnimationPage extends BasePage {
77
}
88

99
async enterExample() {
10-
const exampleBtn = await this._driver.findElementByAccessibilityId("external");
10+
const exampleBtn = await this._driver.waitForElement("external");
1111
await exampleBtn.click();
1212
}
1313

1414
async toggleAnimation() {
15-
const btnTapToDisappear = await this._driver.findElementByAccessibilityId("toggleAnimation", 5);
15+
const btnTapToDisappear = await this._driver.waitForElement("toggleAnimation");
1616
await btnTapToDisappear.click();
1717
}
1818

1919
animatedBtn() {
20-
return this._driver.findElementByAccessibilityIdIfExists("animatedBtn", 5);
20+
return this._driver.waitForElement("animatedBtn");
2121
}
2222

2323
async waitElementToToggleVisibilityTo(shouldBeVisible: boolean) {
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

Diff for: e2e/smoke.e2e-spec.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { AnimationsWithDefaultOptionsPage } from "./pages/animations-with-defaul
1010
import { AnimateChildPage } from "./pages/animate-child-page";
1111
import { HeroPage } from "./pages/hero-page";
1212

13-
describe("smoke-tests", () => {
13+
describe("smoke-tests", function(){
14+
this.retries(2);
1415
let driver: AppiumDriver;
1516

1617
before(async () => {
@@ -36,7 +37,8 @@ describe("smoke-tests", () => {
3637
assert.isFalse(result.isVisible, "The btn should disappear");
3738
});
3839

39-
it("external animation - visibility", async () => {
40+
it("external animation - visibility", async function(){
41+
this.retries(1);
4042
const externalAnimationPage = new ExternalAnimationPage(driver);
4143
await externalAnimationPage.enterExample();
4244
await externalAnimationPage.toggleAnimation();
@@ -67,7 +69,8 @@ describe("smoke-tests", () => {
6769
await queryWithStaggerPage.assertItemPosition("Item 6", 6, 7);
6870
});
6971

70-
it("fade in - out", async () => {
72+
it("fade in - out", async function(){
73+
this.retries(1);
7174
const fadeInOutPage = new FadeInOutPage(driver);
7275
await fadeInOutPage.enterExample();
7376
await fadeInOutPage.toggleAnimation();
@@ -114,7 +117,8 @@ describe("smoke-tests", () => {
114117
await animationWithOptionsPage.assertItemPosition("Harley Quinn", 4, examplesCount);
115118
});
116119

117-
it("animate child", async () => {
120+
it("animate child", async function (){
121+
this.retries(1);
118122
const animateChildPage = new AnimateChildPage(driver);
119123
await animateChildPage.enterExample();
120124
await animateChildPage.waitParentToAppear();

0 commit comments

Comments
 (0)