Fix E2E tests
authorChocobozzz <me@florianbigard.com>
Sun, 10 May 2020 08:36:42 +0000 (10:36 +0200)
committerChocobozzz <me@florianbigard.com>
Sun, 10 May 2020 08:41:55 +0000 (10:41 +0200)
client/e2e/src/po/video-watch.po.ts

index c06b131b65f891cdb55d6d18165ef30f6eac9db5..a6efae2887098f81afa0c1252a97744c51236098 100644 (file)
@@ -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()
   }