refactor(e2e): prendre les types navigateur chez les helpers plutôt que chez playwright
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
type: usage
|
type: usage
|
||||||
summary: What the polyfill's own end-to-end suites call from ng-e2e-helpers, under which constraints, and where the fit still costs them code
|
summary: What the polyfill's own end-to-end suites call from ng-e2e-helpers, under which constraints, and where the fit still costs them code
|
||||||
against: ng-e2e-helpers@1.0.0-dev.1
|
against: ng-e2e-helpers@1.0.0-dev.2
|
||||||
---
|
---
|
||||||
|
|
||||||
# usage_polyfill-e2e — the polyfill's end-to-end suites
|
# usage_polyfill-e2e — the polyfill's end-to-end suites
|
||||||
@@ -34,7 +34,7 @@ Everything else the package exports is offered and NOT consumed here — the scr
|
|||||||
|
|
||||||
## Constraints
|
## Constraints
|
||||||
|
|
||||||
**One Playwright, and the browser types come from the helpers.** These suites import `Frame`, `Page` and `BrowserContext` from `playwright` directly today, which holds only because the package resolves the same copy. The safer form — deriving them from the helpers that return them — is what a consumer in another repository must do, and what this one should adopt.
|
**The browser types come from the helpers.** `Frame`, `Page` and `BrowserContext` are taken from `ng-e2e-helpers`, which re-exports them, rather than from `playwright` directly — so these suites never depend on resolving the same copy of it, which is the position a consumer in another repository is in anyway.
|
||||||
|
|
||||||
**Every suite mints its own physical wallet, per run.** Nothing is carried between runs and no wallet is reused, so a run's result never depends on a previous one. The batch wallet's NAME is stable and its identity is not: two runs sharing the name share nothing else.
|
**Every suite mints its own physical wallet, per run.** Nothing is carried between runs and no wallet is reused, so a run's result never depends on a previous one. The batch wallet's NAME is stable and its identity is not: two runs sharing the name share nothing else.
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
* can circulate.
|
* can circulate.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { type BrowserContext, type Frame, type Page } from "playwright";
|
|
||||||
import { execSync } from "node:child_process";
|
import { execSync } from "node:child_process";
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
@@ -55,7 +54,10 @@ import {
|
|||||||
serveOnEphemeralPort,
|
serveOnEphemeralPort,
|
||||||
setupBrokerPage,
|
setupBrokerPage,
|
||||||
within,
|
within,
|
||||||
|
type BrowserContext,
|
||||||
|
type Frame,
|
||||||
type JourneyDeclaration,
|
type JourneyDeclaration,
|
||||||
|
type Page,
|
||||||
type Prerequisite,
|
type Prerequisite,
|
||||||
type RunProfile,
|
type RunProfile,
|
||||||
} from "ng-e2e-helpers";
|
} from "ng-e2e-helpers";
|
||||||
|
|||||||
@@ -29,8 +29,7 @@
|
|||||||
* shared wallet (as faithfulReconnect does) — and writes from it.
|
* shared wallet (as faithfulReconnect does) — and writes from it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Frame, Page, BrowserContext } from "playwright";
|
import { launchWatchedContext, setupBrokerPage, type RunProfile, type Frame, type Page, type BrowserContext } from "ng-e2e-helpers";
|
||||||
import { launchWatchedContext, setupBrokerPage, type RunProfile } from "ng-e2e-helpers";
|
|
||||||
import { WALLET, buildBundle, mintBatchWallet, serveHarness } from "./harness-page";
|
import { WALLET, buildBundle, mintBatchWallet, serveHarness } from "./harness-page";
|
||||||
|
|
||||||
type Check = { name: string; ok: boolean; detail?: string };
|
type Check = { name: string; ok: boolean; detail?: string };
|
||||||
|
|||||||
@@ -21,8 +21,7 @@
|
|||||||
* Run: `bun run e2e/repro-fresh-wallet.ts`.
|
* Run: `bun run e2e/repro-fresh-wallet.ts`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { Frame, Page, BrowserContext } from "playwright";
|
import { mintWalletProfileKeepingContext, setupBrokerPage, type RunProfile, type Frame, type Page, type BrowserContext } from "ng-e2e-helpers";
|
||||||
import { mintWalletProfileKeepingContext, setupBrokerPage, type RunProfile } from "ng-e2e-helpers";
|
|
||||||
import { WALLET, buildBundle, serveHarness } from "./harness-page";
|
import { WALLET, buildBundle, serveHarness } from "./harness-page";
|
||||||
|
|
||||||
type Check = { name: string; ok: boolean; detail?: string };
|
type Check = { name: string; ok: boolean; detail?: string };
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import type { Frame, Page, BrowserContext } from "playwright";
|
|
||||||
import {
|
import {
|
||||||
armSuiteDeadline,
|
armSuiteDeadline,
|
||||||
closeContext,
|
closeContext,
|
||||||
@@ -27,6 +26,9 @@ import {
|
|||||||
setupBrokerPage,
|
setupBrokerPage,
|
||||||
within,
|
within,
|
||||||
type RunProfile,
|
type RunProfile,
|
||||||
|
type Frame,
|
||||||
|
type Page,
|
||||||
|
type BrowserContext,
|
||||||
} from "ng-e2e-helpers";
|
} from "ng-e2e-helpers";
|
||||||
import { WALLET, buildBundle, mintBatchWallet, serveHarness } from "./harness-page";
|
import { WALLET, buildBundle, mintBatchWallet, serveHarness } from "./harness-page";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user