Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions selenium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,8 @@ following command:
MOCHA_DOCKER_FILE=\location\of\my\Dockerfile ./run-suites.sh
```

## Issues deploying UAA

If you are not able to successfully run any test case that depends on UAA
because UAA fails to start, make sure you are using VZ emulation in your docker
engine. Without VZ emulation, the uaa docker container cannot start.
10 changes: 7 additions & 3 deletions selenium/test/oauth/with-idp-initiated/happy-login.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ describe('A user with a JWT token', function () {
let overview
let captureScreen
let fakePortal

let username
let password

before(async function () {
username = process.env.MGT_CLIENT_ID_FOR_IDP_INITIATED || 'rabbit_idp_user'
password = process.env.MGT_CLIENT_SECRET_FOR_IDP_INITIATED || 'rabbit_idp_user'
driver = buildDriver()
overview = new OverviewPage(driver)
captureScreen = captureScreensFor(driver, __filename)
fakePortal = new FakePortalPage(driver)
})

it('can log in presenting the token to the /login URL via fakeportal', async function () {
await fakePortal.goToHome("rabbit_idp_user", "rabbit_idp_user")
await fakePortal.goToHome(username, password)
if (!await fakePortal.isLoaded()) {
throw new Error('Failed to load fakePortal')
}
await fakePortal.login()
await overview.isLoaded()
assert.equal(await overview.getUser(), 'User rabbit_idp_user')
assert.equal(await overview.getUser(), 'User ' + username)
})

after(async function () {
Expand Down
9 changes: 7 additions & 2 deletions selenium/test/oauth/with-idp-initiated/unauthorized.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ const FakePortalPage = require('../../pageobjects/FakePortalPage')
describe('A user who accesses the /login URL with a token without scopes for the management UI', function () {
let driver
let captureScreen

let username
let password

before(async function () {
driver = buildDriver()
username = process.env.MGT_UNAUTHORIZED_CLIENT_ID_FOR_IDP_INITIATED || 'producer'
password = process.env.MGT_UNAUTHORIZED_CLIENT_SECRET_FOR_IDP_INITIATED || 'producer_secret'

captureScreen = captureScreensFor(driver, __filename)
fakePortal = new FakePortalPage(driver)
homePage = new SSOHomePage(driver)
await fakePortal.goToHome('producer', 'producer_secret')
await fakePortal.goToHome(username, password)
if (!await fakePortal.isLoaded()) {
throw new Error('Failed to load fakePortal')
}
Expand Down
Loading