From 9534f1727d7a42da98db7e074f503c6c90d69a71 Mon Sep 17 00:00:00 2001 From: Dmitry Sotnikov Date: Fri, 10 Dec 2021 14:21:04 +0200 Subject: [PATCH] added new spec for cancel login + login + logout --- appium/config/wdio.live.conf.js | 6 +++++ appium/tests/screenobjects/splash.screen.ts | 4 +++ .../live/login/CancelLoginAndLogout.spec.ts | 27 +++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 appium/tests/specs/live/login/CancelLoginAndLogout.spec.ts diff --git a/appium/config/wdio.live.conf.js b/appium/config/wdio.live.conf.js index c3fbd3d2a..de9c1568d 100644 --- a/appium/config/wdio.live.conf.js +++ b/appium/config/wdio.live.conf.js @@ -12,6 +12,12 @@ config.suites = { ], inbox: [ './tests/specs/live/inbox/*.spec.ts' + ], + compose: [ + './tests/specs/live/composeEmail/*.spec.ts' + ], + login: [ + './tests/specs/live/login/*.spec.ts' ] }; diff --git a/appium/tests/screenobjects/splash.screen.ts b/appium/tests/screenobjects/splash.screen.ts index 0bafba3fb..a59b5b3ce 100644 --- a/appium/tests/screenobjects/splash.screen.ts +++ b/appium/tests/screenobjects/splash.screen.ts @@ -104,6 +104,10 @@ class SplashScreen extends BaseScreen { await ElementHelper.waitAndClick(await this.continueButton); } + clickCancelButton = async () => { + await ElementHelper.waitAndClick(await this.cancelButton); + } + changeLanguage = async (language = '‪English (United States)‬') => { await ElementHelper.waitAndClick(await this.languageDropdown, 500); const selector = `~${language}`; diff --git a/appium/tests/specs/live/login/CancelLoginAndLogout.spec.ts b/appium/tests/specs/live/login/CancelLoginAndLogout.spec.ts new file mode 100644 index 000000000..b8c9a10e4 --- /dev/null +++ b/appium/tests/specs/live/login/CancelLoginAndLogout.spec.ts @@ -0,0 +1,27 @@ +import { + SplashScreen, + SetupKeyScreen, + MenuBarScreen, + MailFolderScreen +} from '../../../screenobjects/all-screens'; + + +describe('LOGIN: ', () => { + + it('user should be able to cancel login + login + logout', async () => { + + await SplashScreen.clickContinueWithGmail(); + await SplashScreen.clickCancelButton(); + await SplashScreen.checkLoginPage(); + + await SplashScreen.login(); + await SetupKeyScreen.setPassPhrase(); + await MailFolderScreen.checkInboxScreen(); + + await MenuBarScreen.clickMenuIcon(); + await MenuBarScreen.checkUserEmail(); + + await MenuBarScreen.clickLogout(); + await SplashScreen.checkLoginPage(); + }); +});