Clean up E2E tests
This commit is contained in:
parent
108a66f0da
commit
b528582df2
|
@ -1,4 +1,4 @@
|
||||||
import { by, element, browser } from 'protractor'
|
import { browser, by, element } from 'protractor'
|
||||||
|
|
||||||
export class VideoWatchPage {
|
export class VideoWatchPage {
|
||||||
async goOnVideosList (isMobileDevice: boolean, isSafari: boolean) {
|
async goOnVideosList (isMobileDevice: boolean, isSafari: boolean) {
|
||||||
|
@ -41,18 +41,13 @@ export class VideoWatchPage {
|
||||||
.then(seconds => parseInt(seconds, 10))
|
.then(seconds => parseInt(seconds, 10))
|
||||||
}
|
}
|
||||||
|
|
||||||
async pauseVideo (isAutoplay: boolean, isDesktopSafari: boolean) {
|
async pauseVideo (isAutoplay: boolean) {
|
||||||
if (isAutoplay === false) {
|
if (isAutoplay === false) {
|
||||||
const playButton = element(by.css('.vjs-big-play-button'))
|
const playButton = element(by.css('.vjs-big-play-button'))
|
||||||
await browser.wait(browser.ExpectedConditions.elementToBeClickable(playButton))
|
await browser.wait(browser.ExpectedConditions.elementToBeClickable(playButton))
|
||||||
await playButton.click()
|
await playButton.click()
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (isDesktopSafari === true) {
|
|
||||||
// await browser.sleep(1000)
|
|
||||||
// await element(by.css('.vjs-play-control')).click()
|
|
||||||
// }
|
|
||||||
|
|
||||||
await browser.sleep(1000)
|
await browser.sleep(1000)
|
||||||
await browser.wait(browser.ExpectedConditions.invisibilityOf(element(by.css('.vjs-loading-spinner'))))
|
await browser.wait(browser.ExpectedConditions.invisibilityOf(element(by.css('.vjs-loading-spinner'))))
|
||||||
|
|
||||||
|
|
|
@ -66,14 +66,14 @@ describe('Videos workflow', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should play the video', async () => {
|
it('Should play the video', async () => {
|
||||||
await videoWatchPage.pauseVideo(!isMobileDevice, isSafari && isMobileDevice === false)
|
await videoWatchPage.pauseVideo(!isMobileDevice)
|
||||||
expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
|
expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should watch the associated embed video', async () => {
|
it('Should watch the associated embed video', async () => {
|
||||||
await videoWatchPage.goOnAssociatedEmbed()
|
await videoWatchPage.goOnAssociatedEmbed()
|
||||||
|
|
||||||
await videoWatchPage.pauseVideo(false, isSafari && isMobileDevice === false)
|
await videoWatchPage.pauseVideo(false)
|
||||||
expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
|
expect(videoWatchPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue