protractor.getInstance() -> browser

This commit is contained in:
Vishal Banthia
2015-11-25 02:05:22 +09:00
parent ddc24e5dc5
commit 6ca08d7b90
8 changed files with 10 additions and 10 deletions

View File

@@ -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')
})
})

View File

@@ -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')
})
})

View File

@@ -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'))

View File

@@ -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')
// }
//}
})

View File

@@ -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)

View File

@@ -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')
})
})
})

View File

@@ -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')
// }
//}
})

View File

@@ -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,