From 2412c0b6f574319ff25625132d7223330b9d5e37 Mon Sep 17 00:00:00 2001 From: Svetoslav Date: Tue, 22 Oct 2019 16:54:24 +0300 Subject: [PATCH] tests: fox modal navidation (#7997) --- e2e/modal-navigation/.vscode/launch.json | 35 +++++++++++++++-------- e2e/modal-navigation/e2e/screen.ts | 36 ++++++++++++------------ 2 files changed, 41 insertions(+), 30 deletions(-) diff --git a/e2e/modal-navigation/.vscode/launch.json b/e2e/modal-navigation/.vscode/launch.json index a017624a8..7a7dceac9 100644 --- a/e2e/modal-navigation/.vscode/launch.json +++ b/e2e/modal-navigation/.vscode/launch.json @@ -4,6 +4,25 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "type": "node", + "request": "launch", + "name": "debug tests", + "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "--opts", + "../config/mocha.opts", + "-a", + "--grep", + "modal-frame:" + ], + "internalConsoleOptions": "openOnSessionStart" + }, { "type": "node", "request": "launch", @@ -15,13 +34,9 @@ "--timeout", "999999", "--colors", - // "${workspaceFolder}/test", "--opts", - "./e2e/config/mocha.opts", - "--runType", - "android23", - "--reuseDevice", - "--verbose" + "../config/mocha.opts", + "android" ], "internalConsoleOptions": "openOnSessionStart" }, @@ -36,13 +51,9 @@ "--timeout", "999999", "--colors", - // "${workspaceFolder}/test", "--opts", - "./e2e/config/mocha.opts", - "--runType", - "sim.iPhoneX.iOS112", - "--reuseDevice", - "--verbose" + "../config/mocha.opts", + "ios" ], "internalConsoleOptions": "openOnSessionStart" }, diff --git a/e2e/modal-navigation/e2e/screen.ts b/e2e/modal-navigation/e2e/screen.ts index ac2d22ae8..006de4e7e 100644 --- a/e2e/modal-navigation/e2e/screen.ts +++ b/e2e/modal-navigation/e2e/screen.ts @@ -48,18 +48,18 @@ export class Screen { resetFrameRootView = async () => { console.log("Setting frame root ..."); const btnResetFrameRootView = await this._driver.waitForElement(resetFrameRootView); - await btnResetFrameRootView.tap(); + await btnResetFrameRootView.click(); } resetLayoutRootView = async () => { console.log("Setting layout root ..."); const btnResetLayoutRootView = await this._driver.waitForElement(resetLayoutRootView); - await btnResetLayoutRootView.tap(); + await btnResetLayoutRootView.click(); } resetTabRootView = async () => { const btnResetTabRootView = await this._driver.waitForElement(resetTabRootView); - await btnResetTabRootView.tap(); + await btnResetTabRootView.click(); } loadedTabRootView = async () => { @@ -93,7 +93,7 @@ export class Screen { showModalFrame = async () => { const btnModalFrame = await this._driver.waitForElement(modalFrame); - await btnModalFrame.tap(); + await btnModalFrame.click(); } loadedModalFrame = async () => { @@ -104,7 +104,7 @@ export class Screen { showModalPage = async () => { const btnModalPage = await this._driver.waitForElement(modalPage); - await btnModalPage.tap(); + await btnModalPage.click(); } loadedModalPage = async () => { @@ -115,7 +115,7 @@ export class Screen { showModalLayout = async () => { const btnModalLayout = await this._driver.waitForElement(modalLayout); - await btnModalLayout.tap(); + await btnModalLayout.click(); } loadedModalLayout = async () => { @@ -124,7 +124,7 @@ export class Screen { showModalTabView = async () => { const btnModalTabView = await this._driver.waitForElement(modalTabView); - await btnModalTabView.tap(); + await btnModalTabView.click(); } loadedModalTabView = async () => { @@ -134,23 +134,23 @@ export class Screen { } navigateToSecondPage = async () => { - const btnNavToSecondPage = await this._driver.waitForElement(navToSecondPage); - await btnNavToSecondPage.tap(); + const btnNavToSecondPage = await this._driver.findElementByText(navToSecondPage); + await btnNavToSecondPage.click(); } showDialogConfirm = async () => { const btnShowDialogConfirm = await this._driver.waitForElement(showDialog); - await btnShowDialogConfirm.tap(); + await btnShowDialogConfirm.click(); } navigateToFirstItem = async () => { const itemModalFirst = await this._driver.waitForElement(modalFirst); - await itemModalFirst.tap(); + await itemModalFirst.click(); } navigateToSecondItem = async () => { const itemModalSecond = await this._driver.waitForElement(modalSecond); - await itemModalSecond.tap(); + await itemModalSecond.click(); } loadedConfirmDialog = async () => { @@ -179,17 +179,17 @@ export class Screen { closeDialog = async () => { const btnYesDialog = await this._driver.waitForElement(confirmDialog); - await btnYesDialog.tap(); + await btnYesDialog.click(); } goBackFromSecondPage = async () => { const btnGoBackFromSecondPage = await this._driver.waitForElement(goBack); - await btnGoBackFromSecondPage.tap(); + await btnGoBackFromSecondPage.click(); } showNestedModalFrame = async () => { const btnShowNestedModalFrame = await this._driver.waitForElement(showNestedModalFrame); - await btnShowNestedModalFrame.tap(); + await btnShowNestedModalFrame.click(); } loadedNestedModalFrame = async () => { @@ -200,12 +200,12 @@ export class Screen { closeModalNested = async () => { const btnCloseNestedModal = await this._driver.waitForElement(closeModalNested); - await btnCloseNestedModal.tap(); + await btnCloseNestedModal.click(); } showNestedModalPage = async () => { const btnShowNestedModalPage = await this._driver.waitForElement(showNestedModalPage); - await btnShowNestedModalPage.tap(); + await btnShowNestedModalPage.click(); } loadedNestedModalPage = async () => { @@ -216,7 +216,7 @@ export class Screen { closeModal = async () => { const btnCloseModal = await this._driver.waitForElement(closeModal); - await btnCloseModal.tap(); + await btnCloseModal.click(); } loadModalFrame = async () => {