@plune-ai/playwright 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -56,6 +56,7 @@ fills in what you left out. Anything set in the config file wins.
56
56
  | `PLUNE_ENV` | where it ran — `staging`, `prod`, a preview name |
57
57
  | `PLUNE_LABELS` | comma-separated marks: `smoke,nightly` |
58
58
  | `PLUNE_CREATE` | offer tests Plune has no case for to the review queue |
59
+ | `PLUNE_FULL_RUN` | this run is the whole suite: a case it used to report and did not is marked detached |
59
60
 
60
61
  Flags are read by value, not by presence: `PLUNE_PROCEED=0` in a matrix cell means off.
61
62
 
@@ -69,6 +70,13 @@ result: a reporter sees a test's result, not its source, and a body nobody wrote
69
70
  queue exists to keep out. A person decides whether the project tracks the test; approving attaches
70
71
  the keys, so the next run resolves instead of offering it again.
71
72
 
73
+ `PLUNE_FULL_RUN=1` is the reporter's word that nothing was filtered out — not `-g`, not a file
74
+ argument, not `--only-changed`. When such a run finishes with every expected test reported, the
75
+ platform marks the active cases this reporter used to report and did not this time as **detached**
76
+ (kept, with their history; the run is named as the reason), and prints how many. A later result on
77
+ a detached case makes it active again on its own. Set it on the CI job that runs everything and
78
+ nowhere else; a run that lost a shard never detaches anything.
79
+
72
80
  `PLUNE_GROUP` is **not supported yet** — a group of runs is a Plune feature that does not exist, and
73
81
  a group of one run means nothing. Setting it prints a line saying it was ignored, rather than
74
82
  accepting it and quietly dropping it. If you report to a deployment older than run titles, the
package/dist/index.cjs CHANGED
@@ -161,6 +161,7 @@ function readEnv(env = process.env) {
161
161
  const environment = value(env, "PLUNE_ENV");
162
162
  const labels = list(env, "PLUNE_LABELS");
163
163
  const offerDiscovered = flag(env, "PLUNE_CREATE");
164
+ const full = flag(env, "PLUNE_FULL_RUN");
164
165
  return {
165
166
  config: {
166
167
  ...externalKey !== void 0 ? { externalKey } : {},
@@ -173,7 +174,8 @@ function readEnv(env = process.env) {
173
174
  ...labels !== void 0 ? { labels } : {},
174
175
  // Only when set: `false` here would outrank a config file that asked for it, and an unset
175
176
  // variable is not an instruction.
176
- ...offerDiscovered ? { offerDiscovered } : {}
177
+ ...offerDiscovered ? { offerDiscovered } : {},
178
+ ...full ? { full } : {}
177
179
  },
178
180
  // Two names for two situations that end the same way. `SHARED_RUN` says other processes are
179
181
  // reporting into this run; `PROCEED` says the job will close it on its own schedule. Either
@@ -313,7 +315,11 @@ async function startRun(passed, declared) {
313
315
  const hit = keys.map((k) => resolved.get(k.value)).find((v) => typeof v === "string");
314
316
  if (typeof hit === "string") return [{ testCaseId: hit }];
315
317
  return keys[0] === void 0 ? [] : [{ externalKey: keys[0] }];
316
- })
318
+ }),
319
+ // The claim travels with the list it is about (D20). A runner that could not enumerate
320
+ // its tests has no list, and a claim without one is nothing the platform can check —
321
+ // so it is not sent, rather than sent and silently meaningless.
322
+ ...cfg.full === true ? { full: true } : {}
317
323
  };
318
324
  if (expected !== void 0 && expected.length > EXPECTED_MAX) {
319
325
  log(`plune: ${expected.length} tests is more than the run configuration holds \u2014 reporting the first ${EXPECTED_MAX}.`);
@@ -480,6 +486,9 @@ async function startRun(passed, declared) {
480
486
  ...reason !== void 0 ? { reason } : {}
481
487
  });
482
488
  if (!out.ok) log(`plune: could not close run ${runId} (${out.detail || out.kind}).`);
489
+ else if (typeof out.body.detached === "number" && out.body.detached > 0) {
490
+ log(`plune: ${out.body.detached} test case(s) marked detached \u2014 this full run no longer reports them.`);
491
+ }
483
492
  }
484
493
  summarise();
485
494
  },
package/dist/index.js CHANGED
@@ -127,6 +127,7 @@ function readEnv(env = process.env) {
127
127
  const environment = value(env, "PLUNE_ENV");
128
128
  const labels = list(env, "PLUNE_LABELS");
129
129
  const offerDiscovered = flag(env, "PLUNE_CREATE");
130
+ const full = flag(env, "PLUNE_FULL_RUN");
130
131
  return {
131
132
  config: {
132
133
  ...externalKey !== void 0 ? { externalKey } : {},
@@ -139,7 +140,8 @@ function readEnv(env = process.env) {
139
140
  ...labels !== void 0 ? { labels } : {},
140
141
  // Only when set: `false` here would outrank a config file that asked for it, and an unset
141
142
  // variable is not an instruction.
142
- ...offerDiscovered ? { offerDiscovered } : {}
143
+ ...offerDiscovered ? { offerDiscovered } : {},
144
+ ...full ? { full } : {}
143
145
  },
144
146
  // Two names for two situations that end the same way. `SHARED_RUN` says other processes are
145
147
  // reporting into this run; `PROCEED` says the job will close it on its own schedule. Either
@@ -279,7 +281,11 @@ async function startRun(passed, declared) {
279
281
  const hit = keys.map((k) => resolved.get(k.value)).find((v) => typeof v === "string");
280
282
  if (typeof hit === "string") return [{ testCaseId: hit }];
281
283
  return keys[0] === void 0 ? [] : [{ externalKey: keys[0] }];
282
- })
284
+ }),
285
+ // The claim travels with the list it is about (D20). A runner that could not enumerate
286
+ // its tests has no list, and a claim without one is nothing the platform can check —
287
+ // so it is not sent, rather than sent and silently meaningless.
288
+ ...cfg.full === true ? { full: true } : {}
283
289
  };
284
290
  if (expected !== void 0 && expected.length > EXPECTED_MAX) {
285
291
  log(`plune: ${expected.length} tests is more than the run configuration holds \u2014 reporting the first ${EXPECTED_MAX}.`);
@@ -446,6 +452,9 @@ async function startRun(passed, declared) {
446
452
  ...reason !== void 0 ? { reason } : {}
447
453
  });
448
454
  if (!out.ok) log(`plune: could not close run ${runId} (${out.detail || out.kind}).`);
455
+ else if (typeof out.body.detached === "number" && out.body.detached > 0) {
456
+ log(`plune: ${out.body.detached} test case(s) marked detached \u2014 this full run no longer reports them.`);
457
+ }
449
458
  }
450
459
  summarise();
451
460
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plune-ai/playwright",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Report Playwright results to Plune — a reporter and, later, a test importer.",
5
5
  "keywords": [
6
6
  "playwright",
@@ -38,7 +38,7 @@
38
38
  "tsup": "^8.0.0",
39
39
  "typescript": "^5.4.0",
40
40
  "vitest": "^1.6.0",
41
- "@plune-ai/cli": "0.11.1"
41
+ "@plune-ai/cli": "0.12.0"
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",