X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fe2e%2Fsrc%2Fpo%2Flogin.po.ts;h=20412ee0d5a3b1a629d122f6821b60d4119b6d92;hb=4d7ce9218a3f695bf3d013cbdce1c5c6a5221927;hp=5a36fd611f4c731f7c076d3c6669e0f28a8819e4;hpb=cd4d7a2ca868209fb1e2dbd790c1e5d6cca77e86;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts index 5a36fd611..20412ee0d 100644 --- a/client/e2e/src/po/login.po.ts +++ b/client/e2e/src/po/login.po.ts @@ -4,11 +4,20 @@ export class LoginPage { async loginAsRootUser () { await browser.get('/login') - await element(by.css('input#username')).sendKeys('root') - await element(by.css('input#password')).sendKeys('test1') + 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') + + await browser.sleep(1000) await element(by.css('form input[type=submit]')).click() - return browser.wait(browser.ExpectedConditions.urlContains('/videos/')) + expect(this.getLoggedInInfo().getText()).toContain('root') + } + + private getLoggedInInfo () { + return element(by.css('.logged-in-display-name')) } }