Skip to content

Commit f0b6875

Browse files
committed
test(e2e): clarify shared-domain caveats and apply consistently
Address QA review: - Fix inaccurate comment claiming preflight tests 'exit before publish'; --no-build only skips the build step, not the publish, so some tests reach registry.publish. Document that SIGNER owns the domain regardless and re-publishes are idempotent. - Add a warning that the shared 'preflight' domain shouldn't be used for registry-state assertions, since six tests overwrite each other's metadata sequentially. Stdout assertions are fine. - Switch the mainnet-rejection test from literal 'test' to E2E_DOMAINS.preflight for consistency. Still safe — the mainnet check rejects before publish.
1 parent b393f49 commit f0b6875

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

e2e/cli/deploy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe("dot deploy — preflight and validation", () => {
3535
const result = await dot([
3636
"deploy",
3737
"--signer", "dev",
38-
"--domain", "test",
38+
"--domain", E2E_DOMAINS.preflight,
3939
"--buildDir", absBuildDir(frontendOnly),
4040
"--playground",
4141
"--env", "mainnet",

e2e/cli/fixtures/accounts.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,20 @@ export const BOB: TestAccount = devAccount("Bob");
7272
*
7373
* Use a separate domain per test that exercises a meaningfully different
7474
* publish path (storage / re-deploy / cross-owner collision); reuse a single
75-
* domain for the preflight tests, which never reach publish.
75+
* domain for the preflight / validation tests.
76+
*
77+
* NOTE: do not assert on the registry state of `preflight` — it's shared by
78+
* six tests in the same file and the metadata at any moment reflects whichever
79+
* one ran last. Stdout assertions are fine. If you need to assert on registry
80+
* state for a new test, give it its own dedicated domain here.
7681
*/
7782
export const E2E_DOMAINS = {
78-
/** Used by all preflight / validation tests — they exit before publish. */
83+
/**
84+
* Shared by the validation tests in `dot deploy — preflight and validation`.
85+
* `--no-build` only skips the build step, not the publish — so some of these
86+
* tests do reach `registry.publish`. SIGNER ends up owning this domain
87+
* regardless; subsequent runs are same-owner re-publishes.
88+
*/
7989
preflight: "e2e-cli-preflight",
8090
/** Used by the storage-phase happy path. */
8191
storage: "e2e-cli-storage",

0 commit comments

Comments
 (0)