]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/e2e/src/po/login.po.ts
Improve E2E tests
[github/Chocobozzz/PeerTube.git] / client / e2e / src / po / login.po.ts
1 import { browser, element, by } from 'protractor'
2
3 export class LoginPage {
4 async loginAsRootUser () {
5 await browser.get('/login')
6
7 element(by.css('input#username')).sendKeys('root')
8 element(by.css('input#password')).sendKeys('test1')
9
10 await browser.sleep(1000)
11
12 await element(by.css('form input[type=submit]')).click()
13
14 expect(this.getLoggedInInfo().getText()).toContain('root')
15 }
16
17 private getLoggedInInfo () {
18 return element(by.css('.logged-in-display-name'))
19 }
20 }