@specific.dev/spectest 0.28.2 → 0.28.3

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/dist/browser.d.ts CHANGED
@@ -311,4 +311,5 @@ export interface RecordableFields {
311
311
  format: string;
312
312
  attempts: number;
313
313
  artifactId: string;
314
+ attribute: string;
314
315
  }
package/dist/daemon.js CHANGED
@@ -374,8 +374,8 @@ function progressDone() {
374
374
  }
375
375
  // BuildKit (docker buildx) gives per-step timing via `--progress=plain`,
376
376
  // parallel stages, and `RUN --mount=type=cache`. Detected once: where the
377
- // buildx plugin isn't installed (e.g. a Freestyle base without it) we fall
378
- // back to the legacy builder, which takes no `--progress` flag.
377
+ // buildx plugin isn't installed we fall back to the legacy builder,
378
+ // which takes no `--progress` flag.
379
379
  let _buildxAvailable;
380
380
  async function hasBuildx() {
381
381
  if (_buildxAvailable === undefined) {
@@ -3497,7 +3497,7 @@ async function runOne(testCase) {
3497
3497
  //
3498
3498
  // Unlike browsers, we don't auto-close terminals at test end. A
3499
3499
  // `docker exec` subprocess is cheap to keep alive (a few KB), and
3500
- // Freestyle's snapshot captures it cleanly along with the container
3500
+ // the VM snapshot captures it cleanly along with the container
3501
3501
  // — so leaving it running between tests doesn't leak in any
3502
3502
  // meaningful sense. Auto-closing only added a noisy `close` step
3503
3503
  // at the end of every test that used `openTerminal`.
package/dist/locator.js CHANGED
@@ -203,7 +203,7 @@ export function makeLocator(backend, strategy, chain) {
203
203
  // One recorded event, result NOT wrapped (void/action).
204
204
  const act = (action, fields, fn) => backend.pageOp(action, { selector: label, ...fields }, (page) => fn(lower(page, chain), page));
205
205
  // One recorded event, result provenance-wrapped for expect().
206
- const read = (action, fn) => backend.pageOp(action, { selector: label }, (page) => fn(lower(page, chain)), {
206
+ const read = (action, fn, fields = {}) => backend.pageOp(action, { selector: label, ...fields }, (page) => fn(lower(page, chain)), {
207
207
  wrap: true,
208
208
  });
209
209
  // Silent, non-recorded reads for expect(locator) matchers to poll.
@@ -263,7 +263,9 @@ export function makeLocator(backend, strategy, chain) {
263
263
  innerText: (opts) => read("innerText", (l) => l.innerText({ timeout: opts?.timeout })),
264
264
  innerHTML: (opts) => read("innerHTML", (l) => l.innerHTML({ timeout: opts?.timeout })),
265
265
  inputValue: (opts) => read("inputValue", (l) => l.inputValue({ timeout: opts?.timeout })),
266
- getAttribute: (name, opts) => read("getAttribute", (l) => l.getAttribute(name, { timeout: opts?.timeout })),
266
+ getAttribute: (name, opts) => read("getAttribute", (l) => l.getAttribute(name, { timeout: opts?.timeout }), {
267
+ attribute: name,
268
+ }),
267
269
  isVisible: () => read("isVisible", (l) => l.isVisible()),
268
270
  isHidden: () => read("isHidden", (l) => l.isHidden()),
269
271
  isEnabled: (opts) => read("isEnabled", (l) => l.isEnabled({ timeout: opts?.timeout })),
@@ -358,6 +358,8 @@ export interface BrowserEvent extends BaseEvent {
358
358
  textTruncated?: boolean;
359
359
  /** Key name (press). */
360
360
  key?: string;
361
+ /** Attribute name (getAttribute). */
362
+ attribute?: string;
361
363
  /** Scroll/click coordinates. */
362
364
  dx?: number;
363
365
  dy?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/spectest",
3
- "version": "0.28.2",
3
+ "version": "0.28.3",
4
4
  "description": "Spectest SDK for defining test environments in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",