From 3cf198e4f4ea0de47a54268ff50c120e64e721e5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Sun, 10 May 2020 10:36:42 +0200 Subject: Fix E2E tests --- client/e2e/src/po/video-watch.po.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'client/e2e') diff --git a/client/e2e/src/po/video-watch.po.ts b/client/e2e/src/po/video-watch.po.ts index c06b131b6..a6efae288 100644 --- a/client/e2e/src/po/video-watch.po.ts +++ b/client/e2e/src/po/video-watch.po.ts @@ -73,7 +73,10 @@ export class VideoWatchPage { } async clickOnVideo (videoName: string) { - const video = element(by.css('.videos .video-miniature .video-thumbnail[title="' + videoName + '"]')) + const video = element.all(by.css('.videos .video-miniature .video-miniature-name')) + .filter(e => e.getText().then(t => t === videoName )) + .first() + await browser.wait(browser.ExpectedConditions.elementToBeClickable(video)) await video.click() @@ -148,7 +151,7 @@ export class VideoWatchPage { private getVideoNameElement () { // We have 2 video info name block, pick the first that is not empty - return element.all(by.css('.video-bottom .video-info-name')) + return element.all(by.css('.video-info-first-row .video-info-name')) .filter(e => e.getText().then(t => !!t)) .first() } -- cgit v1.2.3