aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/login.po.ts
blob: 5a36fd611f4c731f7c076d3c6669e0f28a8819e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { browser, element, by } from 'protractor'

export class LoginPage {
  async loginAsRootUser () {
    await browser.get('/login')

    await element(by.css('input#username')).sendKeys('root')
    await element(by.css('input#password')).sendKeys('test1')

    await element(by.css('form input[type=submit]')).click()

    return browser.wait(browser.ExpectedConditions.urlContains('/videos/'))
  }
}