mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-21 16:25:13 +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:
@@ -1,5 +1,5 @@
|
||||
describe('Control Page', function () {
|
||||
var DeviceListPage = require('./app-devices')
|
||||
var DeviceListPage = require('../devices')
|
||||
var deviceListPage = new DeviceListPage()
|
||||
|
||||
var ControlPage = function () {
|
||||
@@ -8,8 +8,13 @@ describe('Control Page', function () {
|
||||
}
|
||||
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()
|
||||
@@ -25,13 +30,13 @@ describe('Control Page', 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')
|
||||
// })
|
||||
//})
|
||||
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 () {
|
||||
@@ -1,7 +1,7 @@
|
||||
describe('Device Page', function () {
|
||||
describe('List', function () {
|
||||
|
||||
var DeviceListPage = require('./app-devices')
|
||||
var DeviceListPage = require('./')
|
||||
var deviceListPage = new DeviceListPage()
|
||||
|
||||
it('should go to Devices List page', function () {
|
||||
@@ -1,5 +1,5 @@
|
||||
describe('Login Page', function () {
|
||||
var LoginPage = require('./app-login')
|
||||
var LoginPage = require('./')
|
||||
var loginPage = new LoginPage()
|
||||
|
||||
it('should login with auth-mock', function () {
|
||||
Reference in New Issue
Block a user