]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/e2e/src/po/login.po.ts
Add videos e2e tests
[github/Chocobozzz/PeerTube.git] / client / e2e / src / po / login.po.ts
diff --git a/client/e2e/src/po/login.po.ts b/client/e2e/src/po/login.po.ts
new file mode 100644 (file)
index 0000000..ada52cb
--- /dev/null
@@ -0,0 +1,14 @@
+import { browser, element, by } from 'protractor'
+
+export class LoginPage {
+  async loginAsRootUser () {
+    await browser.get('/login')
+
+    element(by.css('input#username')).sendKeys('root')
+    element(by.css('input#password')).sendKeys('test1')
+
+    await element(by.css('form input[type=submit]')).click()
+
+    return browser.wait(browser.ExpectedConditions.urlContains('/videos/'))
+  }
+}