import { LoginPage } from './login.po'; import { DispatchPage } from '../dispatch-page/dispatch.po'; import { browser, element, by } from 'protractor'; type result = any let login = new LoginPage(); let dis = new DispatchPage(); describe('Build Sprinthub', () => { it ('should open sprinttek & allow cookies',async () => { await login.navigateTo(); await login.waitForItemToBeVisible(login.loginTitle); await login.allowCookies(); expect(login.cookies.isDisplayed()).toBeFalsy(); }); it('switch to tenant',async () =>{ await login.switchByTenant(); await browser.sleep(3000); }); it('login to antech using username',async function(){ await login.waitForItemToBeVisible(login.userName); await login.loginUsingUsername(); await browser.sleep(2000); await login.waitForItemToBeVisible(dis.topBarUser); await dis.pageHeader.isPresent(); await expect(dis.pageHeader.getText()).toBe(dis.disTitle); }); });