aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/e2e/src/po/admin-plugin.po.ts
blob: 6a3f3cf28f2b63eacbbc637b9e2542f6641c07be (plain) (tree)






























                                                                    
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()
  }
}