1
0
Fork 0

Add ipad e2e test

This commit is contained in:
Chocobozzz 2020-08-07 14:03:46 +02:00
parent d5cefc1fa5
commit 61c299eb24
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 15 additions and 4 deletions

View file

@ -61,6 +61,13 @@ exports.config = {
realMobile: 'true',
os_version: '12',
name: 'Safari iPhone'
},
{
browserName: 'Safari',
device: 'iPad 7th',
realMobile: 'true',
os_version: '13',
name: 'Safari iPad'
}
],

View file

@ -28,11 +28,11 @@ export class PlayerPage {
const videojsEl = element(by.css('div.video-js'))
await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl))
// On Android, we need to click twice on "play" (BrowserStack particularity)
if (await isMobileDevice()) {
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

View file

@ -93,8 +93,12 @@ describe('Videos workflow', () => {
it('Should go on video watch page', async () => {
let videoNameToExcept = videoName
if (await isMobileDevice() || await isSafari()) videoNameToExcept = await videoWatchPage.clickOnFirstVideo()
else await videoWatchPage.clickOnVideo(videoName)
if (await isMobileDevice() || await isSafari()) {
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())
})