rabbitmq-server/selenium/test/oauth/with-idp-down/landing.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.1 KiB
JavaScript
Raw Normal View History

const { By, Key, until, Builder } = require('selenium-webdriver')
require('chromedriver')
const assert = require('assert')
const { buildDriver, goToHome, teardown, captureScreensFor } = require('../../utils')
2022-06-03 00:13:56 +08:00
const SSOHomePage = require('../../pageobjects/SSOHomePage')
2022-06-03 00:13:56 +08:00
describe('When UAA is down', function () {
let driver
let homePage
let captureScreen
2022-06-03 00:13:56 +08:00
before(async function () {
driver = buildDriver()
await goToHome(driver)
homePage = new SSOHomePage(driver)
2022-08-26 17:57:35 +08:00
captureScreen = captureScreensFor(driver, __filename)
})
2022-06-03 00:13:56 +08:00
it('should display warning message that UAA is down', async function () {
await homePage.isLoaded()
const message = await homePage.getWarning()
2024-02-12 14:38:25 +08:00
assert.equal(true, message.startsWith('OAuth resource [rabbitmq] not available'))
2024-01-03 16:28:36 +08:00
assert.equal(true, message.endsWith(' not reachable'))
})
2022-06-03 00:13:56 +08:00
it('should not be presented with a login button to log in', async function () {
await homePage.isLoaded()
2024-02-12 14:38:25 +08:00
assert.equal(false, await homePage.isLoginButtonVisible())
})
2022-06-03 00:13:56 +08:00
after(async function () {
2022-08-26 17:57:35 +08:00
await teardown(driver, this, captureScreen)
})
2022-06-03 00:13:56 +08:00
})