chore: update imageHelper prop

This commit is contained in:
SvetoslavTsenov
2019-07-08 14:50:18 +03:00
parent ddfb573328
commit f5453ef4de
8 changed files with 5 additions and 17 deletions

View File

@@ -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>

View File

@@ -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) {

View File

@@ -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 () {

View File

@@ -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 () {

View File

@@ -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;
} }
} }

View File

@@ -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 () {

View File

@@ -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 () {

View File

@@ -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",