mirror of https://github.com/Chocobozzz/PeerTube
Fix local e2e tests
parent
4a7f90248b
commit
6b88559bab
|
@ -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 () {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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'))))
|
||||
}
|
||||
|
|
|
@ -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');`)
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -6,6 +6,7 @@ npm run clean:server:test
|
|||
|
||||
(
|
||||
cd client
|
||||
npm run webdriver-manager -- update
|
||||
npm run webpack -- --config webpack/webpack.video-embed.js --mode development
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue