From 6b88559babc1e0490119a6b52411b10910d9da9d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Nov 2020 09:11:12 +0100 Subject: Fix local e2e tests --- client/e2e/src/po/my-account.ts | 11 +++++++++-- client/e2e/src/po/player.po.ts | 6 ++++++ client/e2e/src/po/video-upload.po.ts | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) (limited to 'client/e2e/src/po') diff --git a/client/e2e/src/po/my-account.ts b/client/e2e/src/po/my-account.ts index a39e5cc58..0255cee16 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.ts index d18d81f16..1bba11171 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.ts index 9eb1e31c1..7de715a95 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')))) } -- cgit v1.2.3