import { $ , browser , by , element , ExpectedConditions as until } from 'protractor' ; import * as support from '../support' ; import { BaseElement , Clickable } from '../ui' ; import { BasePage } from './base.page' ; export abstract class AppPage extends BasePage { appTag = $ ( 'f8-app' ) ; mainNavBar = new BaseElement ( $ ( 'header ul.navbar-primary.persistent-secondary' ) , 'Main Navigation Bar' ) ; planTab = new Clickable ( this . mainNavBar . element ( by . xpath ( "//span[text()='Plan']" ) ) , 'Plan Tab' ) ; backLogTab = new Clickable ( this . mainNavBar . element ( by . xpath ( "//span[text()=' Backlog ']" ) ) , 'Backlog Tab' ) ; boardTab = new Clickable ( this . mainNavBar . element ( by . xpath ( "//span[text()=' Board ']" ) ) , 'Board Tab' ) ; QueryTab = new Clickable ( element ( by . cssContainingText ( '.nav.persistent-secondary li>a' , 'Query' ) ) , 'Query Tab' ) ; param { url } string constructor ( url ? ) { super ( url ) ; } param { ui } The param { css } Css param { text } text innerElement ( ui , css , text ) { const element = this . appTag . element ( by . cssContainingText ( css , text ) ) ; return new ui ( element , text ) ; } async ready ( ) { await browser . wait ( until . visibilityOf ( this . appTag ) ) ; } async clickPlanTab ( ) { await this . planTab . clickWhenReady ( ) ; } async clickBacklogTab ( ) { await this . backLogTab . clickWhenReady ( ) ; } async clickBoardTab ( ) { await this . boardTab . clickWhenReady ( ) ; } async clickQueryTab ( ) { await this . QueryTab . clickWhenReady ( ) ; } }