1
0
forked from baron/baron-sso

test: raise frontend coverage baselines

This commit is contained in:
2026-05-29 14:31:10 +09:00
parent 592c1d1741
commit 3e31fdfa0c
50 changed files with 3482 additions and 214 deletions

View File

@@ -208,11 +208,6 @@ test.describe("UserFront login performance budget", () => {
...cold.cacheControlByPath,
...warm.cacheControlByPath,
]);
const contentEncodingByPath = new Map([
...cold.contentEncodingByPath,
...warm.contentEncodingByPath,
]);
const appShellCache = cacheControlByPath.get("/ko/signin") ?? "";
expect(appShellCache).toContain("no-cache");
const serviceWorkerState = await page.evaluate(async () => {

View File

@@ -314,7 +314,7 @@ async function mockAuthApis(
}
if (path.endsWith("/api/v1/user/me")) {
const authHeader = route.request().headers()["authorization"] ?? "";
const authHeader = route.request().headers().authorization ?? "";
if (!authHeader.startsWith("Bearer ")) {
await route.fulfill({
status: 401,

View File

@@ -261,7 +261,7 @@ async function mockProfileApis(page: Page, state: ProfileState): Promise<void> {
const method = request.method().toUpperCase();
if (path.endsWith("/api/v1/user/me") && method === "GET") {
const authHeader = request.headers()["authorization"] ?? "";
const authHeader = request.headers().authorization ?? "";
if (!authHeader.startsWith("Bearer ")) {
await route.fulfill({
status: 401,

View File

@@ -16,7 +16,7 @@ async function mockInventoryApis(page: Page): Promise<void> {
const method = route.request().method().toUpperCase();
if (path.endsWith("/api/v1/user/me")) {
const authHeader = route.request().headers()["authorization"] ?? "";
const authHeader = route.request().headers().authorization ?? "";
if (authHeader.startsWith("Bearer ")) {
await route.fulfill({
status: 200,

View File

@@ -23,23 +23,6 @@ function ensureCredentials(): void {
}
}
async function enableFlutterAccessibility(page: Page): Promise<void> {
await page.waitForTimeout(300);
const button = page.getByRole("button", { name: "Enable accessibility" });
if (await button.count()) {
try {
await button.click({ force: true });
} catch {
return;
}
const placeholder = page.locator("flt-semantics-placeholder");
if (await placeholder.count()) {
await placeholder.first().click({ force: true });
}
await page.waitForTimeout(800);
}
}
async function clickPasswordTab(page: Page): Promise<void> {
await page.waitForTimeout(900);
const pane = page.locator("flt-glass-pane");