G7 증명과 G8 clean-head 승격 준비
This commit is contained in:
parent
94c681d450
commit
5221f79e3f
52 changed files with 6876 additions and 506 deletions
|
|
@ -2,11 +2,12 @@ import http, { type Server } from "node:http";
|
|||
import { promises as fs } from "node:fs";
|
||||
import { AddressInfo } from "node:net";
|
||||
import path from "node:path";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { fileURLToPath, pathToFileURL } from "node:url";
|
||||
import { expect, test, type Page } from "@playwright/test";
|
||||
import { expectNoHorizontalOverflow } from "./support";
|
||||
|
||||
const repoRoot = path.resolve(process.cwd(), "..", "..");
|
||||
const specDir = path.dirname(fileURLToPath(import.meta.url));
|
||||
const repoRoot = path.resolve(specDir, "..", "..", "..");
|
||||
const dashboardPath = path.join(repoRoot, "docs", "dev_dashboard.html");
|
||||
|
||||
interface StaticServer {
|
||||
|
|
@ -144,8 +145,8 @@ async function readMetrics(page: Page): Promise<DashboardMetrics> {
|
|||
|
||||
function expectDerivedMetrics(metrics: DashboardMetrics) {
|
||||
expect(metrics.total).toBeGreaterThan(0);
|
||||
expect(metrics.done).toBe(33);
|
||||
expect(metrics.doing).toBe(2);
|
||||
expect(metrics.done).toBe(32);
|
||||
expect(metrics.doing).toBe(3);
|
||||
expect(metrics.planned).toBe(0);
|
||||
expect(metrics.total).toBe(metrics.done + metrics.doing + metrics.planned);
|
||||
expect(metrics.ownerBoard).toBe(
|
||||
|
|
@ -336,6 +337,30 @@ test.describe("dev dashboard static command center", () => {
|
|||
await page.setViewportSize(viewport);
|
||||
await openDashboard(page, `http://localhost:${staticServer.port}/docs/dev_dashboard.html`);
|
||||
await expectNoHorizontalOverflow(page);
|
||||
|
||||
const pulseDetails = page.locator(".pulse-details");
|
||||
await expect(pulseDetails).toHaveJSProperty("open", false);
|
||||
await pulseDetails.locator("summary").click();
|
||||
await expect(pulseDetails).toHaveJSProperty("open", true);
|
||||
await expect(pulseDetails).toContainText("detached clean release와 exact Git commit/tree");
|
||||
await pulseDetails.locator("summary").click();
|
||||
await expect(pulseDetails).toHaveJSProperty("open", false);
|
||||
|
||||
if (viewport.width <= 760) {
|
||||
const controlHeights = await page
|
||||
.locator(".owner-pill, .fbtn, .tab-button, .dg-link, .pulse-details summary")
|
||||
.evaluateAll((controls) =>
|
||||
controls.map((control) => Math.ceil(control.getBoundingClientRect().height)),
|
||||
);
|
||||
expect(controlHeights.length).toBeGreaterThan(0);
|
||||
expect(controlHeights.every((height) => height >= 44)).toBe(true);
|
||||
|
||||
const firstScreenPositions = await page.locator("#phase-rail, .kpis").evaluateAll((regions) =>
|
||||
regions.map((region) => Math.floor(region.getBoundingClientRect().top)),
|
||||
);
|
||||
expect(firstScreenPositions).toHaveLength(2);
|
||||
expect(firstScreenPositions.every((top) => top < viewport.height)).toBe(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue