-
-
Notifications
You must be signed in to change notification settings - Fork 954
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bump database versions in tests and fix app-login e2e test
- Loading branch information
Showing
7 changed files
with
24 additions
and
20 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
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
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
docker rm -f kratos_test_database_mysql kratos_test_database_postgres kratos_test_database_cockroach kratos_test_hydra || true | ||
docker run --platform linux/amd64 --name kratos_test_database_mysql -p 3444:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:8.0.34 | ||
docker run --platform linux/amd64 --name kratos_test_database_postgres -p 3445:5432 -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=postgres -d postgres:11.8 postgres -c log_statement=all | ||
docker run --platform linux/amd64 --name kratos_test_database_cockroach -p 3446:26257 -p 3447:8080 -d cockroachdb/cockroach:v22.2.6 start-single-node --insecure | ||
docker run --platform linux/amd64 --name kratos_test_hydra -p 4444:4444 -p 4445:4445 -d -e DSN=memory -e URLS_SELF_ISSUER=http://localhost:4444/ -e URLS_LOGIN=http://localhost:4446/login -e URLS_CONSENT=http://localhost:4446/consent oryd/hydra:v2.0.2 serve all --dev | ||
docker run --name kratos_test_database_mysql -p 3444:3306 -e MYSQL_ROOT_PASSWORD=secret -d mysql:8.0 | ||
docker run --name kratos_test_database_postgres -p 3445:5432 -e POSTGRES_PASSWORD=secret -e POSTGRES_DB=postgres -d postgres:14 postgres -c log_statement=all | ||
docker run --name kratos_test_database_cockroach -p 3446:26257 -p 3447:8080 -d cockroachdb/cockroach:v22.2.6 start-single-node --insecure | ||
docker run --name kratos_test_hydra -p 4444:4444 -p 4445:4445 -d -e DSN=memory -e URLS_SELF_ISSUER=http://localhost:4444/ -e URLS_LOGIN=http://localhost:4446/login -e URLS_CONSENT=http://localhost:4446/consent oryd/hydra:v2.0.2 serve all --dev | ||
|
||
source script/test-envs.sh |
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 |
---|---|---|
|
@@ -19,6 +19,7 @@ async function performOidcLogin(popup: Page, username: string) { | |
async function rejectOidcLogin(popup: Page) { | ||
await popup.waitForLoadState() | ||
await popup.getByRole("button", { name: "reject" }).click() | ||
await expect(popup.getByText("login rejected request").first()).toBeVisible() | ||
await popup.close() | ||
} | ||
|
||
|
@@ -65,14 +66,13 @@ test.describe("Registration", () => { | |
await page.goto("Registration") | ||
|
||
let popupPromise = page.waitForEvent("popup") | ||
await page.getByText(/sign (up|in) with ory/i).click() | ||
await page.getByText(/sign up with ory/i).click() | ||
let popup = await popupPromise | ||
|
||
await rejectOidcLogin(popup) | ||
|
||
await expect(page.getByText("login rejected request")).toBeVisible() | ||
popupPromise = page.waitForEvent("popup") | ||
await page.getByText(/continue/i).click() | ||
await page.getByText(/sign up with ory/i).click() | ||
popup = await popupPromise | ||
await performOidcLogin(popup, "[email protected]") | ||
|
||
|
@@ -99,12 +99,11 @@ test.describe("Login", () => { | |
await page.goto("Login") | ||
|
||
let popupPromise = page.waitForEvent("popup") | ||
await page.getByText(/sign (up|in) with ory/i).click() | ||
await page.getByText(/sign in with ory/i).click() | ||
let popup = await popupPromise | ||
|
||
await rejectOidcLogin(popup) | ||
|
||
await expect(page.getByText("login rejected request")).toBeVisible() | ||
popupPromise = page.waitForEvent("popup") | ||
await page.getByText(/sign in with ory/i).click() | ||
popup = await popupPromise | ||
|
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
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