aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/admin-plugin.po.ts
blob: 6a3f3cf28f2b63eacbbc637b9e2542f6641c07be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { browserSleep, go } from '../utils'

export class AdminPluginPage {

  async navigateToSearch () {
    await go('/admin/plugins/search')

    await $('my-plugin-search').waitForDisplayed()
  }

  async search (name: string) {
    const input = $('.search-bar input')
    await input.waitForDisplayed()
    await input.clearValue()
    await input.setValue(name)

    await browserSleep(1000)
  }

  async installHelloWorld () {
    $('.plugin-name=hello-world').waitForDisplayed()

    await $('.card-body my-button[icon=cloud-download]').click()

    const submitModalButton = $('.modal-content input[type=submit]')
    await submitModalButton.waitForClickable()
    await submitModalButton.click()

    await $('.card-body my-edit-button').waitForDisplayed()
  }
}