mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-17 15:43:25 +02:00
protractor.getInstance() -> browser
This commit is contained in:
@@ -4,7 +4,7 @@ describe('Control Page', function () {
|
||||
|
||||
var ControlPage = function () {
|
||||
this.get = function () {
|
||||
browser.get(protractor.getInstance().baseUrl + 'control')
|
||||
browser.get(browser.baseUrl + 'control')
|
||||
}
|
||||
this.kickDeviceButton = element.all(by.css('.kick-device')).first()
|
||||
this.kickDevice = function () {
|
||||
@@ -27,7 +27,7 @@ describe('Control Page', function () {
|
||||
browser.sleep(500)
|
||||
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toMatch(protractor.getInstance().baseUrl + 'control')
|
||||
expect(newUrl).toMatch(browser.baseUrl + 'control')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -138,7 +138,7 @@ describe('Control Page', function () {
|
||||
waitUrl(/devices/)
|
||||
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toBe(protractor.getInstance().baseUrl + 'devices')
|
||||
expect(newUrl).toBe(browser.baseUrl + 'devices')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ describe('Device Page', function () {
|
||||
it('should go to Devices List page', function () {
|
||||
deviceListPage.get()
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toBe(protractor.getInstance().baseUrl + 'devices')
|
||||
expect(newUrl).toBe(browser.baseUrl + 'devices')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = function DeviceListPage() {
|
||||
this.get = function () {
|
||||
// TODO: Let's get rid off the login first
|
||||
browser.get(protractor.getInstance().baseUrl + 'devices')
|
||||
browser.get(browser.baseUrl + 'devices')
|
||||
}
|
||||
this.devices = element(by.model('tracker.devices'))
|
||||
this.devicesByCss = element.all(by.css('ul.devices-icon-view > li'))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
describe('Help Page', function () {
|
||||
//var HelpPage = function () {
|
||||
// this.get = function () {
|
||||
// browser.get(protractor.getInstance().baseUrl + 'help')
|
||||
// browser.get(browser.baseUrl + 'help')
|
||||
// }
|
||||
//}
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = function LoginPage() {
|
||||
this.login = protractor.getInstance().params.login
|
||||
this.login = browser.params.login
|
||||
|
||||
this.get = function () {
|
||||
return browser.get(this.login.url)
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('Login Page', function () {
|
||||
it('should login with method: "' + loginPage.login.method + '"', function () {
|
||||
loginPage.doLogin().then(function () {
|
||||
browser.getLocationAbsUrl().then(function (newUrl) {
|
||||
expect(newUrl).toBe(protractor.getInstance().baseUrl + 'devices')
|
||||
expect(newUrl).toBe(browser.baseUrl + 'devices')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
describe('Settings Page', function () {
|
||||
//var SettingsPage = function () {
|
||||
// this.get = function () {
|
||||
// browser.get(protractor.getInstance().baseUrl + 'settings')
|
||||
// browser.get(browser.baseUrl + 'settings')
|
||||
// }
|
||||
//}
|
||||
})
|
||||
|
||||
@@ -17,7 +17,7 @@ module.exports.config = {
|
||||
params: {
|
||||
login: {
|
||||
url: process.env.STF_LOGINURL || process.env.STF_URL ||
|
||||
'http://localhost:7120',
|
||||
'http://localhost:7100',
|
||||
username: process.env.STF_USERNAME || 'test_user',
|
||||
email: process.env.STF_EMAIL || 'test_user@login.local',
|
||||
password: process.env.STF_PASSWORD,
|
||||
|
||||
Reference in New Issue
Block a user