Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import type { Page } from "@playwright/test";
|
||||
|
||||
export type OperatorCheckpointId = "starter-addon-checkout" | "domain-ownership-txt" | "domain-setup-checkout";
|
||||
|
||||
type OperatorCheckpointTestInfo = {
|
||||
readonly project: {
|
||||
readonly use: {
|
||||
readonly headless?: boolean;
|
||||
};
|
||||
};
|
||||
readonly annotations: Array<{ type: string; description?: string }>;
|
||||
};
|
||||
|
||||
export async function pauseForOperatorCheckpoint(
|
||||
page: Pick<Page, "pause">,
|
||||
testInfo: OperatorCheckpointTestInfo,
|
||||
checkpoint: OperatorCheckpointId,
|
||||
env: NodeJS.ProcessEnv = process.env
|
||||
): Promise<boolean> {
|
||||
const configured = env.E2E_OPERATOR_CHECKPOINTS?.trim();
|
||||
if (!configured || configured === "0") return false;
|
||||
if (configured !== "1") {
|
||||
throw new Error("E2E_OPERATOR_CHECKPOINTS must be unset, 0, or 1.");
|
||||
}
|
||||
if (env.CI?.trim()) {
|
||||
throw new Error("E2E_OPERATOR_CHECKPOINTS is forbidden in CI.");
|
||||
}
|
||||
if (testInfo.project.use.headless !== false) {
|
||||
throw new Error("E2E_OPERATOR_CHECKPOINTS requires a headed Playwright run.");
|
||||
}
|
||||
|
||||
testInfo.annotations.push({ type: "operator-checkpoint", description: checkpoint });
|
||||
await page.pause();
|
||||
return true;
|
||||
}
|
||||
Reference in new issue
Block a user