forked from baron/baron-sso
test: raise frontend coverage baselines
This commit is contained in:
@@ -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 () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user