import { AdminPluginPage } from '../po/admin-plugin.po'
import { LoginPage } from '../po/login.po'
import { VideoUploadPage } from '../po/video-upload.po'
-import { getCheckbox, waitServerUp } from '../utils'
+import { getCheckbox, isMobileDevice, waitServerUp } from '../utils'
describe('Plugins', () => {
let videoUploadPage: VideoUploadPage
})
beforeEach(async () => {
- loginPage = new LoginPage()
+ loginPage = new LoginPage(isMobileDevice())
videoUploadPage = new VideoUploadPage()
adminPluginPage = new AdminPluginPage()
it('Should install hello world plugin', async () => {
await loginPage.loginAsRootUser()
- await adminPluginPage.navigateToSearch()
+ await adminPluginPage.navigateToPluginSearch()
await adminPluginPage.search('hello-world')
await adminPluginPage.installHelloWorld()
await browser.refresh()
it('Should have checkbox in video edit page', async () => {
await videoUploadPage.navigateTo()
- await videoUploadPage.uploadVideo()
+ await videoUploadPage.uploadVideo('video.mp4')
await $('span=Super field 4 in main tab').waitForDisplayed()
it('Should check the checkbox and be able to submit the video', async function () {
const checkbox = await getPluginCheckbox()
+
+ await checkbox.waitForClickable()
await checkbox.click()
await expectSubmitState({ disabled: false })
it('Should uncheck the checkbox and not be able to submit the video', async function () {
const checkbox = await getPluginCheckbox()
+
+ await checkbox.waitForClickable()
await checkbox.click()
await expectSubmitState({ disabled: true })