Skip to content

Commit acf669b

Browse files
authored
minor: test more fields in IdP create e2e (#3206)
Nothing to see here, just clearing out old todo list items now that it's trivial to have the robot do them.
1 parent 1761f9e commit acf669b

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

mock-api/msw/handlers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,6 +1945,7 @@ export const handlers = makeHandlers({
19451945
'slo_url',
19461946
'sp_client_id',
19471947
'technical_contact_email',
1948+
'group_attribute_name',
19481949
]),
19491950
public_cert,
19501951
...getTimestamps(),

test/e2e/silos.e2e.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,19 @@ test('Identity providers', async ({ page }) => {
241241
await acsUrlCheckbox.click()
242242
await expect(acsUrlField).toHaveValue(acsUrl)
243243

244+
// fill the rest of the form so we can check the values round-trip
245+
await dialog.getByLabel('Description').fill('test provider description')
246+
await dialog.getByLabel('Technical contact email').fill('admin@test-provider.example.com')
247+
await dialog.getByLabel('Service provider client ID').fill('test-sp-client-id')
248+
await dialog
249+
.getByLabel('Single Logout (SLO) URL')
250+
.fill('https://test-provider.example.com/slo')
251+
await dialog.getByLabel('Entity ID').fill('https://test-provider.example.com/entity')
252+
await dialog.getByLabel('Group attribute name').fill('test-groups')
253+
await dialog
254+
.getByLabel('Metadata source URL')
255+
.fill('https://test-provider.example.com/metadata')
256+
244257
await page.getByRole('button', { name: 'Create provider' }).click()
245258

246259
await closeToast(page)
@@ -250,14 +263,28 @@ test('Identity providers', async ({ page }) => {
250263
await expectRowVisible(page.getByRole('table'), {
251264
name: 'test-provider',
252265
Type: 'saml',
253-
description: '',
266+
description: 'test provider description',
254267
})
255268

256269
await page.getByRole('link', { name: 'test-provider' }).click()
257270
await expect(nameField).toHaveValue('test-provider')
258271
await expect(nameField).toBeDisabled()
259272
await expect(acsUrlField).toHaveValue(acsUrl)
260273
await expect(acsUrlField).toBeDisabled()
274+
await expect(dialog.getByLabel('Description')).toHaveValue('test provider description')
275+
await expect(dialog.getByLabel('Technical contact email')).toHaveValue(
276+
'admin@test-provider.example.com'
277+
)
278+
await expect(dialog.getByLabel('Service provider client ID')).toHaveValue(
279+
'test-sp-client-id'
280+
)
281+
await expect(dialog.getByLabel('Single Logout (SLO) URL')).toHaveValue(
282+
'https://test-provider.example.com/slo'
283+
)
284+
await expect(dialog.getByLabel('Entity ID')).toHaveValue(
285+
'https://test-provider.example.com/entity'
286+
)
287+
await expect(dialog.getByLabel('Group attribute name')).toHaveValue('test-groups')
261288
})
262289

263290
test('Silo IP pools', async ({ page }) => {

0 commit comments

Comments
 (0)