mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 14:53:24 +02:00
-Add shell e2e test.
-Add parallel multi browser protractor configuration. -Add screenshot reports. -Add fail fast helper.
This commit is contained in:
@@ -30,6 +30,48 @@ describe('Control Page', function () {
|
||||
expect(controlPage.kickDeviceButton, true)
|
||||
})
|
||||
|
||||
|
||||
describe('Dashboard', function () {
|
||||
var DashboardTab = function () {
|
||||
this.shellInput = element(by.model('command'))
|
||||
this.shellResults = element.all(by.css('.shell-results')).first()
|
||||
|
||||
this.helloString = 'hello adb'
|
||||
this.echoCommand = 'echo "' + this.helloString + '"'
|
||||
this.clearCommand = 'clear'
|
||||
this.openMenuCommand = 'input keyevent 3'
|
||||
|
||||
this.shellExecute = function (command) {
|
||||
this.shellInput.sendKeys(command)
|
||||
this.shellInput.sendKeys(protractor.Key.ENTER)
|
||||
}
|
||||
}
|
||||
var dashboardTab = new DashboardTab()
|
||||
|
||||
describe('Shell', function () {
|
||||
|
||||
it('should echo "hello adb" to the adb shell', function () {
|
||||
expect(dashboardTab.shellInput.isPresent()).toBe(true)
|
||||
|
||||
dashboardTab.shellExecute(dashboardTab.echoCommand)
|
||||
|
||||
expect(dashboardTab.shellResults.getText()).toBe(dashboardTab.helloString)
|
||||
})
|
||||
|
||||
it('should clear adb shell input', function () {
|
||||
dashboardTab.shellExecute(dashboardTab.clearCommand)
|
||||
expect(dashboardTab.shellResults.getText()).toBeFalsy()
|
||||
})
|
||||
|
||||
it('should open and close the menu button trough adb shell', function () {
|
||||
dashboardTab.shellExecute(dashboardTab.openMenuCommand)
|
||||
dashboardTab.shellExecute(dashboardTab.openMenuCommand)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
it('should stop controlling an usable device', function () {
|
||||
controlPage.kickDevice()
|
||||
|
||||
@@ -38,9 +80,5 @@ describe('Control Page', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('Dashboard', function () {
|
||||
describe('Shell', function () {
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user