Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit cd4f4e7

Browse files
vchimevvchimev
vchimev
authored and
vchimev
committed
text(TypeScriptApp): update resources and tests
1 parent 7f2b264 commit cd4f4e7

File tree

4 files changed

+11
-14
lines changed

4 files changed

+11
-14
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo" class="page">
22
<Page.actionBar>
3-
<ActionBar title="Second Page" icon="" class="action-bar">
4-
</ActionBar>
3+
<ActionBar title="Second Page" icon="" class="action-bar"></ActionBar>
54
</Page.actionBar>
65
<GridLayout>
7-
<Button automationText="btn"text="0" width="110" height="110" tap="secondPageTap" />
6+
<Button text="0" width="110" height="110" tap="secondPageTap" />
87
</GridLayout>
9-
</Page>
8+
</Page>
File renamed without changes.
156 Bytes
Loading[フレーム]

‎demo/TypeScriptApp/e2e/tests.e2e-spec.ts‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ describe("sample scenario", () => {
3434
await btnNav.tap();
3535

3636
const secondPage = await driver.findElementByText("Second Page");
37-
const btn = await driver.findElementByText("btn");
38-
39-
const result = await driver.compareElement(btn, getButtonImageName());
40-
assert.isTrue(result);
41-
42-
await btn.tap();
43-
assert.equal(await btn.text(), 1);
37+
const btnZero = await driver.findElementByText("0");
38+
await btnZero.tap();
4439

40+
// In iOS, the `automationText` property applies on both `name` and `label`:
41+
// https://github.com/NativeScript/NativeScript/issues/3150
42+
// <XCUIElementTypeButton type="XCUIElementTypeButton" name="0" label="0" enabled="true" visible="true" x="132" y="395" width="111" height="110"/>
43+
// <XCUIElementTypeButton type="XCUIElementTypeButton" name="btn" label="btn" enabled="true" visible="true" x="132" y="395" width="111" height="110"/>
44+
const btnOne = await driver.findElementByText("1");
4545
await driver.navBack();
4646
});
4747

@@ -63,12 +63,10 @@ describe("sample scenario", () => {
6363
for (let styleType in styleTypes) {
6464
it(`should find an element with ${styleType} style applied`, async function () {
6565
const element = await driver.findElementByText(styleTypes[styleType]);
66-
const result = await driver.compareElement(element, getPlatformImageName());
66+
const result = await driver.compareElement(element, "style");
6767
assert.isTrue(result);
6868
});
6969
}
7070

71-
const getButtonImageName = () => { return driver.isAndroid ? "btnAndroid" : "btnIOS"; }
72-
const getPlatformImageName = () => { return driver.isAndroid ? "styleAndroid" : "styleIOS"; }
7371
const getPlatformLabel = async () => { return driver.isAndroid ? await driver.findElementByText("android") : await driver.findElementByText("ios"); }
7472
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /