ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix local e2e tests
Chocobozzz6b88559babc1
diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.tsindex a39e5cc582..0255cee160 100644--- a/client/e2e/src/po/my-account.ts+++ b/client/e2e/src/po/my-account.ts@@ -16,8 +16,15 @@ export class MyAccountPage {// My account Videos- removeVideo (name: string) {- return this.getVideoElement(name).element(by.css('my-delete-button')).click()+ async removeVideo (name: string) {+ const container = this.getVideoElement(name)++ await container.element(by.css('.dropdown-toggle')).click()++ const dropdownMenu = container.element(by.css('.dropdown-menu .dropdown-item:nth-child(2)'))+ await browser.wait(browser.ExpectedConditions.presenceOf(dropdownMenu))++ return dropdownMenu.click()}validRemove () {diff --git a/client/e2e/src/po/player.po.ts b/client/e2e/src/po/player.po.tsindex d18d81f16f..1bba11171e 100644--- a/client/e2e/src/po/player.po.ts+++ b/client/e2e/src/po/player.po.ts@@ -16,6 +16,12 @@ export class PlayerPage {return browser.wait(browser.ExpectedConditions.textToBePresentInElement(elem, text))}+ waitUntilPlayerWrapper () {+ const elem = element(by.css('#video-wrapper'))++ return browser.wait(browser.ExpectedConditions.presenceOf(elem))+ }+async playAndPauseVideo (isAutoplay: boolean) {const videojsEl = element(by.css('div.video-js'))await browser.wait(browser.ExpectedConditions.elementToBeClickable(videojsEl))diff --git a/client/e2e/src/po/video-upload.po.ts b/client/e2e/src/po/video-upload.po.tsindex 9eb1e31c1d..7de715a955 100644--- a/client/e2e/src/po/video-upload.po.ts+++ b/client/e2e/src/po/video-upload.po.ts@@ -4,7 +4,7 @@ import { join } from 'path'export class VideoUploadPage {async navigateTo () {- await element(by.css('.header .upload-button')).click()+ await element(by.css('.header .publish-button')).click()return browser.wait(browser.ExpectedConditions.visibilityOf(element(by.css('.upload-video-container'))))}diff --git a/client/e2e/src/videos.e2e-spec.ts b/client/e2e/src/videos.e2e-spec.tsindex d9d2cb9b99..a73b9f318a 100644--- a/client/e2e/src/videos.e2e-spec.ts+++ b/client/e2e/src/videos.e2e-spec.ts@@ -206,6 +206,8 @@ describe('Videos workflow', () => {await myAccountPage.goOnAssociatedPlaylistEmbed()+ await playerPage.waitUntilPlayerWrapper()+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');`)diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.tsindex c5cb54dddb..75f4bdfe62 100644--- a/client/src/app/app.component.ts+++ b/client/src/app/app.component.ts@@ -1,6 +1,6 @@import { Hotkey, HotkeysService } from 'angular2-hotkeys'import { concat } from 'rxjs'-import { filter, first, map, pairwise, tap } from 'rxjs/operators'+import { filter, first, map, pairwise } from 'rxjs/operators'import { DOCUMENT, PlatformLocation, ViewportScroller } from '@angular/common'import { AfterViewInit, Component, Inject, LOCALE_ID, OnInit, ViewChild } from '@angular/core'import { DomSanitizer, SafeHtml } from '@angular/platform-browser'diff --git a/scripts/e2e/local.sh b/scripts/e2e/local.shindex 40efa3525b..0e74707d85 100755--- a/scripts/e2e/local.sh+++ b/scripts/e2e/local.sh@@ -6,6 +6,7 @@ npm run clean:server:test(cd client+ npm run webdriver-manager -- updatenpm run webpack -- --config webpack/webpack.video-embed.js --mode development)