Skip to content

Commit 65f7bfd

Browse files
committed
test(davinci-client): fix e2e tests
1 parent fc13b5c commit 65f7bfd

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

e2e/davinci-suites/src/middleware.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77
import { expect, test } from '@playwright/test';
88
import { asyncEvents } from './utils/async-events.js';
9+
import { password, username } from './utils/demo-user.js';
910

1011
test('Test middleware on test page', async ({ page }) => {
1112
const networkArray = [];
@@ -24,6 +25,13 @@ test('Test middleware on test page', async ({ page }) => {
2425

2526
await expect(page.getByText('Username/Password Form')).toBeVisible();
2627

28+
await page.getByLabel('Username').fill(username);
29+
await page.getByLabel('Password').fill(password);
30+
31+
await page.getByRole('button', { name: 'Sign On' }).click();
32+
33+
await expect(page.getByText('Complete')).toBeVisible();
34+
2735
const startRequest = networkArray.find((req) => req.url.includes('/authorize'));
2836
const nextRequest = networkArray.find((req) => req.url.includes('/customHTMLTemplate'));
2937

e2e/davinci-suites/src/phone-number-field.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test('Login - add phone device - authenticate with phone device', async ({ page
6565
* Go to page
6666
***/
6767
expect(page.url()).toContain(
68-
'http://localhost:5829/?clientId=20dd0ed0-bb9b-4c8f-9a60-9ebeb4b348e',
68+
'http://localhost:5829/?clientId=20dd0ed0-bb9b-4c8f-9a60-9ebeb4b348e0',
6969
);
7070

7171
/**

packages/protect/src/lib/protect.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ declare global {
4141
* @param {ProtectConfig} options - the configuration options for the PingOne Signals SDK
4242
* @returns {Promise<Protect>} - a set of methods to interact with the PingOne Signals SDK
4343
*/
44-
// TODO: Handle initialization errors
45-
// TODO: changeset?
4644
export function protect(options: ProtectConfig): Protect {
4745
let protectApiInitialized = false;
4846

0 commit comments

Comments
 (0)