From 6e9647995774f5dece8f1bfbef545c71ed9f0728 Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Mon, 2 Oct 2017 18:45:51 +0300 Subject: [PATCH 1/3] Extend locators --- lib/locators.d.ts | 4 ++++ lib/locators.ts | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lib/locators.d.ts b/lib/locators.d.ts index 314a04d..c3abe2f 100644 --- a/lib/locators.d.ts +++ b/lib/locators.d.ts @@ -4,8 +4,12 @@ export declare class Locator { private _elementsList; constructor(_platformName: string, _platformVersion: any); readonly button: string; + readonly imageButton: string; readonly listView: string; + readonly textField: string; + readonly textView: string; readonly image: string; + readonly nsImage: string; readonly allELementsList: Map; getElementByName(name: any): string; private loadAndroidElements(); diff --git a/lib/locators.ts b/lib/locators.ts index 9f2a955..9331164 100644 --- a/lib/locators.ts +++ b/lib/locators.ts @@ -17,15 +17,30 @@ export class Locator { return this.getElementByName("button"); } + get imageButton() { + return this.getElementByName("image-button"); + } + get listView() { return this.getElementByName("listview"); } + get textField() { + return this.getElementByName("textfield"); + } + + get textView() { + return this.getElementByName("textview"); + } get image() { return this.getElementByName("image"); } + get nsImage() { + return this.getElementByName("ns-image"); + } + get allELementsList() { return this._elementsList; } @@ -42,6 +57,7 @@ export class Locator { this._elementsList.set("activityindicator", "android.widget.ProgressBar"); this._elementsList.set("button", "android.widget.Button"); this._elementsList.set("image", "android.widget.ImageView"); + this._elementsList.set("image", "org.nativescript.widget.ImageView"); this._elementsList.set("image-button", "android.widget.ImageButton"); this._elementsList.set("imagebutton", "android.widget.ImageButton"); this._elementsList.set("datepicker", "android.widget.DatePicker"); @@ -79,6 +95,7 @@ export class Locator { this._elementsList.set("datepicker", this.createIosElement("DatePicker")); this._elementsList.set("htmlview", this.createIosElement("TextView")); this._elementsList.set("image", this.createIosElement("Image")); + this._elementsList.set("ns-image", this.createIosElement("Image")); this._elementsList.set("label", this.createIosElement("StaticText")); this._elementsList.set("absolutelayout", this.createIosElement("View")); this._elementsList.set("docklayout", this.createIosElement("View")); From 3a3f27b1043fb7ebf211dae56de28ad79fc0160c Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Sat, 14 Oct 2017 20:25:31 +0300 Subject: [PATCH 2/3] Remove e2e command from package.json --- package.json | 98 +++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index c9d847f..320bc63 100644 --- a/package.json +++ b/package.json @@ -1,53 +1,51 @@ { - "name": "nativescript-dev-appium", - "version": "3.0.0", - "description": "A NativeScript plugin to help integrate and run Appium tests", - "author": "Telerik", - "license": "MIT", - "main": "./index.js", - "directories": { - "lib": "./lib" - }, - "repository": { - "type": "git", - "url": "https://github.com/NativeScript/nativescript-dev-appium.git" - }, - "keywords": [ - "nativescript", - "appium", - "test" - ], - "maintainers": [ - { - "name": "hdeshev", - "email": "hristo.deshev@telerik.com" + "name": "nativescript-dev-appium", + "version": "3.0.0", + "description": "A NativeScript plugin to help integrate and run Appium tests", + "author": "Telerik", + "license": "MIT", + "main": "./index.js", + "directories": { + "lib": "./lib" }, - { - "name": "SvetoslavTsenov", - "email": "tsenov@progress.com" + "repository": { + "type": "git", + "url": "https://github.com/NativeScript/nativescript-dev-appium.git" + }, + "keywords": [ + "nativescript", + "appium", + "test" + ], + "maintainers": [{ + "name": "hdeshev", + "email": "hristo.deshev@telerik.com" + }, + { + "name": "SvetoslavTsenov", + "email": "tsenov@progress.com" + } + ], + "dependencies": { + "app-root-path": "^2.0.1", + "portastic": "^1.0.1", + "mobile-devices-controller": "^0.0.3", + "colors": "^1.1.2", + "blink-diff": "^1.0.13", + "glob": "*", + "wd": "^1.4.0", + "webdriverio": "^4.8.0", + "yargs": "^8.0.2", + "chai": "~4.1.1", + "chai-as-promised": "~7.1.1" + }, + "devDependencies": { + "@types/node": "^7.0.5", + "@types/webdriverio": "^4.8.4", + "typescript": "^2.5.0" + }, + "scripts": { + "postinstall": "node ./postinstall.js", + "compile": "tsc --watch" } - ], - "dependencies": { - "app-root-path": "^2.0.1", - "portastic": "^1.0.1", - "mobile-devices-controller": "^0.0.3", - "colors": "^1.1.2", - "blink-diff": "^1.0.13", - "glob": "*", - "wd": "^1.4.0", - "webdriverio": "^4.8.0", - "yargs": "^8.0.2", - "chai": "~4.1.1", - "chai-as-promised": "~7.1.1" - }, - "devDependencies": { - "@types/node": "^7.0.5", - "@types/webdriverio": "^4.8.4", - "typescript": "^2.5.0" - }, - "scripts": { - "postinstall": "node ./postinstall.js", - "compile": "tsc --watch", - "e2e": "tsc -p e2e && mocha --opts ./e2e/config/mocha.opts --" - } -} +} \ No newline at end of file From c833547c0d4915736fdb9bbc7ef1bc936e71682c Mon Sep 17 00:00:00 2001 From: SvetoslavTsenov Date: Sat, 14 Oct 2017 20:27:48 +0300 Subject: [PATCH 3/3] Include org.nativescript.widget.ImageView --- lib/locators.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/locators.ts b/lib/locators.ts index 9331164..e9f463f 100644 --- a/lib/locators.ts +++ b/lib/locators.ts @@ -57,7 +57,7 @@ export class Locator { this._elementsList.set("activityindicator", "android.widget.ProgressBar"); this._elementsList.set("button", "android.widget.Button"); this._elementsList.set("image", "android.widget.ImageView"); - this._elementsList.set("image", "org.nativescript.widget.ImageView"); + this._elementsList.set("ns-image", "org.nativescript.widget.ImageView"); this._elementsList.set("image-button", "android.widget.ImageButton"); this._elementsList.set("imagebutton", "android.widget.ImageButton"); this._elementsList.set("datepicker", "android.widget.DatePicker");