mirror of https://github.com/Chocobozzz/PeerTube
Fix E2E tests
parent
9929fbd6f4
commit
51b66ea7cb
|
@ -1,16 +0,0 @@
|
|||
import { browser, by, element } from 'protractor'
|
||||
|
||||
export class AppPage {
|
||||
|
||||
async closeWelcomeModal () {
|
||||
const firstHandle = await browser.getWindowHandle()
|
||||
|
||||
if (await element(by.css('.configure-instance-button')).isPresent() === false) return
|
||||
|
||||
await element(by.css('.configure-instance-button')).click()
|
||||
|
||||
await browser.sleep(5000)
|
||||
|
||||
await browser.switchTo().window(firstHandle)
|
||||
}
|
||||
}
|
|
@ -4,6 +4,9 @@ export class LoginPage {
|
|||
async loginAsRootUser () {
|
||||
await browser.get('/login')
|
||||
|
||||
await browser.executeScript(`window.localStorage.setItem('no_instance_config_warning_modal', 'true')`)
|
||||
await browser.executeScript(`window.localStorage.setItem('no_welcome_modal', 'true')`)
|
||||
|
||||
element(by.css('input#username')).sendKeys('root')
|
||||
element(by.css('input#password')).sendKeys('test1')
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ export class MyAccountPage {
|
|||
}
|
||||
|
||||
validRemove () {
|
||||
return element(by.css('.action-button-submit')).click()
|
||||
return element(by.css('input[type=submit]')).click()
|
||||
}
|
||||
|
||||
countVideos (names: string[]) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { browser } from 'protractor'
|
||||
import { AppPage } from './po/app.po'
|
||||
import { LoginPage } from './po/login.po'
|
||||
import { MyAccountPage } from './po/my-account'
|
||||
import { PlayerPage } from './po/player.po'
|
||||
|
@ -23,7 +22,6 @@ describe('Videos workflow', () => {
|
|||
let videoUpdatePage: VideoUpdatePage
|
||||
let myAccountPage: MyAccountPage
|
||||
let loginPage: LoginPage
|
||||
let appPage: AppPage
|
||||
let playerPage: PlayerPage
|
||||
|
||||
let videoName = new Date().getTime() + ' video'
|
||||
|
@ -37,7 +35,6 @@ describe('Videos workflow', () => {
|
|||
videoUpdatePage = new VideoUpdatePage()
|
||||
myAccountPage = new MyAccountPage()
|
||||
loginPage = new LoginPage()
|
||||
appPage = new AppPage()
|
||||
playerPage = new PlayerPage()
|
||||
|
||||
if (await isIOS()) {
|
||||
|
@ -66,12 +63,6 @@ describe('Videos workflow', () => {
|
|||
return loginPage.loginAsRootUser()
|
||||
})
|
||||
|
||||
it('Should close the welcome modal', async () => {
|
||||
if (await skipIfUploadNotSupported()) return
|
||||
|
||||
await appPage.closeWelcomeModal()
|
||||
})
|
||||
|
||||
it('Should upload a video', async () => {
|
||||
if (await skipIfUploadNotSupported()) return
|
||||
|
||||
|
|
Loading…
Reference in New Issue