mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
22 lines
660 B
JavaScript
22 lines
660 B
JavaScript
describe('Login Page', function() {
|
|
var LoginPage = require('./')
|
|
var loginPage = new LoginPage()
|
|
|
|
beforeEach(function() {
|
|
browser.executeScript('window.localStorage.clear();')
|
|
browser.executeScript('window.sessionStorage.clear();')
|
|
browser.driver.manage().deleteAllCookies()
|
|
})
|
|
|
|
it('should have an url to login', function() {
|
|
expect(loginPage.login.url).toMatch('http')
|
|
})
|
|
|
|
it('should login with method: "' + loginPage.login.method + '"', function() {
|
|
loginPage.doLogin().then(function() {
|
|
browser.getCurrentUrl().then(function(newUrl) {
|
|
expect(newUrl).toBe(browser.baseUrl + 'devices')
|
|
})
|
|
})
|
|
})
|
|
})
|