playwright-order-manager 0.1.0

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +240 -0
  3. package/bin/run.js +133 -0
  4. package/dist/constants/index.d.ts +72 -0
  5. package/dist/constants/index.d.ts.map +1 -0
  6. package/dist/constants/index.js +93 -0
  7. package/dist/constants/index.js.map +1 -0
  8. package/dist/core/OrderedExecution.d.ts +52 -0
  9. package/dist/core/OrderedExecution.d.ts.map +1 -0
  10. package/dist/core/OrderedExecution.js +253 -0
  11. package/dist/core/OrderedExecution.js.map +1 -0
  12. package/dist/core/OrderedReportParser.d.ts +38 -0
  13. package/dist/core/OrderedReportParser.d.ts.map +1 -0
  14. package/dist/core/OrderedReportParser.js +169 -0
  15. package/dist/core/OrderedReportParser.js.map +1 -0
  16. package/dist/core/OrderedSummary.d.ts +20 -0
  17. package/dist/core/OrderedSummary.d.ts.map +1 -0
  18. package/dist/core/OrderedSummary.js +747 -0
  19. package/dist/core/OrderedSummary.js.map +1 -0
  20. package/dist/fixtures/index.d.ts +30 -0
  21. package/dist/fixtures/index.d.ts.map +1 -0
  22. package/dist/fixtures/index.js +212 -0
  23. package/dist/fixtures/index.js.map +1 -0
  24. package/dist/index.d.ts +6 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +31 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/runner/TestOrderManager.d.ts +62 -0
  29. package/dist/runner/TestOrderManager.d.ts.map +1 -0
  30. package/dist/runner/TestOrderManager.js +490 -0
  31. package/dist/runner/TestOrderManager.js.map +1 -0
  32. package/dist/types/index.d.ts +215 -0
  33. package/dist/types/index.d.ts.map +1 -0
  34. package/dist/types/index.js +6 -0
  35. package/dist/types/index.js.map +1 -0
  36. package/package.json +65 -0
  37. package/templates/playwright.merge.config.ts +57 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderedSummary.js","s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,MAAM,CAAC,OAAO;YACrC,OAAO,EAAE,GAAG,CAAC,OAAO,GAAG,CAAC;SACzB,CAAC,EACF,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAC3D,CAAC;QAEF,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC;QAE5D,OAAO;YACL,SAAS;YACT,UAAU;YACV,aAAa,EAAE,KAAK,GAAG,OAAO;YAC9B,SAAS,EAAM,SAA+C;YAC9D,aAAa,EAAE,aAAmD;YAClE,MAAM;YACN,OAAO;YACP,OAAO;SACR,CAAC;IACJ,CAAC;CACF;AA5ED,wCA4EC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * The worker-scoped fixtures this package adds.
3
+ * Consumers extend their test object with these using base.extend().
4
+ */
5
+ interface OrderedDiscoveryFixtures {
6
+ /**
7
+ * Worker-scoped fixture that runs automatically during --list.
8
+ * Users never call this directly — it hooks in automatically.
9
+ */
10
+ orderedDiscovery: void;
11
+ }
12
+ /**
13
+ * Drop-in replacement for Playwright's `test`.
14
+ *
15
+ * Users import this instead of @playwright/test's test, and discovery
16
+ * happens automatically during --list without any other configuration.
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * // In your test files, replace:
21
+ * import { test, expect } from '@playwright/test';
22
+ *
23
+ * // With:
24
+ * import { test, expect } from 'playwright-order-manager';
25
+ * ```
26
+ */
27
+ export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions & OrderedDiscoveryFixtures>;
28
+ export { expect } from '@playwright/test';
29
+ export type { Page, Browser, BrowserContext, Locator, APIRequestContext, PlaywrightTestArgs, PlaywrightTestOptions, } from '@playwright/test';
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":"AAqFA;;;GAGG;AACH,UAAU,wBAAwB;IAChC;;;OAGG;IACH,gBAAgB,EAAE,IAAI,CAAC;CACxB;AAMD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,IAAI,wQA8Df,CAAC;AA8CH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,YAAY,EACV,IAAI,EACJ,OAAO,EACP,cAAc,EACd,OAAO,EACP,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,212 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.expect = exports.test = void 0;
37
+ const fs = __importStar(require("fs"));
38
+ const path = __importStar(require("path"));
39
+ const test_1 = require("@playwright/test");
40
+ const constants_1 = require("../constants");
41
+ // =============================================================================
42
+ // INTERNAL HELPERS
43
+ // =============================================================================
44
+ /**
45
+ * Extracts all tags from a TestInfo object.
46
+ *
47
+ * Playwright attaches tags to tests in two ways depending on version:
48
+ * 1. testInfo.tags — available in Playwright >= 1.43
49
+ * 2. testInfo.annotations — older versions used annotations with type 'tag'
50
+ *
51
+ * We support both so the package works with Playwright >= 1.40.
52
+ */
53
+ function extractTags(testInfo) {
54
+ // Playwright >= 1.43 exposes tags directly
55
+ if ('tags' in testInfo && Array.isArray(testInfo.tags)) {
56
+ return testInfo.tags;
57
+ }
58
+ // Fallback: extract from annotations for older Playwright versions
59
+ if (Array.isArray(testInfo.annotations)) {
60
+ return testInfo.annotations
61
+ .filter((a) => a.type === 'tag' && typeof a.description === 'string')
62
+ .map((a) => a.description);
63
+ }
64
+ return [];
65
+ }
66
+ /**
67
+ * Returns the path where the discovery JSON file will be written.
68
+ *
69
+ * We put it inside the reportRoot directory so it lives alongside
70
+ * the summary JSON and HTML report after the run completes.
71
+ *
72
+ * The path can be overridden via the ORDERED_REPORT_ROOT env var,
73
+ * which is the same variable the runner uses — so both always agree.
74
+ */
75
+ function getDiscoveryFilePath() {
76
+ const reportRoot = process.env['ORDERED_REPORT_ROOT'] ??
77
+ constants_1.RunnerConstants.DEFAULTS.REPORT_ROOT;
78
+ return path.resolve(process.cwd(), reportRoot, constants_1.RunnerConstants.DEFAULTS.DISCOVERY_FILENAME);
79
+ }
80
+ /**
81
+ * Ensures a directory exists, creating it recursively if it doesn't.
82
+ */
83
+ function ensureDir(dirPath) {
84
+ fs.mkdirSync(dirPath, { recursive: true });
85
+ }
86
+ // =============================================================================
87
+ // DISCOVERY ACCUMULATOR
88
+ // =============================================================================
89
+ /**
90
+ * We accumulate discovered tests in this module-level array.
91
+ *
92
+ * Why module-level and not inside the fixture?
93
+ * Playwright runs worker-scoped fixtures once per worker process.
94
+ * Each worker discovers a subset of tests. We collect all of them
95
+ * into this array across the worker's lifetime, then write once
96
+ * when the worker tears down.
97
+ *
98
+ * This is safe because each worker is its own Node.js process —
99
+ * there is no shared memory between workers.
100
+ */
101
+ const discoveredTests = [];
102
+ // =============================================================================
103
+ // EXTENDED TEST OBJECT
104
+ // =============================================================================
105
+ /**
106
+ * Drop-in replacement for Playwright's `test`.
107
+ *
108
+ * Users import this instead of @playwright/test's test, and discovery
109
+ * happens automatically during --list without any other configuration.
110
+ *
111
+ * @example
112
+ * ```typescript
113
+ * // In your test files, replace:
114
+ * import { test, expect } from '@playwright/test';
115
+ *
116
+ * // With:
117
+ * import { test, expect } from 'playwright-order-manager';
118
+ * ```
119
+ */
120
+ exports.test = test_1.test.extend({
121
+ orderedDiscovery: [
122
+ async ({}, use, workerInfo) => {
123
+ // ── Setup phase (before tests in this worker run) ──────────────
124
+ // Nothing to do here — we collect test info per-test in the
125
+ // test-scoped hook below, not at worker startup.
126
+ // We still need this worker fixture so that the teardown phase
127
+ // (after all tests in this worker complete) can write the file.
128
+ await use();
129
+ // ── Teardown phase (after all tests in this worker complete) ───
130
+ // Only write if we actually discovered something.
131
+ // During a normal run (not --list), this array will be empty
132
+ // because we only populate it via the beforeEach hook below.
133
+ if (discoveredTests.length === 0)
134
+ return;
135
+ const filePath = getDiscoveryFilePath();
136
+ ensureDir(path.dirname(filePath));
137
+ // Read existing file if present (another worker may have written first)
138
+ let existing = [];
139
+ try {
140
+ const raw = fs.readFileSync(filePath, 'utf8');
141
+ const parsed = JSON.parse(raw);
142
+ if (Array.isArray(parsed.tests)) {
143
+ existing = parsed.tests;
144
+ }
145
+ }
146
+ catch {
147
+ // File doesn't exist yet — that's fine, we'll create it
148
+ }
149
+ // Merge this worker's discoveries with what's already on disk.
150
+ // De-duplicate by title + project to handle overlapping workers.
151
+ const seen = new Set(existing.map((t) => `${t.project}::${t.title}`));
152
+ const merged = [...existing];
153
+ for (const discovered of discoveredTests) {
154
+ const key = `${discovered.project}::${discovered.title}`;
155
+ if (!seen.has(key)) {
156
+ seen.add(key);
157
+ merged.push(discovered);
158
+ }
159
+ }
160
+ fs.writeFileSync(filePath, JSON.stringify({ tests: merged }, null, 2), 'utf8');
161
+ if (process.env['ORDERED_DEBUG']) {
162
+ console.log(`[playwright-order-manager] Worker ${workerInfo.workerIndex} ` +
163
+ `wrote ${discoveredTests.length} tests to ${filePath}`);
164
+ }
165
+ },
166
+ // worker scope + auto:true means Playwright runs this automatically
167
+ // for every worker, without the user needing to use it in their tests
168
+ { scope: 'worker', auto: true },
169
+ ],
170
+ });
171
+ // =============================================================================
172
+ // PER-TEST DISCOVERY HOOK
173
+ // =============================================================================
174
+ // We use beforeEach to capture each test's metadata as Playwright
175
+ // iterates through them during --list.
176
+ //
177
+ // Why beforeEach and not a test-scoped fixture?
178
+ // During --list, Playwright calls beforeEach hooks to enumerate tests.
179
+ // A test-scoped fixture would work too, but beforeEach gives us access
180
+ // to testInfo which has the full title, tags, file, and line number.
181
+ // We wrap this in try-catch because test.beforeEach() throws if called
182
+ // outside of a Playwright test context — for example when a plain Node.js
183
+ // script imports from playwright-order-manager for its non-fixture exports.
184
+ // In that case we skip registration silently. The beforeEach only matters
185
+ // when Playwright is actually running tests.
186
+ try {
187
+ exports.test.beforeEach(async ({}, testInfo) => {
188
+ if (!process.env['ORDERED_DISCOVERY'])
189
+ return;
190
+ const tags = extractTags(testInfo);
191
+ const discovered = {
192
+ title: testInfo.title,
193
+ file: testInfo.file,
194
+ line: testInfo.line,
195
+ tags,
196
+ project: testInfo.project.name,
197
+ };
198
+ discoveredTests.push(discovered);
199
+ });
200
+ }
201
+ catch {
202
+ // Not in a Playwright test context — beforeEach registration skipped.
203
+ }
204
+ // =============================================================================
205
+ // RE-EXPORTS
206
+ // =============================================================================
207
+ // Re-export everything from @playwright/test so users can replace their
208
+ // import entirely. They get our extended `test` plus Playwright's `expect`,
209
+ // `Page`, `Browser`, and all other exports they're used to.
210
+ var test_2 = require("@playwright/test");
211
+ Object.defineProperty(exports, "expect", { enumerable: true, get: function () { return test_2.expect; } });
212
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,2CAA+D;AAC/D,4CAA+C;AAG/C,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;;;;;;GAQG;AACH,SAAS,WAAW,CAAC,QAAkB;IACrC,2CAA2C;IAC3C,IAAI,MAAM,IAAI,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAE,QAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,OAAQ,QAAgB,CAAC,IAAgB,CAAC;IAC5C,CAAC;IAED,mEAAmE;IACnE,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACxC,OAAO,QAAQ,CAAC,WAAW;aACxB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,OAAO,CAAC,CAAC,WAAW,KAAK,QAAQ,CAAC;aACpE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAqB,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,oBAAoB;IAC3B,MAAM,UAAU,GACd,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;QAClC,2BAAe,CAAC,QAAQ,CAAC,WAAW,CAAC;IA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ACF,gDAAgD;AAChD,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AAErE,uEAAuE;AACvE,0EAA0E;AAC1E,4EAA4E;AAC5E,0EAA0E;AAC1E,6CAA6C;AAC7C,IAAI,CAAC;IACH,YAAI,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE;QACrC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;YAAE,OAAO;QAE9C,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;QAEnC,MAAM,UAAU,GAAuB;YACrC,KAAK,EAAI,QAAQ,CAAC,KAAK;YACvB,IAAI,EAAK,QAAQ,CAAC,IAAI;YACtB,IAAI,EAAK,QAAQ,CAAC,IAAI;YACtB,IAAI;YACJ,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;SAC/B,CAAC;QAEF,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC;AAAC,MAAM,CAAC;IACP,sEAAsE;AACxE,CAAC;AAED,gFAAgF;AAChF,aAAa;AACb,gFAAgF;AAEhF,wEAAwE;AACxE,4EAA4E;AAC5E,4DAA4D;AAC5D,yCAA0C;AAAjC,8FAAA,MAAM,OAAA"}
@@ -0,0 +1,6 @@
1
+ export { OrderedExecution } from './core/OrderedExecution';
2
+ export { TestOrderManager } from './runner/TestOrderManager';
3
+ export type { Page, Browser, BrowserContext, Locator, APIRequestContext, } from '@playwright/test';
4
+ export type { DiscoveredTestCase, ExecutedTestResult, TestStatus, BucketPlan, BucketExecutionRecord, BucketKind, OrderedRunSummary, BuildBucketOptions, RunConfig, OrderMode, FailurePolicy, PriorityTag, } from './types';
5
+ export { RunnerConstants } from './constants';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAO3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAc7D,YAAY,EACV,IAAI,EACJ,OAAO,EACP,cAAc,EACd,OAAO,EACP,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EAEV,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EAGV,UAAU,EACV,qBAAqB,EACrB,UAAU,EAGV,iBAAiB,EAGjB,kBAAkB,EAClB,SAAS,EAGT,SAAS,EACT,aAAa,EACb,WAAW,GACZ,MAAM,SAAS,CAAC;AAMjB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ // =============================================================================
3
+ // playwright-order-manager — public API
4
+ //
5
+ // This is the only file consumers should import from.
6
+ // Everything exported here is part of the stable public API.
7
+ // Anything NOT exported here is an internal implementation detail
8
+ // that can change between versions without a semver bump.
9
+ // =============================================================================
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.RunnerConstants = exports.TestOrderManager = exports.OrderedExecution = void 0;
12
+ // ── Core logic ───────────────────────────────────────────────────────────────
13
+ // The pure ordered execution algorithm — zero I/O, fully testable.
14
+ // Most users won't need this directly, but it's valuable for anyone
15
+ // building custom tooling on top of the package.
16
+ var OrderedExecution_1 = require("./core/OrderedExecution");
17
+ Object.defineProperty(exports, "OrderedExecution", { enumerable: true, get: function () { return OrderedExecution_1.OrderedExecution; } });
18
+ // ── Runner ───────────────────────────────────────────────────────────────────
19
+ // The full orchestrator for programmatic use.
20
+ // CLI users don't need this — it's called by bin/run.js automatically.
21
+ // Library users who want to embed ordered execution into their own
22
+ // scripts or CI tooling use this directly.
23
+ var TestOrderManager_1 = require("./runner/TestOrderManager");
24
+ Object.defineProperty(exports, "TestOrderManager", { enumerable: true, get: function () { return TestOrderManager_1.TestOrderManager; } });
25
+ // ── Constants ────────────────────────────────────────────────────────────────
26
+ // Exported for users who want to reference tag names without hardcoding
27
+ // strings in their own code.
28
+ // e.g. if (tag === RunnerConstants.RUN_FIRST_TAG) { ... }
29
+ var constants_1 = require("./constants");
30
+ Object.defineProperty(exports, "RunnerConstants", { enumerable: true, get: function () { return constants_1.RunnerConstants; } });
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,wCAAwC;AACxC,EAAE;AACF,sDAAsD;AACtD,6DAA6D;AAC7D,kEAAkE;AAClE,0DAA0D;AAC1D,gFAAgF;;;AAEhF,gFAAgF;AAChF,mEAAmE;AACnE,oEAAoE;AACpE,iDAAiD;AACjD,4DAA2D;AAAlD,oHAAA,gBAAgB,OAAA;AAEzB,gFAAgF;AAChF,8CAA8C;AAC9C,uEAAuE;AACvE,mEAAmE;AACnE,2CAA2C;AAC3C,8DAA6D;AAApD,oHAAA,gBAAgB,OAAA;AAkDzB,gFAAgF;AAChF,wEAAwE;AACxE,6BAA6B;AAC7B,0DAA0D;AAC1D,yCAA8C;AAArC,4GAAA,eAAe,OAAA"}
@@ -0,0 +1,62 @@
1
+ import type { RunConfig } from '../types';
2
+ export declare class TestOrderManager {
3
+ /**
4
+ * Runs `playwright --list` to discover all tests matching the config.
5
+ * Sets ORDERED_DISCOVERY=true so our fixture captures test metadata.
6
+ * Returns the discovered tests parsed from the discovery JSON file.
7
+ */
8
+ private static discover;
9
+ /**
10
+ * Takes discovered tests and builds the ordered bucket plan.
11
+ * Logs the plan so the user can see exactly what will run and in what order.
12
+ */
13
+ private static plan;
14
+ /**
15
+ * Executes a single bucket by spawning Playwright and parsing the results.
16
+ *
17
+ * Returns a BucketRunResult containing:
18
+ * - record: The completed BucketExecutionRecord to add to the summary
19
+ * - shouldAbort: Whether the failure policy says we must stop the run
20
+ */
21
+ private static executeBucket;
22
+ /**
23
+ * Determines whether the run should be aborted after a bucket completes.
24
+ *
25
+ * - 'critical' → abort only if this specific bucket is marked critical AND failed
26
+ * - 'immediate' → abort on any failure, regardless of critical flag
27
+ * - 'continue' → never abort, always run all remaining buckets
28
+ */
29
+ private static shouldAbortRun;
30
+ /**
31
+ * Runs the complete ordered test suite.
32
+ *
33
+ * This is the main entry point — called by bin/run.js (CLI usage)
34
+ * or directly by users who import TestOrderManager programmatically.
35
+ *
36
+ * @param userConfig - Optional RunConfig for programmatic use.
37
+ * All fields fall back to env vars then defaults.
38
+ *
39
+ * @returns The process exit code: 0 for success, 1 for failure.
40
+ * When called from bin/run.js, we call process.exit() directly.
41
+ * When called programmatically, we return the code so the caller
42
+ * can decide what to do with it.
43
+ *
44
+ * @example CLI usage (via bin/run.js):
45
+ * ```
46
+ * npx pw-order --project=chromium
47
+ * ```
48
+ *
49
+ * @example Programmatic usage:
50
+ * ```typescript
51
+ * import { TestOrderManager } from 'playwright-order-manager';
52
+ *
53
+ * const exitCode = await TestOrderManager.run({
54
+ * orderMode: 'priority',
55
+ * failurePolicy: 'continue',
56
+ * project: 'chromium',
57
+ * });
58
+ * ```
59
+ */
60
+ static run(userConfig?: RunConfig): Promise<number>;
61
+ }
62
+ //# sourceMappingURL=TestOrderManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestOrderManager.d.ts","sourceRoot":"","sources":["../../src/runner/TestOrderManager.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,SAAS,EAOV,MAAM,UAAU,CAAC;AAoPlB,qBAAa,gBAAgB;IAM3B;;;;OAIG;mBACkB,QAAQ;IA0D7B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,IAAI;IAwBnB;;;;;;OAMG;mBACkB,aAAa;IA2GlC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IA2B7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;WACU,GAAG,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;CAwI1D"}