Fix landing.js
This commit is contained in:
parent
d69fc0e8b9
commit
0e759efdf7
|
@ -18,8 +18,7 @@ describe('A user which accesses any protected URL without a session where basic
|
|||
})
|
||||
|
||||
it('should be presented with a login button to log in using OAuth 2.0', async function () {
|
||||
assert.ok(await homePage.getOAuth2Section())
|
||||
console.log("had oauth section")
|
||||
await homePage.getOAuth2Section()
|
||||
assert.equal(await homePage.getLoginButton(), 'Click here to log in')
|
||||
})
|
||||
|
||||
|
@ -34,7 +33,7 @@ describe('A user which accesses any protected URL without a session where basic
|
|||
|
||||
it('should be presented with a login button to log in using Basic Auth', async function () {
|
||||
await homePage.toggleBasicAuthSection()
|
||||
assert.ok(await homePage.isBasicAuthSectionVisible())
|
||||
await homePage.getBasicAuthSection()
|
||||
assert.equal(await homePage.getBasicAuthLoginButton(), 'Login')
|
||||
})
|
||||
|
||||
|
|
|
@ -72,12 +72,15 @@ module.exports = class SSOHomePage extends BasePage {
|
|||
return this.isDisplayed(SECTION_LOGIN_WITH_OAUTH)
|
||||
}
|
||||
async getOAuth2Section() {
|
||||
await this.waitForDisplayed(SECTION_LOGIN_WITH_OAUTH)
|
||||
return this.waitForDisplayed(SECTION_LOGIN_WITH_OAUTH)
|
||||
}
|
||||
async isBasicAuthSectionVisible() {
|
||||
return this.isDisplayed(SECTION_LOGIN_WITH_BASIC_AUTH)
|
||||
|
||||
}
|
||||
async getBasicAuthSection() {
|
||||
return this.waitForDisplayed(SECTION_LOGIN_WITH_BASIC_AUTH)
|
||||
}
|
||||
|
||||
async toggleBasicAuthSection() {
|
||||
await this.click(SECTION_LOGIN_WITH_BASIC_AUTH)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue