aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/e2e/src/po/admin-plugin.po.ts
blob: 0259f34d6c6cc0a6a939186dd2c23e5d9cfd52fb (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 navigateToPluginSearch () {
    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()
  }
}