mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +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:
parent
3a9b193f68
commit
a08d9e26f0
10 changed files with 48 additions and 27 deletions
46
res/test/e2e/control/control-spec.js
Normal file
46
res/test/e2e/control/control-spec.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
describe('Control Page', function () {
|
||||
var DeviceListPage = require('../devices')
|
||||
var deviceListPage = new DeviceListPage()
|
||||
|
||||
var ControlPage = function () {
|
||||
this.get = function () {
|
||||
browser.get(protractor.getInstance().baseUrl + 'control')
|
||||
}
|
||||
this.kickDeviceButton = element.all(by.css('.kick-device')).first()
|
||||
this.kickDevice = function () {
|
||||
this.openDevicesDropDown()
|
||||
this.kickDeviceButton.click()
|
||||
}
|
||||
this.devicesDropDown = element(by.css('.device-name-text'))
|
||||
this.openDevicesDropDown = function () {
|
||||
this.devicesDropDown.click()
|
||||
}
|
||||
}
|
||||
|
||||
var controlPage = new ControlPage()
|
||||
|
||||
it('should control an usable device', function () {
|
||||
deviceListPage.controlAvailableDevice()
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toMatch(protractor.getInstance().baseUrl + 'control')
|
||||
})
|
||||
})
|
||||
|
||||
it('should have a kick button', function () {
|
||||
expect(controlPage.kickDeviceButton, true)
|
||||
})
|
||||
|
||||
it('should stop controlling an usable device', function () {
|
||||
controlPage.kickDevice()
|
||||
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toBe(protractor.getInstance().baseUrl + 'devices')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Dashboard', function () {
|
||||
describe('Shell', function () {
|
||||
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue