aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/video-update.po.ts
blob: 4de3b1b1d2f6bce7b2fccdb1f41d21df3977c986 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { by, element } from 'protractor'

export class VideoUpdatePage {

  async updateName (videoName: string) {
    const nameInput = element(by.css('input#name'))
    await nameInput.clear()
    await nameInput.sendKeys(videoName)
  }

  async validUpdate () {
    const submitButton = await this.getSubmitButton()

    return submitButton.click()
  }

  private getSubmitButton () {
    return element(by.css('.submit-button:not(.disabled) input'))
  }
}