mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-14 05:17:34 +00:00
fix: format
This commit is contained in:
@@ -3,9 +3,9 @@ import { test as base, expect } from "@playwright/test";
|
|||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { loginname } from "./loginname";
|
import { loginname } from "./loginname";
|
||||||
|
import { startOIDC } from "./oidc";
|
||||||
import { password } from "./password";
|
import { password } from "./password";
|
||||||
import { PasswordUser } from "./user";
|
import { PasswordUser } from "./user";
|
||||||
import {startOIDC} from "./oidc";
|
|
||||||
|
|
||||||
// Read from ".env" file.
|
// Read from ".env" file.
|
||||||
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
|
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
|
||||||
@@ -30,8 +30,8 @@ const test = base.extend<{ user: PasswordUser }>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("oidc username and password login", async ({ user, page }) => {
|
test("oidc username and password login", async ({ user, page }) => {
|
||||||
await startOIDC(page)
|
await startOIDC(page);
|
||||||
await loginname(page, user.getUsername());
|
await loginname(page, user.getUsername());
|
||||||
await password(page, user.getPassword());
|
await password(page, user.getPassword());
|
||||||
await expect(page.locator('pre')).toContainText(user.getUsername());
|
await expect(page.locator("pre")).toContainText(user.getUsername());
|
||||||
});
|
});
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { expect, Page } from "@playwright/test";
|
import { Page } from "@playwright/test";
|
||||||
|
|
||||||
export async function startOIDC(page: Page) {
|
export async function startOIDC(page: Page) {
|
||||||
await page.goto("http://localhost:8000/login");
|
await page.goto("http://localhost:8000/login");
|
||||||
|
@@ -1,12 +1,8 @@
|
|||||||
import { faker } from "@faker-js/faker";
|
import { faker } from "@faker-js/faker";
|
||||||
import {expect, test as base} from "@playwright/test";
|
import { test as base } from "@playwright/test";
|
||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { loginname } from "./loginname";
|
|
||||||
import { password } from "./password";
|
|
||||||
import { PasswordUser } from "./user";
|
import { PasswordUser } from "./user";
|
||||||
import {startSAML} from "./saml";
|
|
||||||
import {selectNewAccount} from "./select-account";
|
|
||||||
|
|
||||||
// Read from ".env" file.
|
// Read from ".env" file.
|
||||||
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
|
dotenv.config({ path: path.resolve(__dirname, ".env.local") });
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { expect, Page } from "@playwright/test";
|
import { Page } from "@playwright/test";
|
||||||
|
|
||||||
export async function startSAML(page: Page) {
|
export async function startSAML(page: Page) {
|
||||||
await page.goto("http://localhost:8001/hello");
|
await page.goto("http://localhost:8001/hello");
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Page } from "@playwright/test";
|
import { Page } from "@playwright/test";
|
||||||
|
|
||||||
export async function selectNewAccount(page: Page) {
|
export async function selectNewAccount(page: Page) {
|
||||||
await page.getByRole('link', {name: 'Add another account'}).click();
|
await page.getByRole("link", { name: "Add another account" }).click();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user