-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix playwright login without keycloak
- Loading branch information
1 parent
0138251
commit eeb1904
Showing
4 changed files
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/leapfrogai_ui/tests/fixtures/2024-08-01T22:12:36.036Z-test.text
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-7.18 KB
src/leapfrogai_ui/tests/fixtures/2024-08-01T22:12:48.842Z-test.docx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,22 +7,22 @@ setup('authenticate', async ({ page }) => { | |
await page.goto('/'); // go to the home page | ||
if (process.env.PUBLIC_DISABLE_KEYCLOAK === 'true') { | ||
// when running in Github CI, create a new account because we don't have seed migrations | ||
const emailField = page.getByLabel('email'); | ||
const passwordField = page.getByLabel('password'); | ||
const emailField = page.getByTestId('email-input'); | ||
const passwordField = page.getByTestId('password-input'); | ||
if (process.env.TEST_ENV === 'CI') { | ||
await emailField.click(); | ||
await emailField.fill('[email protected]'); | ||
await passwordField.click(); | ||
await passwordField.fill('password123'); | ||
await page.getByRole('button', { name: 'Sign Up' }).click(); | ||
await page.getByTestId('submit-btn').click(); | ||
} else { | ||
// uses local supabase test users, logs in directly with Supabase, no Keycloak | ||
await page.getByText('Already have an account? Sign In').click(); | ||
await emailField.click(); | ||
await emailField.fill('[email protected]'); | ||
await passwordField.click(); | ||
await passwordField.fill('password123'); | ||
await page.getByRole('button', { name: 'Sign In' }).click(); | ||
await page.getByTestId('submit-btn').click(); | ||
} | ||
} else { | ||
// With Keycloak | ||
|