From f6ae6c178b36e2ad07bf3a0c953b432e082ed448 Mon Sep 17 00:00:00 2001 From: Vijet Mahabaleshwar Date: Tue, 30 Apr 2019 12:11:41 -0700 Subject: [PATCH] Testing internet access --- .../specs/okta-hosted-login-flow-spec.js | 52 +++++++++++-------- .../page-objects/shared/login-home-page.js | 6 +-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/e2e-tests/okta-hosted-login/specs/okta-hosted-login-flow-spec.js b/e2e-tests/okta-hosted-login/specs/okta-hosted-login-flow-spec.js index 753c4416..c97422a3 100644 --- a/e2e-tests/okta-hosted-login/specs/okta-hosted-login-flow-spec.js +++ b/e2e-tests/okta-hosted-login/specs/okta-hosted-login-flow-spec.js @@ -31,6 +31,12 @@ describe('Okta Hosted Login Flow', () => { browser.ignoreSynchronization = true; }); + // it('can access internet', async() => { + // browser.get("https://lambdatest.com"); + // element(by.css('p.home-btn > a.home-cta')).click(); + // expect(browser.getTitle()).toEqual('Sign up for free | Cross Browser Testing Tool | LambdaTest - LambdaTest'); + // }); + it('can login with Okta as the IDP', async () => { browser.get(appRoot); console.log(`Loading home page ${appRoot}...`); @@ -63,29 +69,29 @@ describe('Okta Hosted Login Flow', () => { authenticatedHomePage.waitForPageLoad(); }); - it('can access user profile', async () => { - authenticatedHomePage.viewProfile(); - profile.waitForPageLoad(); - expect(profile.getEmailClaim()).toBe(browser.params.login.email); - }); + // xit('can access user profile', async () => { + // authenticatedHomePage.viewProfile(); + // profile.waitForPageLoad(); + // expect(profile.getEmailClaim()).toBe(browser.params.login.email); + // }); - it('can access resource server messages after login', async () => { - // If it's not implicit flow, don't test messages resource server - if (process.env.TEST_TYPE !== 'implicit') { - return; - } - authenticatedHomePage.viewMessages(); - messagesPage.waitForPageLoad(); - expect(messagesPage.getMessage()).toBeTruthy(); - }); + // xit('can access resource server messages after login', async () => { + // // If it's not implicit flow, don't test messages resource server + // if (process.env.TEST_TYPE !== 'implicit') { + // return; + // } + // authenticatedHomePage.viewMessages(); + // messagesPage.waitForPageLoad(); + // expect(messagesPage.getMessage()).toBeTruthy(); + // }); - it('can log the user out', async () => { - browser.get(appRoot); - console.log('Waiting for home page...'); - authenticatedHomePage.waitForPageLoad(); - console.log('Loaded authenticated home page...'); - authenticatedHomePage.logout(); - console.log('After logout click...'); - loginHomePage.waitForPageLoad(); - }); + // xit('can log the user out', async () => { + // browser.get(appRoot); + // console.log('Waiting for home page...'); + // authenticatedHomePage.waitForPageLoad(); + // console.log('Loaded authenticated home page...'); + // authenticatedHomePage.logout(); + // console.log('After logout click...'); + // loginHomePage.waitForPageLoad(); + // }); }); diff --git a/e2e-tests/page-objects/shared/login-home-page.js b/e2e-tests/page-objects/shared/login-home-page.js index b0580411..01eb1b05 100644 --- a/e2e-tests/page-objects/shared/login-home-page.js +++ b/e2e-tests/page-objects/shared/login-home-page.js @@ -29,9 +29,9 @@ class LoginHomePage { waitForPageLoad() { browser.sleep(1000); - browser.getPageSource().then(function (res) { - console.log('AFTER CLICKING LOGOUT -' + res); - }); + // browser.getPageSource().then(function (res) { + // console.log('AFTER CLICKING LOGOUT -' + res); + // }); return util.wait(this.$loginButton); }