screenci 0.0.70 → 0.0.72
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 +13 -13
- package/dist/cli.d.ts +9 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +184 -5
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +34 -34
- package/dist/docs/manifest.d.ts.map +1 -1
- package/dist/docs/manifest.js +20 -12
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/video-sources/installation.screenci.js +13 -12
- package/dist/docs/video-sources/installation.screenci.js.map +1 -1
- package/dist/docs/video-sources/landing.screenci.js +16 -9
- package/dist/docs/video-sources/landing.screenci.js.map +1 -1
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js +14 -26
- package/dist/docs/video-sources/locator-highlight-animated.screenci.js.map +1 -1
- package/dist/docs/video-sources/locator-highlight-still.screenci.js +5 -10
- package/dist/docs/video-sources/locator-highlight-still.screenci.js.map +1 -1
- package/dist/docs/video-sources/product-pitch.screenci.js +97 -32
- package/dist/docs/video-sources/product-pitch.screenci.js.map +1 -1
- package/dist/docs/video-sources/public-urls.screenci.js +16 -9
- package/dist/docs/video-sources/public-urls.screenci.js.map +1 -1
- package/dist/docs/video-sources/studio.screenci.js +42 -27
- package/dist/docs/video-sources/studio.screenci.js.map +1 -1
- package/dist/docs/videos.d.ts +4 -15
- package/dist/docs/videos.d.ts.map +1 -1
- package/dist/docs/videos.js +6 -22
- package/dist/docs/videos.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +8 -23
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +10 -32
- package/dist/src/asset.js.map +1 -1
- package/dist/src/audio.d.ts +6 -24
- package/dist/src/audio.d.ts.map +1 -1
- package/dist/src/audio.js +10 -35
- package/dist/src/audio.js.map +1 -1
- package/dist/src/builder.d.ts +214 -0
- package/dist/src/builder.d.ts.map +1 -0
- package/dist/src/builder.js +212 -0
- package/dist/src/builder.js.map +1 -0
- package/dist/src/cue.d.ts +40 -123
- package/dist/src/cue.d.ts.map +1 -1
- package/dist/src/cue.js +190 -30
- package/dist/src/cue.js.map +1 -1
- package/dist/src/events.d.ts +80 -15
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +72 -6
- package/dist/src/events.js.map +1 -1
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +26 -14
- package/dist/src/init.js.map +1 -1
- package/dist/src/locales.d.ts +19 -0
- package/dist/src/locales.d.ts.map +1 -0
- package/dist/src/locales.js +60 -0
- package/dist/src/locales.js.map +1 -0
- package/dist/src/localize.d.ts +135 -0
- package/dist/src/localize.d.ts.map +1 -0
- package/dist/src/localize.js +195 -0
- package/dist/src/localize.js.map +1 -0
- package/dist/src/localizeRuntime.d.ts +53 -0
- package/dist/src/localizeRuntime.d.ts.map +1 -0
- package/dist/src/localizeRuntime.js +79 -0
- package/dist/src/localizeRuntime.js.map +1 -0
- package/dist/src/recordingData.d.ts +5 -4
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/runtimeContext.d.ts +3 -4
- package/dist/src/runtimeContext.d.ts.map +1 -1
- package/dist/src/runtimeContext.js.map +1 -1
- package/dist/src/runtimeMode.d.ts +47 -0
- package/dist/src/runtimeMode.d.ts.map +1 -1
- package/dist/src/runtimeMode.js +124 -0
- package/dist/src/runtimeMode.js.map +1 -1
- package/dist/src/screenshot.d.ts +56 -2
- package/dist/src/screenshot.d.ts.map +1 -1
- package/dist/src/screenshot.js +47 -10
- package/dist/src/screenshot.js.map +1 -1
- package/dist/src/stillCapture.d.ts +2 -3
- package/dist/src/stillCapture.d.ts.map +1 -1
- package/dist/src/stillCapture.js.map +1 -1
- package/dist/src/studio.d.ts +55 -22
- package/dist/src/studio.d.ts.map +1 -1
- package/dist/src/studio.js +38 -12
- package/dist/src/studio.js.map +1 -1
- package/dist/src/types.d.ts +18 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +149 -13
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +91 -24
- package/dist/src/video.js.map +1 -1
- package/dist/src/voiceConfig.d.ts +110 -0
- package/dist/src/voiceConfig.d.ts.map +1 -0
- package/dist/src/voiceConfig.js +2 -0
- package/dist/src/voiceConfig.js.map +1 -0
- package/dist/src/voices.d.ts +27 -23
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +7 -4
- package/dist/src/voices.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/skills/screenci/SKILL.md +39 -30
- package/dist/docs/video-sources/cli.screenci.d.ts +0 -2
- package/dist/docs/video-sources/cli.screenci.d.ts.map +0 -1
- package/dist/docs/video-sources/cli.screenci.js +0 -36
- package/dist/docs/video-sources/cli.screenci.js.map +0 -1
package/dist/src/audio.js
CHANGED
|
@@ -90,49 +90,24 @@ export function createAudio(tracks) {
|
|
|
90
90
|
return result;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
93
|
+
* Builds audio controllers for Studio-managed tracks declared via
|
|
94
|
+
* `video.studio({ audio: [...] })`. Each name becomes a callable controller with
|
|
95
|
+
* the same timeline behavior as a {@link createAudio} controller, including
|
|
96
|
+
* `start()`/`end()`. The audio file, volume, and repeat all come from Studio.
|
|
95
97
|
*
|
|
96
|
-
*
|
|
97
|
-
* {@link createAudio} controllers, including `start()`/`end()`. The audio file,
|
|
98
|
-
* volume, and repeat all come from Studio (mirrors {@link createStudioOverlays}
|
|
99
|
-
* for overlays).
|
|
100
|
-
*
|
|
101
|
-
* On the first upload of a studio-mode video, rendering is held until the video
|
|
102
|
-
* is configured in Studio (the CLI prints a direct link). Later uploads reuse
|
|
103
|
-
* the saved Studio configuration automatically.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const music = createStudioAudio('theme', 'sting')
|
|
108
|
-
*
|
|
109
|
-
* video('Product demo', async ({ page }) => {
|
|
110
|
-
* await music.theme() // plays under the whole video
|
|
111
|
-
* await page.goto('/dashboard')
|
|
112
|
-
* await music.sting.start()
|
|
113
|
-
* await page.click('#celebrate')
|
|
114
|
-
* await music.sting.end()
|
|
115
|
-
* })
|
|
116
|
-
* ```
|
|
98
|
+
* Internal: the `audio` fixture exposes these to the test body.
|
|
117
99
|
*/
|
|
118
|
-
export function
|
|
119
|
-
const seen = new Set();
|
|
120
|
-
for (const key of keys) {
|
|
121
|
-
if (seen.has(key)) {
|
|
122
|
-
throw new Error(`Duplicate audio key "${key}" passed to createStudioAudio. Audio keys must be unique.`);
|
|
123
|
-
}
|
|
124
|
-
seen.add(key);
|
|
125
|
-
}
|
|
100
|
+
export function buildStudioAudioTracks(names) {
|
|
126
101
|
const result = {};
|
|
127
|
-
for (const
|
|
128
|
-
result[
|
|
102
|
+
for (const name of names) {
|
|
103
|
+
result[name] = buildStudioAudioController(name);
|
|
129
104
|
}
|
|
130
105
|
return result;
|
|
131
106
|
}
|
|
132
107
|
/**
|
|
133
108
|
* Builds the callable/`start()`/`end()` audio controller shared by code-defined
|
|
134
|
-
* ({@link createAudio}) and Studio ({@link
|
|
135
|
-
* difference is how `emitStart` records the start event.
|
|
109
|
+
* ({@link createAudio}) and Studio ({@link buildStudioAudioTracks}) tracks. The
|
|
110
|
+
* only difference is how `emitStart` records the start event.
|
|
136
111
|
*/
|
|
137
112
|
function createAudioControllerCore(name, emitStart) {
|
|
138
113
|
// start()/end() register a live run so end() can pair to its start and a
|
package/dist/src/audio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audio.js","sourceRoot":"","sources":["../../src/audio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,UAAU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IACvC,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAY;IAC9C,OAAO,yBAAyB,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;QAClD,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAClC,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAC1B,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import type { TestDetails, TestInfo } from '@playwright/test';
|
|
2
|
+
import type { RecordOptions } from './types.js';
|
|
3
|
+
import type { NarrationCue } from './cue.js';
|
|
4
|
+
import type { OverlayController } from './asset.js';
|
|
5
|
+
import type { AudioController } from './audio.js';
|
|
6
|
+
import type { NarrationMarkers, TextValues } from './localizeRuntime.js';
|
|
7
|
+
import { type LocalizeSpec, type LocalizeNarrationValue, type NormalizedLocalize } from './localize.js';
|
|
8
|
+
import { type StudioDeclaration } from './studio.js';
|
|
9
|
+
/**
|
|
10
|
+
* One variant in a generic `video.each(...)` fan-out. Each variant produces a
|
|
11
|
+
* separate video (its own identity and stored history), differing only in its
|
|
12
|
+
* recording options and/or forwarded Playwright `use` options (e.g. a viewport
|
|
13
|
+
* via `recordOptions.aspectRatio`, or a theme via `use.colorScheme`).
|
|
14
|
+
*/
|
|
15
|
+
export type EachVariant = {
|
|
16
|
+
/** Stable label appended to the video name, e.g. `'mobile'` or `'dark'`. */
|
|
17
|
+
key: string;
|
|
18
|
+
/** Recording options for this variant (merged over the video's defaults). */
|
|
19
|
+
recordOptions?: Partial<RecordOptions>;
|
|
20
|
+
/** Forwarded Playwright `use` options for this variant, e.g. `{ colorScheme: 'dark' }`. */
|
|
21
|
+
use?: Record<string, unknown>;
|
|
22
|
+
};
|
|
23
|
+
/** A single Playwright test to register, fully resolved from the fan-out specs. */
|
|
24
|
+
export type Registration = {
|
|
25
|
+
/** Label for the wrapping `describe` block (scopes per-test `use` options). */
|
|
26
|
+
describeTitle: string;
|
|
27
|
+
/** Unique Playwright test title (drives the per-pass `.screenci/<dir>`). */
|
|
28
|
+
leafTitle: string;
|
|
29
|
+
/** Grouping key written to `metadata.videoName`; shared across a video's languages. */
|
|
30
|
+
videoName: string;
|
|
31
|
+
/** Active language for this pass, or `null` in shared / no-localize mode. */
|
|
32
|
+
language: string | null;
|
|
33
|
+
/** Browser locale for this pass, or `null` to leave the default. */
|
|
34
|
+
locale: string | null;
|
|
35
|
+
/** Recording options patch for this pass, or `null` for none. */
|
|
36
|
+
recordOptions: Partial<RecordOptions> | null;
|
|
37
|
+
/** Forwarded Playwright `use` options for this pass, or `null` for none. */
|
|
38
|
+
use: Record<string, unknown> | null;
|
|
39
|
+
/** The normalized localize spec for this video, or `null` when not localized. */
|
|
40
|
+
localize: NormalizedLocalize | null;
|
|
41
|
+
/** The studio declaration for this video, or `null` when not studio-managed. */
|
|
42
|
+
studio: StudioDeclaration | null;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Expand the localize / each fan-out specs into the concrete list of Playwright
|
|
46
|
+
* tests to register. Pure and exported for testing.
|
|
47
|
+
*
|
|
48
|
+
* - With no `localize`, each variant yields a single language-agnostic test.
|
|
49
|
+
* - In `'shared'` mode, each variant yields one test that carries every language
|
|
50
|
+
* (narration is overdubbed at render); the `--languages` filter does not split
|
|
51
|
+
* a shared recording.
|
|
52
|
+
* - In `'per-language'` mode, each variant yields one test per language,
|
|
53
|
+
* intersected with the `--languages` filter when present. A variant whose
|
|
54
|
+
* languages are entirely filtered out yields nothing. The browser locale is set
|
|
55
|
+
* per language unless `browserLocale` is `false`.
|
|
56
|
+
*/
|
|
57
|
+
export declare function expandRegistrations(params: {
|
|
58
|
+
baseTitle: string;
|
|
59
|
+
localize: NormalizedLocalize | null;
|
|
60
|
+
studio: StudioDeclaration | null;
|
|
61
|
+
eachVariants: EachVariant[] | null;
|
|
62
|
+
requestedLanguages: string[] | null;
|
|
63
|
+
}): Registration[];
|
|
64
|
+
type TestCall = {
|
|
65
|
+
(title: string, body: unknown): void;
|
|
66
|
+
(title: string, details: TestDetails, body: unknown): void;
|
|
67
|
+
};
|
|
68
|
+
/** Minimal view of the test API the builder needs to register tests. */
|
|
69
|
+
type RegistrarTest = TestCall & {
|
|
70
|
+
describe: (title: string, fn: () => void) => void;
|
|
71
|
+
use: (options: Record<string, unknown>) => void;
|
|
72
|
+
only: TestCall;
|
|
73
|
+
skip: TestCall;
|
|
74
|
+
fixme: TestCall;
|
|
75
|
+
fail: TestCall;
|
|
76
|
+
};
|
|
77
|
+
/** Converts a union type to an intersection: `A | B` -> `A & B`. */
|
|
78
|
+
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
79
|
+
/**
|
|
80
|
+
* Union of every inner key across all languages of a seeded map `M` (e.g. the
|
|
81
|
+
* cue names of `{ en: { intro, save }, fi: { intro, save } }`). Uses each
|
|
82
|
+
* language's key set before intersecting, so each language must cover the union
|
|
83
|
+
* (the identical-keys guarantee, enforced via {@link EnforceIdenticalKeys}).
|
|
84
|
+
*/
|
|
85
|
+
type SeededKeys<M> = [M] extends [object] ? Extract<keyof UnionToIntersection<{
|
|
86
|
+
[L in keyof M]-?: NonNullable<M[L]> extends Record<string, unknown> ? Record<keyof NonNullable<M[L]> & string, unknown> : never;
|
|
87
|
+
}[keyof M]>, string> : never;
|
|
88
|
+
/** Studio-managed names from a `video.studio({...})` name list. */
|
|
89
|
+
type StudioNamesOf<N> = N extends readonly string[] ? N[number] : never;
|
|
90
|
+
/** Seeded cue names (declared in the per-language `narration` map). */
|
|
91
|
+
type CueNamesOf<S> = S extends {
|
|
92
|
+
narration: infer M;
|
|
93
|
+
} ? SeededKeys<M> : never;
|
|
94
|
+
/** Seeded `text` field names (declared in the per-language `text` map). */
|
|
95
|
+
type FieldNamesOf<S> = S extends {
|
|
96
|
+
text: infer T;
|
|
97
|
+
} ? SeededKeys<T> : never;
|
|
98
|
+
/**
|
|
99
|
+
* Constrains a seeded map so every language declares the same key set: each
|
|
100
|
+
* language is required to provide every key that appears in any language. A
|
|
101
|
+
* missing key fails to compile; an unrelated extra key is not part of the union,
|
|
102
|
+
* so it is rejected as excess.
|
|
103
|
+
*/
|
|
104
|
+
type EnforceIdenticalKeys<M, Value> = {
|
|
105
|
+
[L in keyof M]: Record<SeededKeys<M>, Value>;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Refines a localize spec so its `narration`/`text` maps have identical keys
|
|
109
|
+
* across languages. Intersected with the inferred spec `S` at the `.localize`
|
|
110
|
+
* call site so a dropped per-language key is a compile error.
|
|
111
|
+
*/
|
|
112
|
+
type ValidateLocalizeSpec<S> = (S extends {
|
|
113
|
+
narration: infer M;
|
|
114
|
+
} ? {
|
|
115
|
+
narration: EnforceIdenticalKeys<M, LocalizeNarrationValue>;
|
|
116
|
+
} : object) & (S extends {
|
|
117
|
+
text: infer T;
|
|
118
|
+
} ? {
|
|
119
|
+
text: EnforceIdenticalKeys<T, string>;
|
|
120
|
+
} : object);
|
|
121
|
+
type NarrationOverrideFor<S> = [CueNamesOf<S>] extends [never] ? NarrationMarkers : Record<CueNamesOf<S>, NarrationCue>;
|
|
122
|
+
/**
|
|
123
|
+
* The `text` fixture type for a spec: every field is a `string`. A seeded field
|
|
124
|
+
* carries its per-language value; a Studio-managed field (`studio.text`) is the
|
|
125
|
+
* empty string until it is set in Studio (the recording still succeeds). In
|
|
126
|
+
* `shared` mode there is no per-language injection, so seeded fields are also
|
|
127
|
+
* empty until provided.
|
|
128
|
+
*/
|
|
129
|
+
type TextOverrideFor<S> = [FieldNamesOf<S>] extends [never] ? TextValues : Record<FieldNamesOf<S>, string>;
|
|
130
|
+
/**
|
|
131
|
+
* The fixture arg overrides a `localize(spec)` contributes: `narration` typed to
|
|
132
|
+
* the spec's cue names (only when the medium has narration) and `text` typed to
|
|
133
|
+
* its field names. Keys absent from `Args` (e.g. `narration` on a screenshot)
|
|
134
|
+
* are not added.
|
|
135
|
+
*/
|
|
136
|
+
type LocalizeOverrides<Args, S> = ('narration' extends keyof Args ? {
|
|
137
|
+
narration: NarrationOverrideFor<S>;
|
|
138
|
+
} : object) & ('text' extends keyof Args ? {
|
|
139
|
+
text: TextOverrideFor<S>;
|
|
140
|
+
} : object);
|
|
141
|
+
/** Studio-managed names of each kind declared in a `video.studio({...})` spec. */
|
|
142
|
+
type StudioNarrationNamesOf<SD> = SD extends {
|
|
143
|
+
narration: infer N;
|
|
144
|
+
} ? StudioNamesOf<N> : never;
|
|
145
|
+
type StudioTextNamesOf<SD> = SD extends {
|
|
146
|
+
text: infer N;
|
|
147
|
+
} ? StudioNamesOf<N> : never;
|
|
148
|
+
type StudioOverlayNamesOf<SD> = SD extends {
|
|
149
|
+
overlays: infer N;
|
|
150
|
+
} ? StudioNamesOf<N> : never;
|
|
151
|
+
type StudioAudioNamesOf<SD> = SD extends {
|
|
152
|
+
audio: infer N;
|
|
153
|
+
} ? StudioNamesOf<N> : never;
|
|
154
|
+
/**
|
|
155
|
+
* The fixture arg overrides a `studio(decl)` contributes: each declared name
|
|
156
|
+
* list types its fixture (`narration`/`text`/`overlays`/`audio`) to the exact
|
|
157
|
+
* names so a typo is a compile error. Keys absent from `Args` (e.g. `narration`
|
|
158
|
+
* on a screenshot) or kinds not declared are not added. When combined with
|
|
159
|
+
* `localize(...)`, the per-fixture records intersect, unioning the names.
|
|
160
|
+
*/
|
|
161
|
+
type StudioOverrides<Args, SD> = ('narration' extends keyof Args ? [StudioNarrationNamesOf<SD>] extends [never] ? object : {
|
|
162
|
+
narration: Record<StudioNarrationNamesOf<SD>, NarrationCue>;
|
|
163
|
+
} : object) & ('text' extends keyof Args ? [StudioTextNamesOf<SD>] extends [never] ? object : {
|
|
164
|
+
text: Record<StudioTextNamesOf<SD>, string>;
|
|
165
|
+
} : object) & ('overlays' extends keyof Args ? [StudioOverlayNamesOf<SD>] extends [never] ? object : {
|
|
166
|
+
overlays: Record<StudioOverlayNamesOf<SD>, OverlayController>;
|
|
167
|
+
} : object) & ('audio' extends keyof Args ? [StudioAudioNamesOf<SD>] extends [never] ? object : {
|
|
168
|
+
audio: Record<StudioAudioNamesOf<SD>, AudioController>;
|
|
169
|
+
} : object);
|
|
170
|
+
type MergeArgs<Args, O> = Omit<Args, keyof O> & O;
|
|
171
|
+
type BodyFn<Args> = (args: Args, testInfo: TestInfo) => void | Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* A chainable fan-out builder. Callable to register the test(s), and exposes
|
|
174
|
+
* `.localize()` / `.each()` to refine the fan-out before the terminal call. `O`
|
|
175
|
+
* accumulates the typed fixture overrides from `.localize(...)` so the body sees
|
|
176
|
+
* `narration`/`text` typed to the spec's names.
|
|
177
|
+
*/
|
|
178
|
+
type BuilderTerminal<Args, O> = {
|
|
179
|
+
(title: string, body: BodyFn<MergeArgs<Args, O>>): void;
|
|
180
|
+
(title: string, details: TestDetails, body: BodyFn<MergeArgs<Args, O>>): void;
|
|
181
|
+
};
|
|
182
|
+
export interface VideoBuilder<Args, O = object> extends BuilderTerminal<Args, O> {
|
|
183
|
+
/** Record one localized pass per language (or one shared capture). */
|
|
184
|
+
localize<const S extends LocalizeSpec>(spec: S & ValidateLocalizeSpec<S>): VideoBuilder<Args, O & LocalizeOverrides<Args, S>>;
|
|
185
|
+
/**
|
|
186
|
+
* Defer render/record options and declare Studio-managed narration, text,
|
|
187
|
+
* overlays, and audio (configured in the ScreenCI web app). The declared name
|
|
188
|
+
* lists type the matching fixtures to the exact names.
|
|
189
|
+
*/
|
|
190
|
+
studio<const SD extends StudioDeclaration>(declaration: SD): VideoBuilder<Args, O & StudioOverrides<Args, SD>>;
|
|
191
|
+
/** Produce a separate video per variant (viewport, theme, ...). */
|
|
192
|
+
each(variants: EachVariant[]): VideoBuilder<Args, O>;
|
|
193
|
+
/** Register the localized test(s) with `test.only`. */
|
|
194
|
+
only: BuilderTerminal<Args, O>;
|
|
195
|
+
/** Register the localized test(s) with `test.skip`. */
|
|
196
|
+
skip: BuilderTerminal<Args, O>;
|
|
197
|
+
/** Register the localized test(s) with `test.fixme`. */
|
|
198
|
+
fixme: BuilderTerminal<Args, O>;
|
|
199
|
+
/** Register the localized test(s) with `test.fail`. */
|
|
200
|
+
fail: BuilderTerminal<Args, O>;
|
|
201
|
+
}
|
|
202
|
+
type BuilderState = {
|
|
203
|
+
localize: NormalizedLocalize | null;
|
|
204
|
+
studio: StudioDeclaration | null;
|
|
205
|
+
eachVariants: EachVariant[] | null;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Create a fan-out builder bound to a registrar test instance. `video.localize`
|
|
209
|
+
* and `video.each` are the `localize`/`each` methods of a root builder created
|
|
210
|
+
* with this factory. `Args` is the medium's fixture arg type (video/screenshot).
|
|
211
|
+
*/
|
|
212
|
+
export declare function createVideoBuilder<Args>(test: RegistrarTest, state?: BuilderState): VideoBuilder<Args>;
|
|
213
|
+
export {};
|
|
214
|
+
//# sourceMappingURL=builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAIxE,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAA;AACtB,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/E;;;;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B"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import { resolveLocaleForLanguage } from './locales.js';
|
|
3
|
+
import { parseRequestedLanguages } from './runtimeMode.js';
|
|
4
|
+
import { logger } from './logger.js';
|
|
5
|
+
import { normalizeLocalizeSpec, } from './localize.js';
|
|
6
|
+
import { validateStudioDeclaration } from './studio.js';
|
|
7
|
+
function variantVideoName(baseTitle, variant) {
|
|
8
|
+
return variant === null ? baseTitle : `${baseTitle} ${variant.key}`;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Expand the localize / each fan-out specs into the concrete list of Playwright
|
|
12
|
+
* tests to register. Pure and exported for testing.
|
|
13
|
+
*
|
|
14
|
+
* - With no `localize`, each variant yields a single language-agnostic test.
|
|
15
|
+
* - In `'shared'` mode, each variant yields one test that carries every language
|
|
16
|
+
* (narration is overdubbed at render); the `--languages` filter does not split
|
|
17
|
+
* a shared recording.
|
|
18
|
+
* - In `'per-language'` mode, each variant yields one test per language,
|
|
19
|
+
* intersected with the `--languages` filter when present. A variant whose
|
|
20
|
+
* languages are entirely filtered out yields nothing. The browser locale is set
|
|
21
|
+
* per language unless `browserLocale` is `false`.
|
|
22
|
+
*/
|
|
23
|
+
export function expandRegistrations(params) {
|
|
24
|
+
const { baseTitle, localize, studio, eachVariants, requestedLanguages } = params;
|
|
25
|
+
const variants = eachVariants ?? [null];
|
|
26
|
+
const registrations = [];
|
|
27
|
+
for (const variant of variants) {
|
|
28
|
+
const videoName = variantVideoName(baseTitle, variant);
|
|
29
|
+
const recordOptions = variant?.recordOptions ?? null;
|
|
30
|
+
const use = variant?.use ?? null;
|
|
31
|
+
const variantLabel = variant === null ? '' : `${variant.key} `;
|
|
32
|
+
if (localize === null) {
|
|
33
|
+
registrations.push({
|
|
34
|
+
describeTitle: variant?.key ?? baseTitle,
|
|
35
|
+
leafTitle: videoName,
|
|
36
|
+
videoName,
|
|
37
|
+
language: null,
|
|
38
|
+
locale: null,
|
|
39
|
+
recordOptions,
|
|
40
|
+
use,
|
|
41
|
+
localize: null,
|
|
42
|
+
studio,
|
|
43
|
+
});
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if (localize.mode === 'shared') {
|
|
47
|
+
registrations.push({
|
|
48
|
+
describeTitle: `${variantLabel}shared`.trim(),
|
|
49
|
+
leafTitle: videoName,
|
|
50
|
+
videoName,
|
|
51
|
+
language: null,
|
|
52
|
+
locale: null,
|
|
53
|
+
recordOptions,
|
|
54
|
+
use,
|
|
55
|
+
localize,
|
|
56
|
+
studio,
|
|
57
|
+
});
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const languages = requestedLanguages === null
|
|
61
|
+
? localize.languages
|
|
62
|
+
: localize.languages.filter((lang) => requestedLanguages.includes(lang));
|
|
63
|
+
for (const lang of languages) {
|
|
64
|
+
registrations.push({
|
|
65
|
+
describeTitle: `${variantLabel}${lang}`,
|
|
66
|
+
leafTitle: `${videoName} [${lang}]`,
|
|
67
|
+
videoName,
|
|
68
|
+
language: lang,
|
|
69
|
+
locale: localize.browserLocale
|
|
70
|
+
? resolveLocaleForLanguage(lang, localize.locales)
|
|
71
|
+
: null,
|
|
72
|
+
recordOptions,
|
|
73
|
+
use,
|
|
74
|
+
localize,
|
|
75
|
+
studio,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return registrations;
|
|
80
|
+
}
|
|
81
|
+
/** Internal option keys the page/context fixtures read off a registered test. */
|
|
82
|
+
const SCREENCI_LANGUAGE_OPTION = '_screenciLanguage';
|
|
83
|
+
const SCREENCI_VIDEO_NAME_OPTION = '_screenciVideoName';
|
|
84
|
+
const SCREENCI_LOCALIZE_OPTION = '_screenciLocalize';
|
|
85
|
+
const SCREENCI_STUDIO_OPTION = '_screenciStudio';
|
|
86
|
+
const SCREENCI_SOURCE_FILE_OPTION = '_screenciSourceFile';
|
|
87
|
+
/** Absolute path of this module, used to skip our own frames when capturing. */
|
|
88
|
+
const BUILDER_MODULE_PATH = fileURLToPath(import.meta.url);
|
|
89
|
+
/** Normalize a V8 call-site filename (which may be a `file://` URL) to a path. */
|
|
90
|
+
function callSiteFile(frame) {
|
|
91
|
+
const fileName = frame.getFileName();
|
|
92
|
+
if (!fileName)
|
|
93
|
+
return null;
|
|
94
|
+
return fileName.startsWith('file://') ? fileURLToPath(fileName) : fileName;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Capture the source file of the user's `.screenci` script that called the
|
|
98
|
+
* builder. Playwright attributes `testInfo.file` to this module (the test is
|
|
99
|
+
* registered here, not in the user's file), so asset paths authored relative to
|
|
100
|
+
* the script would otherwise resolve against this package. We walk the call
|
|
101
|
+
* stack and return the first frame outside this module, which is the script.
|
|
102
|
+
* Returns `null` if no such frame is found (fixtures then fall back to
|
|
103
|
+
* `testInfo.file`).
|
|
104
|
+
*/
|
|
105
|
+
function captureSourceFile() {
|
|
106
|
+
const originalPrepare = Error.prepareStackTrace;
|
|
107
|
+
const originalLimit = Error.stackTraceLimit;
|
|
108
|
+
try {
|
|
109
|
+
Error.stackTraceLimit = 50;
|
|
110
|
+
Error.prepareStackTrace = (_error, stack) => stack;
|
|
111
|
+
const stack = new Error().stack;
|
|
112
|
+
if (!Array.isArray(stack))
|
|
113
|
+
return null;
|
|
114
|
+
for (const frame of stack) {
|
|
115
|
+
const file = callSiteFile(frame);
|
|
116
|
+
if (file !== null && file !== BUILDER_MODULE_PATH) {
|
|
117
|
+
return file;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
Error.prepareStackTrace = originalPrepare;
|
|
124
|
+
Error.stackTraceLimit = originalLimit;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function registerOne(test, reg, details, body, modifier, sourceFile) {
|
|
128
|
+
const useOptions = {
|
|
129
|
+
...(reg.use ?? {}),
|
|
130
|
+
...(reg.recordOptions !== null ? { recordOptions: reg.recordOptions } : {}),
|
|
131
|
+
...(reg.locale !== null ? { locale: reg.locale } : {}),
|
|
132
|
+
[SCREENCI_LANGUAGE_OPTION]: reg.language ?? undefined,
|
|
133
|
+
[SCREENCI_VIDEO_NAME_OPTION]: reg.videoName,
|
|
134
|
+
[SCREENCI_LOCALIZE_OPTION]: reg.localize ?? undefined,
|
|
135
|
+
[SCREENCI_STUDIO_OPTION]: reg.studio ?? undefined,
|
|
136
|
+
[SCREENCI_SOURCE_FILE_OPTION]: sourceFile ?? undefined,
|
|
137
|
+
};
|
|
138
|
+
const register = modifier ? test[modifier] : test;
|
|
139
|
+
test.describe(reg.describeTitle, () => {
|
|
140
|
+
test.use(useOptions);
|
|
141
|
+
if (details !== undefined) {
|
|
142
|
+
register(reg.leafTitle, details, body);
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
register(reg.leafTitle, body);
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
function normalizeVariants(variants) {
|
|
150
|
+
if (variants.length === 0) {
|
|
151
|
+
throw new Error('video.each() requires at least one variant, e.g. .each([{ key: "mobile" }]).');
|
|
152
|
+
}
|
|
153
|
+
const seen = new Set();
|
|
154
|
+
for (const variant of variants) {
|
|
155
|
+
if (seen.has(variant.key)) {
|
|
156
|
+
throw new Error(`Duplicate video.each() variant key "${variant.key}". Variant keys must be unique.`);
|
|
157
|
+
}
|
|
158
|
+
seen.add(variant.key);
|
|
159
|
+
}
|
|
160
|
+
return variants;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Create a fan-out builder bound to a registrar test instance. `video.localize`
|
|
164
|
+
* and `video.each` are the `localize`/`each` methods of a root builder created
|
|
165
|
+
* with this factory. `Args` is the medium's fixture arg type (video/screenshot).
|
|
166
|
+
*/
|
|
167
|
+
export function createVideoBuilder(test, state = { localize: null, studio: null, eachVariants: null }) {
|
|
168
|
+
const runTerminal = (modifier, title, detailsOrBody, maybeBody) => {
|
|
169
|
+
const hasDetails = typeof detailsOrBody !== 'function';
|
|
170
|
+
const details = hasDetails ? detailsOrBody : undefined;
|
|
171
|
+
const body = (hasDetails ? maybeBody : detailsOrBody);
|
|
172
|
+
// Captured here, at the user's call site, so the script's path survives
|
|
173
|
+
// even though Playwright records the test as declared in this module.
|
|
174
|
+
const sourceFile = captureSourceFile();
|
|
175
|
+
// Studio-managed names must be unique and disjoint from the seeded localize
|
|
176
|
+
// names. Validate once, here, where both the localize spec and the studio
|
|
177
|
+
// declaration are known (they can be chained in either order).
|
|
178
|
+
validateStudioDeclaration(state.studio, state.localize?.narration?.seededNames ?? [], state.localize?.text?.seededNames ?? []);
|
|
179
|
+
const registrations = expandRegistrations({
|
|
180
|
+
baseTitle: title,
|
|
181
|
+
localize: state.localize,
|
|
182
|
+
studio: state.studio,
|
|
183
|
+
eachVariants: state.eachVariants,
|
|
184
|
+
requestedLanguages: parseRequestedLanguages(),
|
|
185
|
+
});
|
|
186
|
+
if (registrations.length === 0) {
|
|
187
|
+
logger.warn(`[screenci] "${title}" was skipped: none of its declared languages match the --languages filter.`);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
for (const reg of registrations) {
|
|
191
|
+
registerOne(test, reg, details, body, modifier, sourceFile);
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
const callable = ((title, detailsOrBody, maybeBody) => runTerminal(undefined, title, detailsOrBody, maybeBody));
|
|
195
|
+
for (const modifier of ['only', 'skip', 'fixme', 'fail']) {
|
|
196
|
+
callable[modifier] = ((title, detailsOrBody, maybeBody) => runTerminal(modifier, title, detailsOrBody, maybeBody));
|
|
197
|
+
}
|
|
198
|
+
callable.localize = ((spec) => createVideoBuilder(test, {
|
|
199
|
+
...state,
|
|
200
|
+
localize: normalizeLocalizeSpec(spec),
|
|
201
|
+
}));
|
|
202
|
+
callable.studio = ((declaration) => createVideoBuilder(test, {
|
|
203
|
+
...state,
|
|
204
|
+
studio: declaration,
|
|
205
|
+
}));
|
|
206
|
+
callable.each = (variants) => createVideoBuilder(test, {
|
|
207
|
+
...state,
|
|
208
|
+
eachVariants: normalizeVariants(variants),
|
|
209
|
+
});
|
|
210
|
+
return callable;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAOxC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EACL,qBAAqB,GAItB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,yBAAyB,EAA0B,MAAM,aAAa,CAAA;AAuC/E,SAAS,gBAAgB,CACvB,SAAiB,EACjB,OAA2B;IAE3B,OAAO,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAA;AACrE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAMnC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,GACrE,MAAM,CAAA;IACR,MAAM,QAAQ,GAA2B,YAAY,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/D,MAAM,aAAa,GAAmB,EAAE,CAAA;IAExC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAG,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;QACtD,MAAM,aAAa,GAAG,OAAO,EAAE,aAAa,IAAI,IAAI,CAAA;QACpD,MAAM,GAAG,GAAG,OAAO,E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