Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/playwright/configs/dashboard-views.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { existsSync } from "node:fs";
import { defineConfig } from "@playwright/test";
import { maximumDashboardAssessmentTimeoutMs } from "../../e2e/dashboard-view-assessment.mjs";

const chromiumExecutable = existsSync("/usr/bin/chromium") ? "/usr/bin/chromium" : undefined;

export default defineConfig({
testDir: "../../e2e",
testMatch: ["**/dashboard-views-live.spec.mjs"],
outputDir: "../../../test-results/playwright-dashboard-views",
timeout: 180_000,
timeout: maximumDashboardAssessmentTimeoutMs,
workers: 1,
preserveOutput: "always",
use: {
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/dashboard-view-assessment.test.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import assert from "node:assert/strict";
import { test } from "node:test";
import dashboardViewsConfig from "../playwright/configs/dashboard-views.config.mjs";
import {
dashboardAssessmentPageBudgetMs,
dashboardAssessmentStartupBudgetMs,
Expand Down Expand Up @@ -77,6 +78,10 @@ test("grows the assessment timeout with the number of selected views", () => {
assert.equal(dashboardAssessmentTimeout(10_000), maximumDashboardAssessmentTimeoutMs);
});

test("configures Playwright with the bounded assessment timeout", () => {
assert.equal(dashboardViewsConfig.timeout, maximumDashboardAssessmentTimeoutMs);
});

test("ignores request aborts caused by closing an assessed page", () => {
assert.equal(isExpectedPageCloseAbort("net::ERR_ABORTED", true), true);
assert.equal(isExpectedPageCloseAbort("net::ERR_ABORTED", false), false);
Expand Down
Loading