lib-e2e-cypress-for-dummys-ts 0.6.0 → 0.8.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.
- package/README.md +87 -1
- package/dist/index.cjs +1622 -152
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +213 -5
- package/dist/index.d.ts +213 -5
- package/dist/index.js +1605 -153
- package/dist/index.js.map +1 -1
- package/package.json +8 -1
package/dist/index.d.cts
CHANGED
|
@@ -36,6 +36,7 @@ declare class RecordingService {
|
|
|
36
36
|
private readonly isPaused$;
|
|
37
37
|
private readonly selectorNotFound$;
|
|
38
38
|
private readonly inputDebounceTimers;
|
|
39
|
+
private readonly fixtures;
|
|
39
40
|
private readonly abort;
|
|
40
41
|
selectorStrategy: SelectorStrategy;
|
|
41
42
|
/** Stable id of the current live session (null when none has started). */
|
|
@@ -65,7 +66,13 @@ declare class RecordingService {
|
|
|
65
66
|
removeCommand(index: number): void;
|
|
66
67
|
moveCommand(from: number, to: number): void;
|
|
67
68
|
removeInterceptor(index: number): void;
|
|
68
|
-
registerInterceptor(method: string, url: string, alias: string): void;
|
|
69
|
+
registerInterceptor(method: string, url: string, alias: string, fixtureFile?: string): void;
|
|
70
|
+
/** Registers a captured response as a Cypress fixture (name → JSON content). */
|
|
71
|
+
registerFixture(name: string, content: string): void;
|
|
72
|
+
getFixturesSnapshot(): Array<{
|
|
73
|
+
name: string;
|
|
74
|
+
content: string;
|
|
75
|
+
}>;
|
|
69
76
|
clearCommands(): void;
|
|
70
77
|
clearInterceptors(): void;
|
|
71
78
|
getCommandsSnapshot(): string[];
|
|
@@ -83,13 +90,30 @@ declare class RecordingService {
|
|
|
83
90
|
onSessionChange(fn: (state: ActiveSessionState) => void): () => void;
|
|
84
91
|
onSelectorNotFound(fn: (target: HTMLElement, action: 'click') => void): () => void;
|
|
85
92
|
destroy(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Alt+click captures an ASSERTION for the element instead of a click, and
|
|
95
|
+
* suppresses the element's real action. Runs in the capture phase so it fires
|
|
96
|
+
* before the app's handlers and before the bubble-phase click listener below
|
|
97
|
+
* (stopImmediatePropagation prevents a duplicate `.click()`). See spec 009.
|
|
98
|
+
*/
|
|
99
|
+
private listenToAssertClicks;
|
|
86
100
|
private listenToClicks;
|
|
101
|
+
/** Centralised selector resolution for the pointer/key listeners (spec 010). */
|
|
102
|
+
private resolveSelectorFor;
|
|
103
|
+
private listenToDoubleClicks;
|
|
104
|
+
private listenToContextMenu;
|
|
105
|
+
/** Enter → type('{enter}'), Escape → type('{esc}'), only inside a field. */
|
|
106
|
+
private listenToKeys;
|
|
87
107
|
private listenToInput;
|
|
88
108
|
private listenToSelect;
|
|
89
109
|
private listenToRouteChanges;
|
|
90
110
|
private handleClickEvent;
|
|
91
111
|
private handleMatOptionClick;
|
|
92
112
|
private handleInputEvent;
|
|
113
|
+
/** Records a text field's current value as a `clear().type()` command. */
|
|
114
|
+
private recordInputValue;
|
|
115
|
+
/** Flushes any pending debounced value for an element, recording it now. */
|
|
116
|
+
private flushInputDebounce;
|
|
93
117
|
private handleSelectEvent;
|
|
94
118
|
private addGenericCommand;
|
|
95
119
|
private getReliableSelector;
|
|
@@ -129,6 +153,48 @@ declare const RESUME_TTL_CONFIG_KEY = "resumeRecencyTtlMinutes";
|
|
|
129
153
|
/** Default minutes within which an active session resumes silently. */
|
|
130
154
|
declare const DEFAULT_RESUME_TTL_MINUTES = 30;
|
|
131
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Issue-tracker presets for the *link-only* ticket reference (spec 014).
|
|
158
|
+
*
|
|
159
|
+
* These are static, data-driven descriptors — there is NO API call, no auth and
|
|
160
|
+
* no synchronisation. A provider only knows how to turn a ticket id plus a few
|
|
161
|
+
* user-supplied fields into a deep link. Adding a new tracker is a single entry
|
|
162
|
+
* in {@link ISSUE_TRACKER_PROVIDERS}; no new code paths are required.
|
|
163
|
+
*/
|
|
164
|
+
/** A single user-configured field a provider needs to build its links. */
|
|
165
|
+
interface IssueTrackerField {
|
|
166
|
+
/** Token used in {@link IssueTrackerProvider.urlTemplate}, e.g. `org`. */
|
|
167
|
+
key: string;
|
|
168
|
+
/** i18n key for the field's label in the configuration panel. */
|
|
169
|
+
labelKey: string;
|
|
170
|
+
/** i18n key for the field's input placeholder. */
|
|
171
|
+
placeholderKey: string;
|
|
172
|
+
}
|
|
173
|
+
/** A link-only issue-tracker descriptor. */
|
|
174
|
+
interface IssueTrackerProvider {
|
|
175
|
+
/** Stable id persisted in configuration, e.g. `jira`. */
|
|
176
|
+
id: string;
|
|
177
|
+
/** Display name — a proper noun (Jira, GitHub…), not translated. */
|
|
178
|
+
labelKey: string;
|
|
179
|
+
/**
|
|
180
|
+
* URL template with `{id}` plus one token per field. For `custom` the template
|
|
181
|
+
* itself comes from a field (`{template}`), so a single substitution path serves
|
|
182
|
+
* every provider.
|
|
183
|
+
*/
|
|
184
|
+
urlTemplate: string;
|
|
185
|
+
/** Structured fields the user fills in Settings for this provider. */
|
|
186
|
+
fields: IssueTrackerField[];
|
|
187
|
+
/** Regex source used for a soft (non-blocking) id-format warning. */
|
|
188
|
+
idPattern: string;
|
|
189
|
+
/** i18n key for the ticket-id input placeholder in the save dialog. */
|
|
190
|
+
idPlaceholderKey: string;
|
|
191
|
+
}
|
|
192
|
+
declare const ISSUE_TRACKER_PROVIDERS: IssueTrackerProvider[];
|
|
193
|
+
/** Feature is inert until configured: default to a custom, empty template. */
|
|
194
|
+
declare const DEFAULT_ISSUE_TRACKER_PROVIDER_ID = "custom";
|
|
195
|
+
/** Looks up a provider by id, or `undefined` when unknown. */
|
|
196
|
+
declare function findIssueTrackerProvider(id: string): IssueTrackerProvider | undefined;
|
|
197
|
+
|
|
132
198
|
declare class TranslationService {
|
|
133
199
|
private readonly lang$;
|
|
134
200
|
private readonly translations;
|
|
@@ -181,6 +247,7 @@ interface TestRecord {
|
|
|
181
247
|
createdAt: number;
|
|
182
248
|
tags?: string[];
|
|
183
249
|
notes?: string;
|
|
250
|
+
ticketId?: string;
|
|
184
251
|
}
|
|
185
252
|
interface CommandRecord {
|
|
186
253
|
id: number;
|
|
@@ -212,9 +279,15 @@ declare class PersistenceService {
|
|
|
212
279
|
private _db;
|
|
213
280
|
constructor(dbName?: string);
|
|
214
281
|
private getDB;
|
|
215
|
-
insertTest(name: string, commands?: string[], interceptors?: string[], tags?: string[], notes?: string): Promise<number>;
|
|
282
|
+
insertTest(name: string, commands?: string[], interceptors?: string[], tags?: string[], notes?: string, ticketId?: string): Promise<number>;
|
|
216
283
|
getAllTests(): Promise<TestWithDetails[]>;
|
|
217
284
|
getTestById(testId: number): Promise<TestDetail | null>;
|
|
285
|
+
/**
|
|
286
|
+
* Builds the traceability comment for a test record (spec 014), reading the
|
|
287
|
+
* configured issue-tracker provider/params so the link — when resolvable — is
|
|
288
|
+
* embedded. Returns `null` when the record has no ticket id.
|
|
289
|
+
*/
|
|
290
|
+
private ticketCommentFor;
|
|
218
291
|
deleteTest(id: number): Promise<void>;
|
|
219
292
|
insertCommands(commands: string[], testId: number): Promise<void>;
|
|
220
293
|
getCommandsByTestId(testId: number): Promise<CommandRecord[]>;
|
|
@@ -237,6 +310,15 @@ declare class PersistenceService {
|
|
|
237
310
|
clearAllData(): Promise<void>;
|
|
238
311
|
ingestFileData(tests: Record<string, unknown>[], interceptors: Record<string, unknown>[]): Promise<void>;
|
|
239
312
|
requestDirectoryPermissions(): Promise<void>;
|
|
313
|
+
/**
|
|
314
|
+
* Writes captured fixtures into `cypress/fixtures/` using the configured Cypress
|
|
315
|
+
* folder handle (spec 012). Returns the number written. Throws if no folder is
|
|
316
|
+
* configured or write permission is denied.
|
|
317
|
+
*/
|
|
318
|
+
writeFixtures(fixtures: Array<{
|
|
319
|
+
name: string;
|
|
320
|
+
content: string;
|
|
321
|
+
}>): Promise<number>;
|
|
240
322
|
private bulkInsertWithoutId;
|
|
241
323
|
}
|
|
242
324
|
declare const persistenceService: PersistenceService;
|
|
@@ -250,6 +332,7 @@ declare class HttpMonitor {
|
|
|
250
332
|
install(): void;
|
|
251
333
|
uninstall(): void;
|
|
252
334
|
isExtendedHttpEnabled(): boolean;
|
|
335
|
+
isFixtureModeEnabled(): boolean;
|
|
253
336
|
private installFetch;
|
|
254
337
|
private uninstallFetch;
|
|
255
338
|
private installXhr;
|
|
@@ -259,7 +342,7 @@ declare class HttpMonitor {
|
|
|
259
342
|
}
|
|
260
343
|
|
|
261
344
|
declare const SCROLLBAR_STYLES = "\n.swal2-popup::-webkit-scrollbar,\n.swal2-html-container::-webkit-scrollbar,\n.swal2-content::-webkit-scrollbar,\n.swal2-container::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background: transparent;\n}\n.swal2-popup::-webkit-scrollbar-thumb,\n.swal2-html-container::-webkit-scrollbar-thumb,\n.swal2-content::-webkit-scrollbar-thumb,\n.swal2-container::-webkit-scrollbar-thumb {\n background: #30363d;\n border-radius: 3px;\n}\n.swal2-popup::-webkit-scrollbar-thumb:hover,\n.swal2-html-container::-webkit-scrollbar-thumb:hover,\n.swal2-content::-webkit-scrollbar-thumb:hover {\n background: #484f58;\n}\n.swal2-popup::-webkit-scrollbar-track,\n.swal2-html-container::-webkit-scrollbar-track,\n.swal2-content::-webkit-scrollbar-track,\n.swal2-container::-webkit-scrollbar-track {\n background: transparent;\n}\n.swal2-popup, .swal2-html-container, .swal2-content, .swal2-container {\n scrollbar-width: thin;\n scrollbar-color: #30363d transparent;\n}\n";
|
|
262
|
-
declare const LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES = "\n.swal2-container, .swal2-popup {\n z-index: 99999 !important;\n}\n.swal2-container {\n padding: 0 !important;\n align-items: center !important;\n justify-content: center !important;\n}\n.swal2-popup {\n background: #161b22 !important;\n color: #e6edf3 !important;\n border-radius: 12px !important;\n box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 0 1px #30363d !important;\n border: none !important;\n padding: 0 !important;\n min-width: 400px;\n max-width: 90vw;\n min-height: 200px;\n max-height: 90vh;\n}\n/* Override SweetAlert2 v11's display:grid on .swal2-popup.swal2-modal */\n.swal2-popup.swal2-modal {\n display: flex !important;\n flex-direction: column !important;\n align-items: stretch !important;\n overflow: hidden !important;\n}\n.swal2-header {\n flex-shrink: 0 !important;\n flex-grow: 0 !important;\n overflow: hidden !important;\n}\n.swal2-title {\n color: #e6edf3 !important;\n font-weight: 600 !important;\n font-size: 14px !important;\n background: #161b22;\n padding: 14px 48px 13px 18px !important;\n margin: 0 !important;\n border-bottom: 1px solid #21262d;\n text-align: left !important;\n letter-spacing: 0.1px;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n}\n.swal2-close {\n position: absolute !important;\n top: 10px !important;\n right: 12px !important;\n color: #8b949e !important;\n font-size: 1.1rem !important;\n z-index: 1 !important;\n border-radius: 6px !important;\n width: 28px !important;\n height: 28px !important;\n line-height: 28px !important;\n transition: background 0.15s, color 0.15s !important;\n}\n.swal2-close:hover {\n background: #21262d !important;\n color: #e6edf3 !important;\n}\n/* In SweetAlert2 v11, .swal2-html-container is a direct child of .swal2-popup */\n.swal2-html-container {\n flex: 1 !important;\n min-height: 0 !important;\n background: #161b22;\n padding: 0 !important;\n margin: 0 !important;\n width: 100%;\n display: flex !important;\n flex-direction: column !important;\n align-items: stretch;\n box-sizing: border-box;\n overflow: hidden !important;\n}\n/* The single wrapper div we inject inside each modal fills the container */\n.swal2-html-container > div {\n flex: 1 !important;\n min-height: 0 !important;\n display: flex !important;\n flex-direction: column !important;\n overflow: hidden !important;\n}\n.swal2-actions, .swal2-footer {\n flex-shrink: 0 !important;\n flex-grow: 0 !important;\n}\n";
|
|
345
|
+
declare const LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES = "\n.swal2-container, .swal2-popup {\n z-index: 99999 !important;\n}\n.swal2-container {\n padding: 0 !important;\n align-items: center !important;\n justify-content: center !important;\n}\n.swal2-popup {\n background: #161b22 !important;\n color: #e6edf3 !important;\n border-radius: 12px !important;\n box-shadow: 0 24px 64px rgba(0,0,0,0.72), 0 0 0 1px #30363d !important;\n border: none !important;\n padding: 0 !important;\n min-width: 400px;\n max-width: 90vw;\n min-height: 200px;\n max-height: 90vh;\n}\n/* Override SweetAlert2 v11's display:grid on .swal2-popup.swal2-modal */\n.swal2-popup.swal2-modal {\n display: flex !important;\n flex-direction: column !important;\n align-items: stretch !important;\n overflow: hidden !important;\n}\n.swal2-header {\n flex-shrink: 0 !important;\n flex-grow: 0 !important;\n overflow: hidden !important;\n}\n.swal2-title {\n color: #e6edf3 !important;\n font-weight: 600 !important;\n font-size: 14px !important;\n background: #161b22;\n padding: 14px 48px 13px 18px !important;\n margin: 0 !important;\n border-bottom: 1px solid #21262d;\n text-align: left !important;\n letter-spacing: 0.1px;\n white-space: nowrap !important;\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n}\n.swal2-close {\n position: absolute !important;\n top: 10px !important;\n right: 12px !important;\n color: #8b949e !important;\n font-size: 1.1rem !important;\n z-index: 1 !important;\n border-radius: 6px !important;\n width: 28px !important;\n height: 28px !important;\n line-height: 28px !important;\n transition: background 0.15s, color 0.15s !important;\n}\n.swal2-close:hover {\n background: #21262d !important;\n color: #e6edf3 !important;\n}\n/* In SweetAlert2 v11, .swal2-html-container is a direct child of .swal2-popup */\n.swal2-html-container {\n flex: 1 !important;\n min-height: 0 !important;\n background: #161b22;\n padding: 0 !important;\n margin: 0 !important;\n width: 100%;\n display: flex !important;\n flex-direction: column !important;\n align-items: stretch;\n box-sizing: border-box;\n overflow: hidden !important;\n /* Left-align modal body text/code (SweetAlert defaults it to centre, which\n inherits into the panels \u2014 including their shadow DOM). Titles/buttons keep\n their own alignment. */\n text-align: left !important;\n}\n/* The single wrapper div we inject inside each modal fills the container */\n.swal2-html-container > div {\n flex: 1 !important;\n min-height: 0 !important;\n display: flex !important;\n flex-direction: column !important;\n overflow: hidden !important;\n}\n.swal2-actions, .swal2-footer {\n flex-shrink: 0 !important;\n flex-grow: 0 !important;\n}\n";
|
|
263
346
|
declare function injectStyles(css: string, id: string): void;
|
|
264
347
|
|
|
265
348
|
declare function makeModalResizable(modal: HTMLElement, options?: {
|
|
@@ -334,6 +417,85 @@ declare function defaultTogglePosition(vw: number, vh: number): Point;
|
|
|
334
417
|
/** Box top-left for a given (clamped) toggle-centre and direction. */
|
|
335
418
|
declare function boxTopLeftFor(toggleCentre: Point, dir: ExpandDirection): Point;
|
|
336
419
|
|
|
420
|
+
/**
|
|
421
|
+
* Infers a sensible Cypress assertion for an element, given the selector already
|
|
422
|
+
* resolved for it (spec 009 — Alt+click assertion capture):
|
|
423
|
+
*
|
|
424
|
+
* - checkbox / radio → should('be.checked' | 'not.be.checked')
|
|
425
|
+
* - input/textarea/select → should('have.value', '<value>') (or be.visible if empty)
|
|
426
|
+
* - short visible text → should('contain.text', '<text>')
|
|
427
|
+
* - otherwise → should('be.visible')
|
|
428
|
+
*
|
|
429
|
+
* All embedded values/text are single-quote escaped so the generated command is
|
|
430
|
+
* always valid JS.
|
|
431
|
+
*/
|
|
432
|
+
declare function inferAssertionCommand(el: HTMLElement, selector: string): string;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Ticket-reference helpers for the link-only issue-tracker feature (spec 014).
|
|
436
|
+
*
|
|
437
|
+
* Pure functions: no DOM, no network. `buildTicketUrl` never trusts its inputs —
|
|
438
|
+
* it only returns a URL when the result parses to a safe `http(s)` link, which is
|
|
439
|
+
* what guards a user-supplied custom template from `javascript:`/`data:` injection.
|
|
440
|
+
*/
|
|
441
|
+
/**
|
|
442
|
+
* Resolves a provider template into a deep link for `id`.
|
|
443
|
+
*
|
|
444
|
+
* Substitutes each `{fieldKey}` (custom's `{template}` first, so a template that
|
|
445
|
+
* itself contains `{id}` is handled by the same path) and then `{id}` (URL-encoded).
|
|
446
|
+
* Returns `null` when a required field is missing, a token is left unresolved, or
|
|
447
|
+
* the result is not a valid `http:`/`https:` URL.
|
|
448
|
+
*/
|
|
449
|
+
declare function buildTicketUrl(provider: IssueTrackerProvider, params: Record<string, string>, id: string): string | null;
|
|
450
|
+
/**
|
|
451
|
+
* Convenience wrapper for the configuration shape: looks up the provider by id and
|
|
452
|
+
* picks its field values out of the per-provider `allParams` map before delegating
|
|
453
|
+
* to {@link buildTicketUrl}. Returns `null` for an unknown provider, an empty id, or
|
|
454
|
+
* any input that would not resolve to a safe `http(s)` link.
|
|
455
|
+
*/
|
|
456
|
+
declare function resolveTicketUrl(providerId: string, allParams: Record<string, Record<string, string>>, ticketId?: string): string | null;
|
|
457
|
+
/**
|
|
458
|
+
* Builds the traceability comment emitted above the generated `it()` block:
|
|
459
|
+
* `// {id} — {url}` when a link is available, otherwise `// {id}`.
|
|
460
|
+
*/
|
|
461
|
+
declare function buildTicketComment(id: string, url: string | null): string;
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Hand-authored Cypress autocomplete data (spec 013). Pure — no CodeMirror — so
|
|
465
|
+
* it is unit-testable; `code-editor.ts` wraps it into a CodeMirror CompletionSource.
|
|
466
|
+
*/
|
|
467
|
+
/** Methods offered after typing `cy.` */
|
|
468
|
+
declare const CY_METHODS: string[];
|
|
469
|
+
/** Methods offered after a chained `.` (e.g. `cy.get('x').`). */
|
|
470
|
+
declare const CHAIN_METHODS: string[];
|
|
471
|
+
/** Top-level identifiers offered at the start of a statement. */
|
|
472
|
+
declare const TOP_LEVEL: string[];
|
|
473
|
+
/** All completion labels (used for the pure filter and tests). */
|
|
474
|
+
declare const CYPRESS_COMPLETIONS: string[];
|
|
475
|
+
/** Case-insensitive substring filter over a label list. */
|
|
476
|
+
declare function filterCompletions(list: string[], prefix: string): string[];
|
|
477
|
+
/** Convenience filter over the full completion set. */
|
|
478
|
+
declare function filterCypressCompletions(prefix: string): string[];
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Lazy CodeMirror 6 factory for the code editor (spec 013). CodeMirror is loaded
|
|
482
|
+
* on demand (its own chunk) via dynamic import, so it never bloats the initial
|
|
483
|
+
* bundle. Browser-only; not exercised in jsdom (see the file-preview fallback).
|
|
484
|
+
*/
|
|
485
|
+
interface CodeEditorHandle {
|
|
486
|
+
getValue(): string;
|
|
487
|
+
setValue(value: string): void;
|
|
488
|
+
focus(): void;
|
|
489
|
+
destroy(): void;
|
|
490
|
+
}
|
|
491
|
+
interface CreateCodeEditorOptions {
|
|
492
|
+
parent: HTMLElement;
|
|
493
|
+
root?: Document | ShadowRoot;
|
|
494
|
+
doc: string;
|
|
495
|
+
onChange?: (value: string) => void;
|
|
496
|
+
}
|
|
497
|
+
declare function createCodeEditor(opts: CreateCodeEditorOptions): Promise<CodeEditorHandle>;
|
|
498
|
+
|
|
337
499
|
declare class SelectorPickerElement extends HTMLElement {
|
|
338
500
|
targetElement: HTMLElement | null;
|
|
339
501
|
recording: RecordingService;
|
|
@@ -391,6 +553,9 @@ declare class SaveTestElement extends HTMLElement {
|
|
|
391
553
|
description: string;
|
|
392
554
|
notes: string;
|
|
393
555
|
tags: string[];
|
|
556
|
+
ticketId: string;
|
|
557
|
+
/** Set by the host from config so the ticket placeholder/validation is provider-aware. */
|
|
558
|
+
issueTrackerProviderId: string;
|
|
394
559
|
translation: TranslationService;
|
|
395
560
|
constructor();
|
|
396
561
|
connectedCallback(): void;
|
|
@@ -403,6 +568,8 @@ declare class SaveTestElement extends HTMLElement {
|
|
|
403
568
|
addTag(tag: string): void;
|
|
404
569
|
removeTag(tag: string): void;
|
|
405
570
|
private t;
|
|
571
|
+
/** Builds the ticket field view: provider-aware placeholder + soft (non-blocking) format check. */
|
|
572
|
+
private ticketView;
|
|
406
573
|
private dispatch;
|
|
407
574
|
private render;
|
|
408
575
|
}
|
|
@@ -418,9 +585,13 @@ declare class TestEditorElement extends HTMLElement {
|
|
|
418
585
|
selectMode: boolean;
|
|
419
586
|
selectedIds: Set<number>;
|
|
420
587
|
describeName: string;
|
|
588
|
+
groupByTicket: boolean;
|
|
589
|
+
issueTrackerProviderId: string;
|
|
590
|
+
issueTrackerParams: Record<string, Record<string, string>>;
|
|
421
591
|
constructor();
|
|
422
592
|
connectedCallback(): void;
|
|
423
593
|
loadTests(): Promise<void>;
|
|
594
|
+
toggleGroupByTicket(): void;
|
|
424
595
|
deleteTest(id: number): Promise<void>;
|
|
425
596
|
toggleExpand(index: number): void;
|
|
426
597
|
hasInterceptors(testId: number): boolean;
|
|
@@ -440,10 +611,13 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
440
611
|
translation: TranslationService;
|
|
441
612
|
selectedLanguage: string;
|
|
442
613
|
advancedHttpConfig: boolean;
|
|
614
|
+
fixtureMode: boolean;
|
|
443
615
|
selectorStrategy: SelectorStrategy;
|
|
444
616
|
smartSelectorEnabled: boolean;
|
|
445
617
|
startHidden: boolean;
|
|
446
618
|
resumeTtlMinutes: number;
|
|
619
|
+
issueTrackerProviderId: string;
|
|
620
|
+
issueTrackerParams: Record<string, Record<string, string>>;
|
|
447
621
|
isExporting: boolean;
|
|
448
622
|
exportMode: ExportMode;
|
|
449
623
|
exportTests: TestWithDetails[];
|
|
@@ -457,8 +631,13 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
457
631
|
private loadConfig;
|
|
458
632
|
onLanguageChange(lang: string): Promise<void>;
|
|
459
633
|
onAdvancedHttpConfigChange(checked: boolean): void;
|
|
634
|
+
onFixtureModeChange(checked: boolean): void;
|
|
460
635
|
onStartHiddenChange(checked: boolean): Promise<void>;
|
|
461
636
|
onResumeTtlChange(minutes: number): Promise<void>;
|
|
637
|
+
/** Selects the issue-tracker provider (link-only, no sync — spec 014). */
|
|
638
|
+
onIssueTrackerProviderChange(id: string): Promise<void>;
|
|
639
|
+
/** Stores a provider field value, scoped to the active provider so switching keeps values. */
|
|
640
|
+
onIssueTrackerParamChange(fieldKey: string, value: string): Promise<void>;
|
|
462
641
|
onResetWidgetPosition(): void;
|
|
463
642
|
onSmartSelectorChange(enabled: boolean): Promise<void>;
|
|
464
643
|
onSelectorStrategyChange(strategy: SelectorStrategy): Promise<void>;
|
|
@@ -527,6 +706,7 @@ declare class AdvancedTestEditorElement extends HTMLElement {
|
|
|
527
706
|
declare class FilePreviewElement extends HTMLElement {
|
|
528
707
|
private shadow;
|
|
529
708
|
private textarea;
|
|
709
|
+
private editor;
|
|
530
710
|
fileName: string | null;
|
|
531
711
|
closeLabel: string;
|
|
532
712
|
translation: TranslationService;
|
|
@@ -546,7 +726,10 @@ declare class FilePreviewElement extends HTMLElement {
|
|
|
546
726
|
private _runOutput;
|
|
547
727
|
constructor();
|
|
548
728
|
connectedCallback(): void;
|
|
729
|
+
disconnectedCallback(): void;
|
|
549
730
|
private t;
|
|
731
|
+
/** Current editor content (CodeMirror if upgraded, else the textarea/fallback). */
|
|
732
|
+
private currentValue;
|
|
550
733
|
get fileContent(): string | null;
|
|
551
734
|
set fileContent(v: string | null);
|
|
552
735
|
saveFile(): void;
|
|
@@ -567,6 +750,26 @@ declare class FilePreviewElement extends HTMLElement {
|
|
|
567
750
|
*/
|
|
568
751
|
insertBlocks(): void;
|
|
569
752
|
private render;
|
|
753
|
+
/**
|
|
754
|
+
* Lazily upgrades the textarea to a CodeMirror editor (syntax highlight +
|
|
755
|
+
* Cypress autocomplete). On any failure the textarea is left in place, so the
|
|
756
|
+
* editor degrades gracefully when CodeMirror can't load.
|
|
757
|
+
*/
|
|
758
|
+
private upgradeEditor;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* `<help-panel>` — an in-app guide (spec 011). Two tabs: a quick reference
|
|
763
|
+
* cheat-sheet and a verbose usage guide (workflow + coverage). Content is driven
|
|
764
|
+
* by the HELP.* i18n keys.
|
|
765
|
+
*/
|
|
766
|
+
declare class HelpPanelElement extends HTMLElement {
|
|
767
|
+
private shadow;
|
|
768
|
+
private activeTab;
|
|
769
|
+
translation: TranslationService;
|
|
770
|
+
constructor();
|
|
771
|
+
connectedCallback(): void;
|
|
772
|
+
private render;
|
|
570
773
|
}
|
|
571
774
|
|
|
572
775
|
declare class LibE2eRecorderElement extends HTMLElement {
|
|
@@ -592,6 +795,7 @@ declare class LibE2eRecorderElement extends HTMLElement {
|
|
|
592
795
|
private _previsualizerRef;
|
|
593
796
|
private httpMonitor?;
|
|
594
797
|
private smartSelectorEnabled;
|
|
798
|
+
private _needsRecordingRebuild;
|
|
595
799
|
recording: RecordingService;
|
|
596
800
|
persistence: PersistenceService;
|
|
597
801
|
translation: TranslationService;
|
|
@@ -605,6 +809,7 @@ declare class LibE2eRecorderElement extends HTMLElement {
|
|
|
605
809
|
isSaveTestDialogOpen: boolean;
|
|
606
810
|
isSettingsDialogOpen: boolean;
|
|
607
811
|
isAdvancedEditorDialogOpen: boolean;
|
|
812
|
+
isHelpDialogOpen: boolean;
|
|
608
813
|
constructor();
|
|
609
814
|
connectedCallback(): void;
|
|
610
815
|
disconnectedCallback(): void;
|
|
@@ -663,15 +868,18 @@ declare class LibE2eRecorderElement extends HTMLElement {
|
|
|
663
868
|
showSavedTestsDialog(): void;
|
|
664
869
|
showSaveTestDialog(): void;
|
|
665
870
|
showSettingsDialog(): void;
|
|
871
|
+
showHelpDialog(): void;
|
|
666
872
|
showAdvancedEditorDialog(testId?: number): void;
|
|
667
873
|
private showFileEditorDialog;
|
|
668
874
|
private onSaveTest;
|
|
669
875
|
private onSaveAndExportTest;
|
|
876
|
+
/** Writes captured fixtures to cypress/fixtures and toasts the outcome (spec 012). */
|
|
877
|
+
private writeFixturesIfAny;
|
|
670
878
|
private toggleModal;
|
|
671
879
|
private resizePopup;
|
|
672
880
|
private render;
|
|
673
881
|
}
|
|
674
882
|
|
|
675
|
-
declare const VERSION = "0.
|
|
883
|
+
declare const VERSION = "0.8.0";
|
|
676
884
|
|
|
677
|
-
export { ACTIVE_SESSION_BREADCRUMB_KEY, type ActiveSessionState, AdvancedTestEditorElement, AdvancedTestTransformationService, ConfigurationElement, type DBSchema, type DBStore, type DBStoreIndex, DB_SCHEMA, DB_STORE_NAMES, DEFAULT_RESUME_TTL_MINUTES, DRAG_THRESHOLD, type DirectoryNode, type ExpandDirection, type ExportMode, type ExportSelectionOptions, type FileNode, FilePreviewElement, HttpMonitor, INPUT_TYPES, type InputType, LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES, LOCALE_BY_LANG, type Lang, LibE2eRecorderElement, PersistenceService, type Point, RESUME_TTL_CONFIG_KEY, RecordingService, SCROLLBAR_STYLES, SUPPORTED_LANGS, SaveTestElement, SelectorPickerElement, type SelectorStrategy, Subject, TOGGLE_MARGIN, type TestDetail, TestEditorElement, TestPrevisualizerElement, type TestWithDetails, TransformationService, TranslationService, VERSION, advancedTestTransformationService, boxOffsetForDirection, boxTopLeftFor, clampTogglePosition, defaultTogglePosition, generateAlias, injectStyles, isLang, isLocalHost, localeForLang, makeModalResizable, makeSwalDraggable, makeSwalDraggableByContentId, persistenceService, resolveExpandDirection, selectTestsForExport, setSwal2DataCyAttribute, showToast, transformationService, translationService };
|
|
885
|
+
export { ACTIVE_SESSION_BREADCRUMB_KEY, type ActiveSessionState, AdvancedTestEditorElement, AdvancedTestTransformationService, CHAIN_METHODS, CYPRESS_COMPLETIONS, CY_METHODS, type CodeEditorHandle, ConfigurationElement, type CreateCodeEditorOptions, type DBSchema, type DBStore, type DBStoreIndex, DB_SCHEMA, DB_STORE_NAMES, DEFAULT_ISSUE_TRACKER_PROVIDER_ID, DEFAULT_RESUME_TTL_MINUTES, DRAG_THRESHOLD, type DirectoryNode, type ExpandDirection, type ExportMode, type ExportSelectionOptions, type FileNode, FilePreviewElement, HelpPanelElement, HttpMonitor, INPUT_TYPES, ISSUE_TRACKER_PROVIDERS, type InputType, type IssueTrackerField, type IssueTrackerProvider, LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES, LOCALE_BY_LANG, type Lang, LibE2eRecorderElement, PersistenceService, type Point, RESUME_TTL_CONFIG_KEY, RecordingService, SCROLLBAR_STYLES, SUPPORTED_LANGS, SaveTestElement, SelectorPickerElement, type SelectorStrategy, Subject, TOGGLE_MARGIN, TOP_LEVEL, type TestDetail, TestEditorElement, TestPrevisualizerElement, type TestWithDetails, TransformationService, TranslationService, VERSION, advancedTestTransformationService, boxOffsetForDirection, boxTopLeftFor, buildTicketComment, buildTicketUrl, clampTogglePosition, createCodeEditor, defaultTogglePosition, filterCompletions, filterCypressCompletions, findIssueTrackerProvider, generateAlias, inferAssertionCommand, injectStyles, isLang, isLocalHost, localeForLang, makeModalResizable, makeSwalDraggable, makeSwalDraggableByContentId, persistenceService, resolveExpandDirection, resolveTicketUrl, selectTestsForExport, setSwal2DataCyAttribute, showToast, transformationService, translationService };
|