if (await isIOS()) {
// iOS does not seem to work with protractor
// https://github.com/angular/protractor/issues/2840
- browser.ignoreSynchronization = true
+ browser.waitForAngularEnabled(false)
console.log('iOS detected')
} else if (await isMobileDevice()) {
})
it('Should watch the associated embed video', async () => {
+ const oldValue = await browser.waitForAngularEnabled()
await browser.waitForAngularEnabled(false)
await videoWatchPage.goOnAssociatedEmbed()
await playerPage.playAndPauseVideo(false)
expect(playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
- await browser.waitForAngularEnabled(true)
+ await browser.waitForAngularEnabled(oldValue)
})
it('Should watch the p2p media loader embed video', async () => {
+ const oldValue = await browser.waitForAngularEnabled()
await browser.waitForAngularEnabled(false)
await videoWatchPage.goOnP2PMediaLoaderEmbed()
await playerPage.playAndPauseVideo(false)
expect(playerPage.getWatchVideoPlayerCurrentTime()).toBeGreaterThanOrEqual(2)
- await browser.waitForAngularEnabled(true)
+ await browser.waitForAngularEnabled(oldValue)
})
it('Should update the video', async () => {
await videoWatchPage.createPlaylist(playlistName)
await videoWatchPage.saveToPlaylist(playlistName)
+ await browser.sleep(5000)
await videoUploadPage.navigateTo()
await myAccountPage.playPlaylist()
+ const oldValue = await browser.waitForAngularEnabled()
await browser.waitForAngularEnabled(false)
await videoWatchPage.waitUntilVideoName(video2Name, 20000 * 1000)
- await browser.waitForAngularEnabled(true)
+ await browser.waitForAngularEnabled(oldValue)
})
it('Should watch the webtorrent playlist in the embed', async () => {
const accessToken = await browser.executeScript(`return window.localStorage.getItem('access_token');`)
const refreshToken = await browser.executeScript(`return window.localStorage.getItem('refresh_token');`)
+ const oldValue = await browser.waitForAngularEnabled()
await browser.waitForAngularEnabled(false)
await myAccountPage.goOnAssociatedPlaylistEmbed()
+ await playerPage.waitUntilPlayerWrapper()
+
+ console.log('Will set %s and %s tokens in local storage.', accessToken, refreshToken)
+
await browser.executeScript(`window.localStorage.setItem('access_token', '${accessToken}');`)
await browser.executeScript(`window.localStorage.setItem('refresh_token', '${refreshToken}');`)
await browser.executeScript(`window.localStorage.setItem('token_type', 'Bearer');`)
await playerPage.waitUntilPlaylistInfo('2/2')
- await browser.waitForAngularEnabled(true)
+ await browser.waitForAngularEnabled(oldValue)
})
it('Should watch the HLS playlist in the embed', async () => {
+ const oldValue = await browser.waitForAngularEnabled()
await browser.waitForAngularEnabled(false)
await videoWatchPage.goOnP2PMediaLoaderPlaylistEmbed()
await playerPage.waitUntilPlaylistInfo('2/2')
- await browser.waitForAngularEnabled(true)
+ await browser.waitForAngularEnabled(oldValue)
})
it('Should delete the video 2', async () => {