- 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:
Gunther Brunner
2014-08-26 15:59:44 +09:00
parent 3a9b193f68
commit a08d9e26f0
10 changed files with 48 additions and 27 deletions

View File

@@ -0,0 +1,23 @@
module.exports = function DeviceListPage() {
this.get = function () {
// TODO: Let's get rid off the login first
browser.get(protractor.getInstance().baseUrl + 'devices')
}
this.devices = element(by.model('tracker.devices'))
this.devicesByCss = element.all(by.css('ul.devices-icon-view > li'))
this.devicesUsable =
element.all(by.css('button.device-status.btn-primary-outline'))
this.searchInput = element(by.model('search.deviceFilter'))
this.filterAvailableDevices = function () {
return this.searchInput.sendKeys('state: "available"')
}
this.numberOfDevices = function () {
return this.devicesByCss.count()
}
this.availableDevice = function () {
return this.devicesUsable.first()
}
this.controlAvailableDevice = function () {
this.availableDevice().click()
}
}