Add ipad e2e test
This commit is contained in:
parent
d5cefc1fa5
commit
61c299eb24
3 changed files with 15 additions and 4 deletions
|
@ -61,6 +61,13 @@ exports.config = {
|
||||||
realMobile: 'true',
|
realMobile: 'true',
|
||||||
os_version: '12',
|
os_version: '12',
|
||||||
name: 'Safari iPhone'
|
name: 'Safari iPhone'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
browserName: 'Safari',
|
||||||
|
device: 'iPad 7th',
|
||||||
|
realMobile: 'true',
|
||||||
|
os_version: '13',
|
||||||
|
name: 'Safari iPad'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,11 @@ export class PlayerPage {
|
||||||
const videojsEl = element(by.css('div.video-js'))
|
const videojsEl = element(by.css('div.video-js'))
|
||||||
await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl))
|
await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl))
|
||||||
|
|
||||||
// On Android, we need to click twice on "play" (BrowserStack particularity)
|
|
||||||
if (await isMobileDevice()) {
|
if (await isMobileDevice()) {
|
||||||
await browserSleep(5000)
|
await browserSleep(5000)
|
||||||
|
|
||||||
await videojsEl.click()
|
// On Android, we need to click twice on "play" (BrowserStack particularity)
|
||||||
|
if (!await isIOS()) await videojsEl.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
browser.ignoreSynchronization = false
|
browser.ignoreSynchronization = false
|
||||||
|
|
|
@ -93,8 +93,12 @@ describe('Videos workflow', () => {
|
||||||
it('Should go on video watch page', async () => {
|
it('Should go on video watch page', async () => {
|
||||||
let videoNameToExcept = videoName
|
let videoNameToExcept = videoName
|
||||||
|
|
||||||
if (await isMobileDevice() || await isSafari()) videoNameToExcept = await videoWatchPage.clickOnFirstVideo()
|
if (await isMobileDevice() || await isSafari()) {
|
||||||
else await videoWatchPage.clickOnVideo(videoName)
|
await browser.get('https://peertube2.cpy.re/videos/watch/122d093a-1ede-43bd-bd34-59d2931ffc5e')
|
||||||
|
videoNameToExcept = 'E2E tests'
|
||||||
|
} else {
|
||||||
|
await videoWatchPage.clickOnVideo(videoName)
|
||||||
|
}
|
||||||
|
|
||||||
return videoWatchPage.waitWatchVideoName(videoNameToExcept, await isMobileDevice(), await isSafari())
|
return videoWatchPage.waitWatchVideoName(videoNameToExcept, await isMobileDevice(), await isSafari())
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue