1
0
Fork 0

Fix safari e2e tests

This commit is contained in:
Chocobozzz 2020-05-11 10:48:42 +02:00
parent 3a7a261f33
commit 3a1a00a4af
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 9 additions and 8 deletions

Binary file not shown.

View File

@ -18,17 +18,17 @@ exports.config = {
},
multiCapabilities: [
{
browserName: 'Chrome',
name: 'Latest Chrome Desktop',
resolution: '1280x1024'
},
{
browserName: 'Safari',
version: '11.1',
name: 'Safari Desktop',
resolution: '1280x1024'
},
{
browserName: 'Chrome',
name: 'Latest Chrome Desktop',
resolution: '1280x1024'
},
{
browserName: 'Firefox',
version: '60', // ESR,
@ -61,7 +61,7 @@ exports.config = {
}
],
// maxSessions: 1,
maxSessions: 1,
// BrowserStack compatible ports: https://www.browserstack.com/question/664
baseUrl: 'http://localhost:3333/',
framework: 'jasmine',

View File

@ -84,12 +84,13 @@ export class VideoWatchPage {
}
async clickOnFirstVideo () {
const video = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
const video = element.all(by.css('.videos .video-miniature .video-thumbnail')).first()
const videoName = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
// Don't know why but the expectation fails on Safari
await browser.wait(browser.ExpectedConditions.elementToBeClickable(video))
const textToReturn = video.getText()
const textToReturn = videoName.getText()
await video.click()
await browser.wait(browser.ExpectedConditions.urlContains('/watch/'))