mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-21 13:25:17 +02:00
- Refactored e2e tests in separated test suites.
- `gulp protractor` now accepts a `--suite name` flag. - Removed warning bug in ChromeDriver. - ControlPage test now kicks the device.
This commit is contained in:
27
res/test/e2e/login/index.js
Normal file
27
res/test/e2e/login/index.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var loginBaseUrl = 'http://localhost:7120'
|
||||
|
||||
module.exports = function LoginPage() {
|
||||
this.get = function () {
|
||||
return browser.get(loginBaseUrl)
|
||||
}
|
||||
this.name = element(by.model('name'))
|
||||
this.email = element(by.model('email'))
|
||||
this.setName = function (name) {
|
||||
return this.name.sendKeys(name)
|
||||
}
|
||||
this.setEmail = function (email) {
|
||||
return this.email.sendKeys(email)
|
||||
}
|
||||
this.setPassword = function (password) {
|
||||
return this.password.sendKeys(password)
|
||||
}
|
||||
this.submit = function () {
|
||||
return this.name.submit()
|
||||
}
|
||||
this.login = function () {
|
||||
this.get()
|
||||
this.setName('test_user')
|
||||
this.setEmail('test_user@login.local')
|
||||
return this.submit()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user