Skip to content

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

Fix E2E tests

Chocobozzz49a6211f253c
diff --git a/client/e2e/src/po/player.po.ts b/client/e2e/src/po/player.po.ts
index 838d1dc520..4bccf1e8c7 100644
--- a/client/e2e/src/po/player.po.ts
+++ b/client/e2e/src/po/player.po.ts
@@ -22,7 +22,7 @@ export class PlayerPage {
}
waitUntilPlayerWrapper () {
- return $('#placeholder-preview').waitForExist()
+ return $('#video-wrapper').waitForExist()
}
waitUntilPlaying () {
diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts
index dd8563822e..b7bc523694 100644
--- a/client/e2e/src/po/video-watch.po.ts
+++ b/client/e2e/src/po/video-watch.po.ts
@@ -150,7 +150,9 @@ export class VideoWatchPage {
async clickOnManage () {
await this.clickOnMoreDropdownIcon()
- const items = $$('.dropdown-menu.show .dropdown-item')
+ // We need the await expression
+ // eslint-disable-next-line @typescript-eslint/await-thenable
+ const items = await $$('.dropdown-menu.show .dropdown-item')
for (const item of items) {
const content = await item.getText()
diff --git a/client/e2e/src/suites-local/nsfw.e2e-spec.ts b/client/e2e/src/suites-local/nsfw.e2e-spec.ts
index a0c209d08b..309a1cb32a 100644
--- a/client/e2e/src/suites-local/nsfw.e2e-spec.ts
+++ b/client/e2e/src/suites-local/nsfw.e2e-spec.ts
@@ -312,12 +312,10 @@ describe('NSFW', () => {
const confirmTitle = videoWatchPage.getModalTitleEl()
await confirmTitle.waitForDisplayed()
- expect(await confirmTitle.getText()).toContain('Mature or explicit content')
+ expect(await confirmTitle.getText()).toContain('Sensitive video')
await videoWatchPage.confirmModal()
await videoWatchPage.waitWatchVideoName(nsfwVideo)
-
- await playerPage.waitUntilPlaying()
})
it('Should correctly handle blur', async () => {
diff --git a/client/e2e/src/suites-local/publish.e2e-spec.ts b/client/e2e/src/suites-local/publish.e2e-spec.ts
index 386c030194..152511a321 100644
--- a/client/e2e/src/suites-local/publish.e2e-spec.ts
+++ b/client/e2e/src/suites-local/publish.e2e-spec.ts
@@ -1,7 +1,7 @@
import { LoginPage } from '../po/login.po'
import { VideoPublishPage } from '../po/video-publish.po'
import { VideoWatchPage } from '../po/video-watch.po'
-import { getScreenshotPath, isMobileDevice, isSafari, waitServerUp } from '../utils'
+import { browserSleep, getScreenshotPath, isMobileDevice, isSafari, waitServerUp } from '../utils'
describe('Publish video', () => {
let videoPublishPage: VideoPublishPage
@@ -54,16 +54,16 @@ describe('Publish video', () => {
await videoPublishPage.refresh('scheduled')
- // check if works? screenshot
expect(videoPublishPage.getScheduleInput()).toBeDisplayed()
const nextDay = new Date()
- nextDay.setDate(nextDay.getDate() + 1)
+ nextDay.setDate(1)
+ nextDay.setMonth(nextDay.getMonth() + 1)
const inputDate = new Date(await videoPublishPage.getScheduleInput().getValue())
- expect(nextDay.getDate()).toEqual(inputDate.getDate())
- expect(nextDay.getMonth()).toEqual(inputDate.getMonth())
- expect(nextDay.getFullYear()).toEqual(inputDate.getFullYear())
+ expect(inputDate.getDate()).toEqual(nextDay.getDate())
+ expect(inputDate.getMonth()).toEqual(nextDay.getMonth())
+ expect(inputDate.getFullYear()).toEqual(nextDay.getFullYear())
})
})