Skip to content

Commit d194fe5

Browse files
Zdravko BranzovZdravko Branzov
authored andcommitted
chore: update tests in the repo to be runnable in saucelabs
1 parent 720a6a6 commit d194fe5

38 files changed

+64
-25
lines changed

e2e/animation-examples/e2e/pages/animation-with-options-page.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ export class AnimationWithOptionsPage extends BasePage {
1212
async enterExample() {
1313
const exampleBtn = await this._driver.findElementByAccessibilityId("options");
1414
await exampleBtn.click();
15-
this.initialPositionOfAnimatedBtn = await (await this.animatedBtn()).location();
15+
const animatedBtn = await this.animatedBtn();
16+
this.initialPositionOfAnimatedBtn = await animatedBtn.location();
1617
}
1718

1819
async btnToggleAnimation() {
1920
return await this._driver.findElementByAccessibilityId("toggleAnimation");
2021
}
2122

2223
async animatedBtn() {
23-
await this._driver.findElementsByAccessibilityId("animatedBtn", 10000);
24-
return await this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
24+
await this._driver.wait(2000);
25+
const btn = await this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
26+
return btn;
2527
}
2628

2729
async toggleAnimation() {
@@ -30,7 +32,8 @@ export class AnimationWithOptionsPage extends BasePage {
3032
}
3133

3234
async waitElementToHide() {
33-
return await this.waitElementTo(() => this.animatedBtn(), false, 10000);
35+
await this._driver.wait(2000);
36+
return await this._driver.findElementByAccessibilityIdIfExists("animatedBtn");
3437
}
3538

3639
async assertPositionOfToggleAnimationBtn() {
95.3 KB
Loading
114 KB
Loading
95.7 KB
Loading
57.1 KB
Loading

e2e/animation-examples/e2e/smoke.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe("smoke-tests", async function () {
8787
await animationWithOptionsPage.enterExample();
8888
await animationWithOptionsPage.toggleAnimation();
8989
const result = await animationWithOptionsPage.waitElementToHide();
90-
assert.isFalse(result.isVisible, "The button should disappear!");
90+
assert.isUndefined(result, "The button should disappear!");
9191

9292
await animationWithOptionsPage.assertPositionOfToggleAnimationBtn();
9393
});

e2e/config/appium.capabilities.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
"fullReset": false,
5757
"app": "",
5858
"idleTimeout": 120,
59-
"automationName": "Appium"
59+
"automationName": "Appium",
60+
"density":3.2,
61+
"offsetPixels":51
6062
},
6163
"android23": {
6264
"platformName": "Android",

e2e/config/mocha.opts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--timeout 60000
1+
--timeout 120000
22
--recursive e2e
33
--reporter mochawesome
4-
--reporter-options quiet=true,html=true,inline=true,autoOpen=true
4+
--reporter-options quiet=true,html=true,inline=true
55
--exit

e2e/renderer/e2e/ngfor.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("ngFor scenario", async function () {
5353
});
5454

5555
it("should place new elements in the right places", async function () {
56-
for (let i = 0; i < 5; i += 1) {
56+
for (let i = 0; i < 3; i += 1) {
5757
await addElement();
5858
await checkAppendedCorrectly();
5959
}
@@ -67,7 +67,7 @@ describe("ngFor scenario", async function () {
6767
});
6868

6969
it("should render new elements correctly after all old ones are removed", async function () {
70-
for (let i = 0; i < 5; i += 1) {
70+
for (let i = 0; i < 3; i += 1) {
7171
await addElement();
7272
await checkCorrectOrderAll();
7373
}

e2e/renderer/e2e/ngforof.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe("ngForOf scenario", function () {
7575
});
7676

7777
it("should render new elements correctly after all old ones are removed", async function () {
78-
for (let i = 0; i < 5; i += 1) {
78+
for (let i = 0; i < 3; i += 1) {
7979
await addElement();
8080
await checkCorrectOrderAll();
8181
}

0 commit comments

Comments
 (0)