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>
|
<GridLayout>
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<StackLayout>
|
<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: 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: 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: 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="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"/>
|
<Button text="reset" tap="resetTap" style.fontSize="8"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ export class BottomNavigationBasePage extends PageObjectBaseModel {
|
|||||||
|
|
||||||
constructor(_driver: AppiumDriver, elementCacheStrategy?: ElementCacheStrategy) {
|
constructor(_driver: AppiumDriver, elementCacheStrategy?: ElementCacheStrategy) {
|
||||||
super(_driver, ["bottom-navigation"], elementCacheStrategy);
|
super(_driver, ["bottom-navigation"], elementCacheStrategy);
|
||||||
|
this._driver.imageHelper.options.waitBeforeCreatingInitialImageCapture = 4000;
|
||||||
|
this._driver.imageHelper.options.keepOriginalImageSize = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(subSuiteName: string) {
|
async init(subSuiteName: string) {
|
||||||
|
|||||||
@@ -14,15 +14,10 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
let bottomNavigationBasePage: BottomNavigationBasePage;
|
let bottomNavigationBasePage: BottomNavigationBasePage;
|
||||||
|
|
||||||
const samples = [
|
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: uppercase;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||||
{ sample: "text-transform: lowercase;", 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: capitalize;", tab1: "IteM onE", tab2: "IteM twO" },
|
||||||
{ sample: "text-transform: none;", 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" },
|
{ sample: "reset", tab1: "IteM onE", tab2: "IteM twO" },
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -32,8 +27,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
await driver.restartApp();
|
await driver.restartApp();
|
||||||
bottomNavigationBasePage = new BottomNavigationBasePage(driver, ElementCacheStrategy.none);
|
bottomNavigationBasePage = new BottomNavigationBasePage(driver, ElementCacheStrategy.none);
|
||||||
await bottomNavigationBasePage.init("css-text-transform");
|
await bottomNavigationBasePage.init("css-text-transform");
|
||||||
driver.imageHelper.options.keepOriginalImageSize = false;
|
|
||||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
await driver.restartApp();
|
await driver.restartApp();
|
||||||
bottomNavigationBasePage = new BottomNavigationBasePage(driver);
|
bottomNavigationBasePage = new BottomNavigationBasePage(driver);
|
||||||
await bottomNavigationBasePage.initSuite();
|
await bottomNavigationBasePage.initSuite();
|
||||||
driver.imageHelper.blockOutAreas = [{ x: 40, y: 0, height: 150, width: 325 }];
|
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
|
|||||||
@@ -11,5 +11,7 @@ export class TabViewBasePage extends PageObjectBaseModel {
|
|||||||
async init(subSuiteName: string) {
|
async init(subSuiteName: string) {
|
||||||
this._naviagtionLinks.push(subSuiteName);
|
this._naviagtionLinks.push(subSuiteName);
|
||||||
await super.initSuite();
|
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();
|
await driver.restartApp();
|
||||||
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.onload);
|
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.onload);
|
||||||
await tabViewBasePage.initSuite();
|
await tabViewBasePage.initSuite();
|
||||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ describe(`${suite}-${spec}-suite`, async function () {
|
|||||||
await driver.restartApp();
|
await driver.restartApp();
|
||||||
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.none);
|
tabViewBasePage = new TabViewBasePage(driver, ElementCacheStrategy.none);
|
||||||
await tabViewBasePage.init("tabViewCss");
|
await tabViewBasePage.init("tabViewCss");
|
||||||
driver.imageHelper.options.keepOriginalImageSize = false;
|
|
||||||
driver.imageHelper.options.donNotAppendActualSuffixOnIntialImageCapture = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async function () {
|
after(async function () {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"version": "6.0.0-2019-07-05-092721-01"
|
"version": "6.0.0-2019-07-05-092721-01"
|
||||||
},
|
},
|
||||||
"tns-ios": {
|
"tns-ios": {
|
||||||
"version": "next"
|
"version": "6.0.0-2019-07-03-115841-01"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user