-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathauthz-txn-basic-json.test.ts
More file actions
36 lines (33 loc) · 1.16 KB
/
authz-txn-basic-json.test.ts
File metadata and controls
36 lines (33 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
* @forgerock/javascript-sdk
*
* authz-txn-basic-json.test.ts
*
* Copyright (c) 2020 ForgeRock. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
import { test, expect } from '@playwright/test';
import { setupAndGo } from '../utilities/setup-and-go';
test.describe('Test Transaction Authorization flow using JSON response', () => {
test(`Trigger Txn Auth appropriately`, async ({ page, browserName }) => {
const { messageArray } = await setupAndGo(page, browserName, 'authz-txn-basic-json/');
// Test assertions
expect(
messageArray.includes('IG resource requires additional authorization'),
'add. auth required',
).toBe(true);
expect(
messageArray.includes('Request to IG resource successfully responded'),
'successful response',
).toBe(true);
expect(
messageArray.includes('Starting authentication with composite advice'),
'start auth with advice',
).toBe(true);
expect(
messageArray.includes('Continuing authentication with composite advice'),
'continue with advice',
).toBe(true);
});
});