mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: update imageHelper prop
This commit is contained in:
@@ -10,15 +10,10 @@
|
||||
<GridLayout>
|
||||
<ScrollView>
|
||||
<StackLayout>
|
||||
<Button text="tab-text-color: green;" tap="applyTap" tag="tab-text-color: green;" style.fontSize="8"/>
|
||||
<Button text="tab-background-color: yellow;" tap="applyTap" tag="tab-background-color: yellow;" style.fontSize="8"/>
|
||||
<Button text="selected-tab-text-color: red;" tap="applyTap" tag="selected-tab-text-color: red;" style.fontSize="8"/>
|
||||
<Button text="android-selected-tab-highlight-color: orange;" tap="applyTap" tag="android-selected-tab-highlight-color: orange;" style.fontSize="8"/>
|
||||
<Button text="text-transform: uppercase;" tap="applyTap" tag="text-transform: uppercase;" style.fontSize="8"/>
|
||||
<Button text="text-transform: lowercase;" tap="applyTap" tag="text-transform: lowercase;" style.fontSize="8"/>
|
||||
<Button text="text-transform: capitalize;" tap="applyTap" tag="text-transform: capitalize;" style.fontSize="8"/>
|
||||
<Button text="text-transform: none;" tap="applyTap" tag="text-transform: none;" style.fontSize="8"/>
|
||||
<Button text="all" tap="applyTap" tag="tab-text-color: green; tab-background-color: yellow; selected-tab-text-color: red; android-selected-tab-highlight-color: orange; text-transform: uppercase;" style.fontSize="8"/>
|
||||
<Button text="reset" tap="resetTap" style.fontSize="8"/>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
|
||||
@@ -9,6 +9,8 @@ export class BottomNavigationBasePage extends PageObjectBaseModel {
|
||||
|
||||
constructor(_driver: AppiumDriver, elementCacheStrategy?: ElementCacheStrategy) {
|
||||
super(_driver, ["bottom-navigation"], elementCacheStrategy);
|
||||
this._driver.imageHelper.options.waitBeforeCreatingInitialImageCapture = 4000;
|
||||
this._driver.imageHelper.options.keepOriginalImageSize = false;
|
||||
}
|
||||
|
||||
async init(subSuiteName: string) {
|
||||
|
||||
@@ -14,15 +14,10 @@ describe(`${suite}-${spec}-suite`, async function () {
|
||||
let bottomNavigationBasePage: BottomNavigationBasePage;
|
||||
|
||||
const samples = [
|
||||
{ sample: "tab-text-color: green;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "tab-background-color: yellow;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "selected-tab-text-color: red;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "android-selected-tab-highlight-color: orange;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "text-transform: uppercase;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "text-transform: lowercase;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "text-transform: capitalize;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "text-transform: none;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "all", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
{ sample: "reset", tab1: "IteM onE", tab2: "IteM twO" },
|
||||
];
|
||||
|
||||
@@ -32,8 +27,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
||||
await driver.restartApp();
|
||||
bottomNavigationBasePage = new BottomNavigationBasePage(driver, ElementCacheStrategy.none);
|
||||
await bottomNavigationBasePage.init("css-text-transform");
|
||||
driver.imageHelper.options.keepOriginalImageSize = false;
|
||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
|
||||
@@ -17,7 +17,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
||||
await driver.restartApp();
|
||||
bottomNavigationBasePage = new BottomNavigationBasePage(driver);
|
||||
await bottomNavigationBasePage.initSuite();
|
||||
driver.imageHelper.blockOutAreas = [{ x: 40, y: 0, height: 150, width: 325 }];
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
|
||||
@@ -11,5 +11,7 @@ export class TabViewBasePage extends PageObjectBaseModel {
|
||||
async init(subSuiteName: string) {
|
||||
this._naviagtionLinks.push(subSuiteName);
|
||||
await super.initSuite();
|
||||
this._driver.imageHelper.options.keepOriginalImageSize = false;
|
||||
this._driver.imageHelper.options.waitBeforeCreatingInitialImageCapture = 4000;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
||||
await driver.restartApp();
|
||||
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.onload);
|
||||
await tabViewBasePage.initSuite();
|
||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
|
||||
@@ -32,8 +32,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
||||
await driver.restartApp();
|
||||
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.none);
|
||||
await tabViewBasePage.init("tabViewCss");
|
||||
driver.imageHelper.options.keepOriginalImageSize = false;
|
||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"version": "6.0.0-2019-07-05-092721-01"
|
||||
},
|
||||
"tns-ios": {
|
||||
"version": "next"
|
||||
"version": "6.0.0-2019-07-03-115841-01"
|
||||
}
|
||||
},
|
||||
"main": "app.js",
|
||||
|
||||
Reference in New Issue
Block a user