fix(ios): translate transform breaks sequential animation set (#5961)

* fix(ios): translate transform breaks sequential animation set

* chore: add e2e test app for animations
This commit is contained in:
Manol Donev
2018-06-19 10:38:29 +03:00
committed by GitHub
parent 3dc3a411c3
commit 6cfdc206d9
80 changed files with 930 additions and 3 deletions

View File

@@ -0,0 +1,48 @@
import { AppiumDriver, createDriver, SearchOptions } from "nativescript-dev-appium";
import { Screen } from "./screen";
import { assert } from "chai";
describe("animation:", () => {
let driver: AppiumDriver;
let screen: Screen;
before(async () => {
driver = await createDriver();
screen = new Screen(driver);
await driver.resetApp();
});
after(async () => {
await driver.quit();
console.log("Quit driver!");
});
afterEach(async function () {
if (this.currentTest.state === "failed") {
await driver.logPageSource(this.currentTest.title);
await driver.logScreenshot(this.currentTest.title);
}
});
it("should play sequentially", async () => {
await screen.loadedHome();
const button = await driver.findElementByText("Play Sequential Animation With Translate", SearchOptions.exact);
await button.click();
const label = await driver.findElementByText("Label1 animated sequentially!", SearchOptions.exact);
assert.isTrue(await label.isDisplayed());
});
it("should play simultaneously", async () => {
await screen.loadedHome();
const button = await driver.findElementByText("Play Simultaneous Animation With Translate", SearchOptions.exact);
await button.click();
const label = await driver.findElementByText("Label2 animated simultaneously!", SearchOptions.exact);
assert.isTrue(await label.isDisplayed());
});
});

View File

@@ -0,0 +1,19 @@
import { AppiumDriver } from "nativescript-dev-appium";
import { assert } from "chai";
const home = "Home"
export class Screen {
private _driver: AppiumDriver
constructor(driver: AppiumDriver) {
this._driver = driver;
}
loadedHome = async () => {
const lblHome = await this._driver.findElementByText(home);
assert.isTrue(await lblHome.isDisplayed());
console.log(home + " loaded!");
}
}

View File

@@ -0,0 +1,15 @@
import { AppiumDriver, createDriver, startServer, stopServer } from "nativescript-dev-appium";
let driver: AppiumDriver;
before("start server", async () => {
await startServer();
driver = await createDriver();
await driver.setDontKeepActivities(true);
});
after("stop server", async () => {
await driver.setDontKeepActivities(false);
await driver.quit();
await stopServer();
});

View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"importHelpers": false,
"sourceMap": true,
"types": [
"node",
"mocha",
"chai"
],
"lib": [
"es2015",
"dom"
]
}
}