Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Improve E2E tests

Chocobozzz60c8b8a5d7bb
diff --git a/client/e2e/protractor.conf.js b/client/e2e/protractor.conf.js
index 3fce9b0f53..5682de829c 100644
--- a/client/e2e/protractor.conf.js
+++ b/client/e2e/protractor.conf.js
@@ -12,7 +12,9 @@ exports.config = {
'browserstack.user': process.env.BROWSERSTACK_USER,
'browserstack.key': process.env.BROWSERSTACK_KEY,
'browserstack.local': true,
- project: 'PeerTube'
+ 'browserstack.console': 'info',
+ project: 'PeerTube',
+ name: 'Bstack-[Protractor] Parallel Test'
},
multiCapabilities: [
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts
index a6efae2887..4a36fce62d 100644
--- a/client/e2e/src/po/video-watch.po.ts
+++ b/client/e2e/src/po/video-watch.po.ts
@@ -14,7 +14,7 @@ export class VideoWatchPage {
await browser.get(url)
// Waiting the following element does not work on Safari...
- if (isSafari === true) return browser.sleep(3000)
+ if (isSafari) return browser.sleep(3000)
const elem = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
return browser.wait(browser.ExpectedConditions.visibilityOf(elem))
@@ -84,13 +84,12 @@ export class VideoWatchPage {
}
async clickOnFirstVideo () {
- const video = element.all(by.css('.videos .video-miniature .video-thumbnail')).first()
- const videoName = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
+ const video = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
// Don't know why but the expectation fails on Safari
await browser.wait(browser.ExpectedConditions.elementToBeClickable(video))
- const textToReturn = videoName.getText()
+ const textToReturn = video.getText()
await video.click()
await browser.wait(browser.ExpectedConditions.urlContains('/watch/'))
@@ -106,7 +105,7 @@ export class VideoWatchPage {
}
async goOnP2PMediaLoaderEmbed () {
- return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50?mode=p2p-media-loader')
+ return browser.get('https://peertube2.cpy.re/videos/embed/969bf103-7818-43b5-94a0-de159e13de50')
}
async clickOnUpdate () {
diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.ts
index 075add5315..b2c5ab4c63 100644
--- a/client/e2e/src/videos.e2e-spec.ts
+++ b/client/e2e/src/videos.e2e-spec.ts
@@ -53,6 +53,10 @@ describe('Videos workflow', () => {
if (await isSafari()) {
console.log('Safari detected.')
}
+
+ if (!await isMobileDevice()) {
+ await browser.driver.manage().window().maximize()
+ }
})
it('Should log in', async () => {