Skip to content

Commit 31ac792

Browse files
Fix test when idp is down
1 parent 9d9b2f2 commit 31ac792

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

deps/rabbitmq_management/priv/www/js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ function removeDuplicates(array){
2828
return output
2929
}
3030
function warningMessageOAuthResource(oauthResource, reason) {
31-
return "OAuth resource <b>" + (oauthResource["label"] != null ? oauthResource.label : oauthResource.id) +
32-
"</b> not available. OpenId Discovery endpoint " + readiness_url(oauthResource) + reason
31+
return "OAuth resource [<b>" + (oauthResource["label"] != null ? oauthResource.label : oauthResource.id) +
32+
"</b>] not available. OpenId Discovery endpoint " + readiness_url(oauthResource) + reason
3333
}
3434
function warningMessageOAuthResources(commonProviderURL, oauthResources, reason) {
3535
return "OAuth resources [ <b>" + oauthResources.map(resource => resource["label"] != null ? resource.label : resource.id).join("</b>,<b>")

deps/rabbitmq_management/selenium/test/oauth/with-basic-auth-idp-down/landing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('When basic authentication is enabled but UAA is down', function () {
2020
it('should display warning message that UAA is down', async function () {
2121
await homePage.isLoaded()
2222
const message = await homePage.getWarning()
23-
assert.equal(true, message.startsWith('OAuth resource is not available'))
23+
assert.equal(true, message.startsWith('OAuth resource [rabbitmq] not available'))
2424
assert.equal(true, message.endsWith(' not reachable'))
2525
})
2626

deps/rabbitmq_management/selenium/test/oauth/with-idp-down/landing.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ describe('When UAA is down', function () {
2020
it('should display warning message that UAA is down', async function () {
2121
await homePage.isLoaded()
2222
const message = await homePage.getWarning()
23-
assert.equal(true, message.startsWith('OAuth resource not available'))
23+
assert.equal(true, message.startsWith('OAuth resource [rabbitmq] not available'))
2424
assert.equal(true, message.endsWith(' not reachable'))
2525
})
2626

2727
it('should not be presented with a login button to log in', async function () {
2828
await homePage.isLoaded()
29-
if (await homePage.getLoginButton()) {
30-
throw new Error('Login buttton is present')
31-
}
29+
assert.equal(false, await homePage.isLoginButtonVisible())
3230
})
3331

3432
after(async function () {

0 commit comments

Comments
 (0)