lib-e2e-cypress-for-dummys-ts 0.9.0 → 1.0.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/LICENSE +21 -0
- package/README.md +767 -707
- package/dist/{chunk-CQEDHL7A.js → chunk-24WFAT4W.js} +40 -7
- package/dist/chunk-24WFAT4W.js.map +1 -0
- package/dist/index.cjs +1467 -628
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +46 -62
- package/dist/index.d.ts +46 -62
- package/dist/index.js +1416 -607
- package/dist/index.js.map +1 -1
- package/dist/runner.js +18 -2
- package/dist/selector-picker-KJUXPXHH.js +7 -0
- package/package.json +74 -74
- package/dist/chunk-CQEDHL7A.js.map +0 -1
- package/dist/selector-picker-JM5HID3Z.js +0 -7
- /package/dist/{selector-picker-JM5HID3Z.js.map → selector-picker-KJUXPXHH.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -37,6 +37,7 @@ declare class RecordingService {
|
|
|
37
37
|
private readonly selectorNotFound$;
|
|
38
38
|
private readonly inputDebounceTimers;
|
|
39
39
|
private readonly fixtures;
|
|
40
|
+
private readonly uploadedFiles;
|
|
40
41
|
private readonly abort;
|
|
41
42
|
selectorStrategy: SelectorStrategy;
|
|
42
43
|
/** Stable id of the current live session (null when none has started). */
|
|
@@ -73,6 +74,12 @@ declare class RecordingService {
|
|
|
73
74
|
name: string;
|
|
74
75
|
content: string;
|
|
75
76
|
}>;
|
|
77
|
+
addUploadedFile(filename: string, bytes: ArrayBuffer): void;
|
|
78
|
+
getUploadedFilesSnapshot(): Array<{
|
|
79
|
+
filename: string;
|
|
80
|
+
bytes: ArrayBuffer;
|
|
81
|
+
}>;
|
|
82
|
+
clearUploadedFiles(): void;
|
|
76
83
|
clearCommands(): void;
|
|
77
84
|
clearInterceptors(): void;
|
|
78
85
|
getCommandsSnapshot(): string[];
|
|
@@ -106,6 +113,8 @@ declare class RecordingService {
|
|
|
106
113
|
private listenToKeys;
|
|
107
114
|
private listenToInput;
|
|
108
115
|
private listenToSelect;
|
|
116
|
+
private handleFileInputChange;
|
|
117
|
+
private readFileAsArrayBuffer;
|
|
109
118
|
private listenToRouteChanges;
|
|
110
119
|
private handleClickEvent;
|
|
111
120
|
private handleMatOptionClick;
|
|
@@ -146,12 +155,6 @@ interface ActiveSessionState {
|
|
|
146
155
|
/** Epoch ms of the last mutation — acts as the recency heartbeat. */
|
|
147
156
|
updatedAt: number;
|
|
148
157
|
}
|
|
149
|
-
/** localStorage key for the synchronous "is a session active?" breadcrumb. */
|
|
150
|
-
declare const ACTIVE_SESSION_BREADCRUMB_KEY = "e2e-active-session";
|
|
151
|
-
/** Configuration key (in the `configuration` store) for the resume recency TTL. */
|
|
152
|
-
declare const RESUME_TTL_CONFIG_KEY = "resumeRecencyTtlMinutes";
|
|
153
|
-
/** Default minutes within which an active session resumes silently. */
|
|
154
|
-
declare const DEFAULT_RESUME_TTL_MINUTES = 30;
|
|
155
158
|
|
|
156
159
|
declare class TranslationService {
|
|
157
160
|
private readonly lang$;
|
|
@@ -164,13 +167,11 @@ declare class TranslationService {
|
|
|
164
167
|
translate(key: string): string;
|
|
165
168
|
detectLang(): Lang;
|
|
166
169
|
}
|
|
167
|
-
declare const translationService: TranslationService;
|
|
168
170
|
|
|
169
171
|
declare class TransformationService {
|
|
170
172
|
toLang(lang: string): Lang;
|
|
171
173
|
generateItDescription(description: string, commands: string[]): string;
|
|
172
174
|
}
|
|
173
|
-
declare const transformationService: TransformationService;
|
|
174
175
|
|
|
175
176
|
interface DirectoryNode {
|
|
176
177
|
name: string;
|
|
@@ -188,15 +189,14 @@ declare class AdvancedTestTransformationService {
|
|
|
188
189
|
isFile(file: unknown): boolean;
|
|
189
190
|
scanDirectory(dirHandle: FileSystemDirectoryHandle): Promise<DirectoryNode>;
|
|
190
191
|
}
|
|
191
|
-
declare const advancedTestTransformationService: AdvancedTestTransformationService;
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
interface LoginSetupConfig {
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
filePath: string;
|
|
196
|
+
fileContent: string;
|
|
197
|
+
detectedFunctions: string[];
|
|
198
|
+
beforeFn: string | null;
|
|
199
|
+
beforeEachFn: string | null;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
interface TestRecord {
|
|
@@ -253,6 +253,10 @@ declare class PersistenceService {
|
|
|
253
253
|
setConfigKey(key: string, value: unknown): Promise<void>;
|
|
254
254
|
getConfig(key: string): Promise<Record<string, unknown> | null>;
|
|
255
255
|
getGeneralConfig(): Promise<ConfigRecord | null>;
|
|
256
|
+
private static readonly LOGIN_SETUP_KEY;
|
|
257
|
+
saveLoginSetup(config: LoginSetupConfig): Promise<void>;
|
|
258
|
+
getLoginSetup(): Promise<LoginSetupConfig | null>;
|
|
259
|
+
clearLoginSetup(): Promise<void>;
|
|
256
260
|
/** Upserts the live recording session (single record, fixed key). */
|
|
257
261
|
saveActiveSession(state: ActiveSessionState): Promise<void>;
|
|
258
262
|
/** Returns the persisted live session, or null when none is stored. */
|
|
@@ -261,6 +265,8 @@ declare class PersistenceService {
|
|
|
261
265
|
clearActiveSession(): Promise<void>;
|
|
262
266
|
clearAllData(): Promise<void>;
|
|
263
267
|
ingestFileData(tests: Record<string, unknown>[], interceptors: Record<string, unknown>[]): Promise<void>;
|
|
268
|
+
hasDirectoryAccess(): Promise<boolean>;
|
|
269
|
+
writeUploadedFile(filename: string, bytes: ArrayBuffer): Promise<void>;
|
|
264
270
|
requestDirectoryPermissions(): Promise<void>;
|
|
265
271
|
/**
|
|
266
272
|
* Writes captured fixtures into `cypress/fixtures/` using the configured Cypress
|
|
@@ -273,24 +279,15 @@ declare class PersistenceService {
|
|
|
273
279
|
}>): Promise<number>;
|
|
274
280
|
private bulkInsertWithoutId;
|
|
275
281
|
}
|
|
276
|
-
declare const persistenceService: PersistenceService;
|
|
277
282
|
|
|
278
283
|
declare function generateAlias(method: string, url: string): string;
|
|
279
284
|
declare class HttpMonitor {
|
|
280
285
|
private readonly recording;
|
|
281
|
-
private originalFetch;
|
|
282
|
-
private originalXHR;
|
|
283
286
|
constructor(recording: RecordingService);
|
|
284
287
|
install(): void;
|
|
285
288
|
uninstall(): void;
|
|
286
289
|
isExtendedHttpEnabled(): boolean;
|
|
287
290
|
isFixtureModeEnabled(): boolean;
|
|
288
|
-
private installFetch;
|
|
289
|
-
private uninstallFetch;
|
|
290
|
-
private installXhr;
|
|
291
|
-
private uninstallXhr;
|
|
292
|
-
private handleFetchInterception;
|
|
293
|
-
private handleXhrInterception;
|
|
294
291
|
}
|
|
295
292
|
|
|
296
293
|
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";
|
|
@@ -302,8 +299,6 @@ declare function makeModalResizable(modal: HTMLElement, options?: {
|
|
|
302
299
|
minHeight?: number;
|
|
303
300
|
}): () => void;
|
|
304
301
|
declare function makeSwalDraggable(): void;
|
|
305
|
-
declare function makeSwalDraggableByContentId(contentId: string): void;
|
|
306
|
-
declare function setSwal2DataCyAttribute(dataCy?: string): void;
|
|
307
302
|
|
|
308
303
|
declare function showToast(message: string, isSuccess?: boolean): void;
|
|
309
304
|
|
|
@@ -337,38 +332,6 @@ declare function selectTestsForExport(tests: TestWithDetails[], mode: ExportMode
|
|
|
337
332
|
*/
|
|
338
333
|
declare function isLocalHost(hostname: string): boolean;
|
|
339
334
|
|
|
340
|
-
/**
|
|
341
|
-
* Geometry helpers for the draggable recording widget (spec 007).
|
|
342
|
-
* Pure functions — no DOM — so the drag/clamp/expansion logic is unit-testable
|
|
343
|
-
* without real layout (jsdom returns 0-sized rects).
|
|
344
|
-
*/
|
|
345
|
-
type ExpandDirection = 'up-left' | 'up-right' | 'down-left' | 'down-right';
|
|
346
|
-
interface Point {
|
|
347
|
-
x: number;
|
|
348
|
-
y: number;
|
|
349
|
-
}
|
|
350
|
-
/** Toggle radius (44/2) + small gap, so the toggle never touches the edge. */
|
|
351
|
-
declare const TOGGLE_MARGIN = 30;
|
|
352
|
-
/** Pixels the pointer must travel before a press becomes a drag (vs a click). */
|
|
353
|
-
declare const DRAG_THRESHOLD = 5;
|
|
354
|
-
/**
|
|
355
|
-
* Toggle-centre offset inside the 190×190 widget box, per expansion direction.
|
|
356
|
-
* The toggle sits at the box corner nearest the screen edge so the arc always
|
|
357
|
-
* expands toward the viewport interior (and stays inside the box / on screen).
|
|
358
|
-
*/
|
|
359
|
-
declare function boxOffsetForDirection(dir: ExpandDirection): Point;
|
|
360
|
-
/** Clamps the toggle-centre so the toggle button stays fully on screen. */
|
|
361
|
-
declare function clampTogglePosition(x: number, y: number, vw: number, vh: number, margin?: number): Point;
|
|
362
|
-
/**
|
|
363
|
-
* Chooses the radial expansion direction so the menu opens toward the centre of
|
|
364
|
-
* the viewport (top half → expand down; left half → expand right).
|
|
365
|
-
*/
|
|
366
|
-
declare function resolveExpandDirection(x: number, y: number, vw: number, vh: number): ExpandDirection;
|
|
367
|
-
/** Default toggle-centre (bottom-right corner), matching the original CSS anchor. */
|
|
368
|
-
declare function defaultTogglePosition(vw: number, vh: number): Point;
|
|
369
|
-
/** Box top-left for a given (clamped) toggle-centre and direction. */
|
|
370
|
-
declare function boxTopLeftFor(toggleCentre: Point, dir: ExpandDirection): Point;
|
|
371
|
-
|
|
372
335
|
/**
|
|
373
336
|
* Infers a sensible Cypress assertion for an element, given the selector already
|
|
374
337
|
* resolved for it (spec 009 — Alt+click assertion capture):
|
|
@@ -444,6 +407,7 @@ interface IssueTrackerConfig {
|
|
|
444
407
|
declare class SaveTestElement extends HTMLElement {
|
|
445
408
|
private shadow;
|
|
446
409
|
private _step;
|
|
410
|
+
private _stepBeforeDiscard;
|
|
447
411
|
description: string;
|
|
448
412
|
notes: string;
|
|
449
413
|
tags: string[];
|
|
@@ -452,11 +416,13 @@ declare class SaveTestElement extends HTMLElement {
|
|
|
452
416
|
translation: TranslationService;
|
|
453
417
|
constructor();
|
|
454
418
|
connectedCallback(): void;
|
|
455
|
-
get step(): 'ask' | 'desc';
|
|
419
|
+
get step(): 'ask' | 'desc' | 'confirm-discard';
|
|
456
420
|
askSave(): void;
|
|
457
421
|
confirmSave(): void;
|
|
458
422
|
confirmSaveAndExport(): void;
|
|
459
423
|
cancel(): void;
|
|
424
|
+
confirmDiscard(): void;
|
|
425
|
+
backFromDiscard(): void;
|
|
460
426
|
restartComponent(): void;
|
|
461
427
|
addTag(tag: string): void;
|
|
462
428
|
removeTag(tag: string): void;
|
|
@@ -513,6 +479,15 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
513
479
|
exportSelectedIds: Set<number>;
|
|
514
480
|
exportSelectedTags: Set<string>;
|
|
515
481
|
issueTrackerConfig: IssueTrackerConfig;
|
|
482
|
+
isLoginSetupOpen: boolean;
|
|
483
|
+
loginSetupConfig: LoginSetupConfig | null;
|
|
484
|
+
loginSetupDraftPath: string;
|
|
485
|
+
loginSetupDraftFunctions: string[];
|
|
486
|
+
loginSetupDraftBeforeFn: string | null;
|
|
487
|
+
loginSetupDraftBeforeEachFn: string | null;
|
|
488
|
+
loginSetupDraftHasContent: boolean;
|
|
489
|
+
private loginSetupDraftHandle;
|
|
490
|
+
private loginSetupDraftContent;
|
|
516
491
|
private filesystemGranted;
|
|
517
492
|
private cypressFolderName;
|
|
518
493
|
constructor();
|
|
@@ -530,6 +505,13 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
530
505
|
onIssueTrackerEnabledChange(enabled: boolean): Promise<void>;
|
|
531
506
|
onIssueTrackerProviderChange(provider: IssueTrackerProvider): Promise<void>;
|
|
532
507
|
onIssueTrackerBaseUrlChange(baseUrl: string): Promise<void>;
|
|
508
|
+
openLoginSetupPanel(): void;
|
|
509
|
+
closeLoginSetupPanel(): void;
|
|
510
|
+
saveLoginSetupConfig(config: LoginSetupConfig): Promise<void>;
|
|
511
|
+
clearLoginSetupConfig(): Promise<void>;
|
|
512
|
+
loginSetupPickFile(): Promise<void>;
|
|
513
|
+
loginSetupCreateScaffold(): Promise<void>;
|
|
514
|
+
loginSetupRescan(): Promise<void>;
|
|
533
515
|
changeFolder(): Promise<void>;
|
|
534
516
|
revokeAccess(): Promise<void>;
|
|
535
517
|
private downloadTests;
|
|
@@ -568,6 +550,7 @@ declare class AdvancedTestEditorElement extends HTMLElement {
|
|
|
568
550
|
isCreatingFolder: boolean;
|
|
569
551
|
collapsedDirs: Set<string>;
|
|
570
552
|
sidebarWidth: number;
|
|
553
|
+
loginSetupConfig: LoginSetupConfig | null;
|
|
571
554
|
private hasPermission;
|
|
572
555
|
private needsReauth;
|
|
573
556
|
private _dirHandle;
|
|
@@ -755,9 +738,10 @@ declare class LibE2eRecorderElement extends HTMLElement {
|
|
|
755
738
|
private onSaveAndExportTest;
|
|
756
739
|
private toggleModal;
|
|
757
740
|
private resizePopup;
|
|
741
|
+
private openSwalDialog;
|
|
758
742
|
private render;
|
|
759
743
|
}
|
|
760
744
|
|
|
761
|
-
declare const VERSION = "0.
|
|
745
|
+
declare const VERSION = "1.0.0";
|
|
762
746
|
|
|
763
|
-
export {
|
|
747
|
+
export { type ActiveSessionState, AdvancedTestEditorElement, AdvancedTestTransformationService, ConfigurationElement, type DBSchema, type DBStore, type DBStoreIndex, DB_SCHEMA, DB_STORE_NAMES, type DirectoryNode, type ExportMode, type ExportSelectionOptions, type FileNode, FilePreviewElement, HelpPanelElement, HttpMonitor, INPUT_TYPES, type InputType, LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES, LOCALE_BY_LANG, type Lang, LibE2eRecorderElement, PersistenceService, RecordingService, SCROLLBAR_STYLES, SUPPORTED_LANGS, SaveTestElement, SelectorPickerElement, type SelectorStrategy, type TestDetail, TestEditorElement, TestPrevisualizerElement, type TestWithDetails, TransformationService, TranslationService, VERSION, generateAlias, inferAssertionCommand, injectStyles, isLang, isLocalHost, localeForLang, makeModalResizable, makeSwalDraggable, selectTestsForExport, showToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ declare class RecordingService {
|
|
|
37
37
|
private readonly selectorNotFound$;
|
|
38
38
|
private readonly inputDebounceTimers;
|
|
39
39
|
private readonly fixtures;
|
|
40
|
+
private readonly uploadedFiles;
|
|
40
41
|
private readonly abort;
|
|
41
42
|
selectorStrategy: SelectorStrategy;
|
|
42
43
|
/** Stable id of the current live session (null when none has started). */
|
|
@@ -73,6 +74,12 @@ declare class RecordingService {
|
|
|
73
74
|
name: string;
|
|
74
75
|
content: string;
|
|
75
76
|
}>;
|
|
77
|
+
addUploadedFile(filename: string, bytes: ArrayBuffer): void;
|
|
78
|
+
getUploadedFilesSnapshot(): Array<{
|
|
79
|
+
filename: string;
|
|
80
|
+
bytes: ArrayBuffer;
|
|
81
|
+
}>;
|
|
82
|
+
clearUploadedFiles(): void;
|
|
76
83
|
clearCommands(): void;
|
|
77
84
|
clearInterceptors(): void;
|
|
78
85
|
getCommandsSnapshot(): string[];
|
|
@@ -106,6 +113,8 @@ declare class RecordingService {
|
|
|
106
113
|
private listenToKeys;
|
|
107
114
|
private listenToInput;
|
|
108
115
|
private listenToSelect;
|
|
116
|
+
private handleFileInputChange;
|
|
117
|
+
private readFileAsArrayBuffer;
|
|
109
118
|
private listenToRouteChanges;
|
|
110
119
|
private handleClickEvent;
|
|
111
120
|
private handleMatOptionClick;
|
|
@@ -146,12 +155,6 @@ interface ActiveSessionState {
|
|
|
146
155
|
/** Epoch ms of the last mutation — acts as the recency heartbeat. */
|
|
147
156
|
updatedAt: number;
|
|
148
157
|
}
|
|
149
|
-
/** localStorage key for the synchronous "is a session active?" breadcrumb. */
|
|
150
|
-
declare const ACTIVE_SESSION_BREADCRUMB_KEY = "e2e-active-session";
|
|
151
|
-
/** Configuration key (in the `configuration` store) for the resume recency TTL. */
|
|
152
|
-
declare const RESUME_TTL_CONFIG_KEY = "resumeRecencyTtlMinutes";
|
|
153
|
-
/** Default minutes within which an active session resumes silently. */
|
|
154
|
-
declare const DEFAULT_RESUME_TTL_MINUTES = 30;
|
|
155
158
|
|
|
156
159
|
declare class TranslationService {
|
|
157
160
|
private readonly lang$;
|
|
@@ -164,13 +167,11 @@ declare class TranslationService {
|
|
|
164
167
|
translate(key: string): string;
|
|
165
168
|
detectLang(): Lang;
|
|
166
169
|
}
|
|
167
|
-
declare const translationService: TranslationService;
|
|
168
170
|
|
|
169
171
|
declare class TransformationService {
|
|
170
172
|
toLang(lang: string): Lang;
|
|
171
173
|
generateItDescription(description: string, commands: string[]): string;
|
|
172
174
|
}
|
|
173
|
-
declare const transformationService: TransformationService;
|
|
174
175
|
|
|
175
176
|
interface DirectoryNode {
|
|
176
177
|
name: string;
|
|
@@ -188,15 +189,14 @@ declare class AdvancedTestTransformationService {
|
|
|
188
189
|
isFile(file: unknown): boolean;
|
|
189
190
|
scanDirectory(dirHandle: FileSystemDirectoryHandle): Promise<DirectoryNode>;
|
|
190
191
|
}
|
|
191
|
-
declare const advancedTestTransformationService: AdvancedTestTransformationService;
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
interface LoginSetupConfig {
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
filePath: string;
|
|
196
|
+
fileContent: string;
|
|
197
|
+
detectedFunctions: string[];
|
|
198
|
+
beforeFn: string | null;
|
|
199
|
+
beforeEachFn: string | null;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
interface TestRecord {
|
|
@@ -253,6 +253,10 @@ declare class PersistenceService {
|
|
|
253
253
|
setConfigKey(key: string, value: unknown): Promise<void>;
|
|
254
254
|
getConfig(key: string): Promise<Record<string, unknown> | null>;
|
|
255
255
|
getGeneralConfig(): Promise<ConfigRecord | null>;
|
|
256
|
+
private static readonly LOGIN_SETUP_KEY;
|
|
257
|
+
saveLoginSetup(config: LoginSetupConfig): Promise<void>;
|
|
258
|
+
getLoginSetup(): Promise<LoginSetupConfig | null>;
|
|
259
|
+
clearLoginSetup(): Promise<void>;
|
|
256
260
|
/** Upserts the live recording session (single record, fixed key). */
|
|
257
261
|
saveActiveSession(state: ActiveSessionState): Promise<void>;
|
|
258
262
|
/** Returns the persisted live session, or null when none is stored. */
|
|
@@ -261,6 +265,8 @@ declare class PersistenceService {
|
|
|
261
265
|
clearActiveSession(): Promise<void>;
|
|
262
266
|
clearAllData(): Promise<void>;
|
|
263
267
|
ingestFileData(tests: Record<string, unknown>[], interceptors: Record<string, unknown>[]): Promise<void>;
|
|
268
|
+
hasDirectoryAccess(): Promise<boolean>;
|
|
269
|
+
writeUploadedFile(filename: string, bytes: ArrayBuffer): Promise<void>;
|
|
264
270
|
requestDirectoryPermissions(): Promise<void>;
|
|
265
271
|
/**
|
|
266
272
|
* Writes captured fixtures into `cypress/fixtures/` using the configured Cypress
|
|
@@ -273,24 +279,15 @@ declare class PersistenceService {
|
|
|
273
279
|
}>): Promise<number>;
|
|
274
280
|
private bulkInsertWithoutId;
|
|
275
281
|
}
|
|
276
|
-
declare const persistenceService: PersistenceService;
|
|
277
282
|
|
|
278
283
|
declare function generateAlias(method: string, url: string): string;
|
|
279
284
|
declare class HttpMonitor {
|
|
280
285
|
private readonly recording;
|
|
281
|
-
private originalFetch;
|
|
282
|
-
private originalXHR;
|
|
283
286
|
constructor(recording: RecordingService);
|
|
284
287
|
install(): void;
|
|
285
288
|
uninstall(): void;
|
|
286
289
|
isExtendedHttpEnabled(): boolean;
|
|
287
290
|
isFixtureModeEnabled(): boolean;
|
|
288
|
-
private installFetch;
|
|
289
|
-
private uninstallFetch;
|
|
290
|
-
private installXhr;
|
|
291
|
-
private uninstallXhr;
|
|
292
|
-
private handleFetchInterception;
|
|
293
|
-
private handleXhrInterception;
|
|
294
291
|
}
|
|
295
292
|
|
|
296
293
|
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";
|
|
@@ -302,8 +299,6 @@ declare function makeModalResizable(modal: HTMLElement, options?: {
|
|
|
302
299
|
minHeight?: number;
|
|
303
300
|
}): () => void;
|
|
304
301
|
declare function makeSwalDraggable(): void;
|
|
305
|
-
declare function makeSwalDraggableByContentId(contentId: string): void;
|
|
306
|
-
declare function setSwal2DataCyAttribute(dataCy?: string): void;
|
|
307
302
|
|
|
308
303
|
declare function showToast(message: string, isSuccess?: boolean): void;
|
|
309
304
|
|
|
@@ -337,38 +332,6 @@ declare function selectTestsForExport(tests: TestWithDetails[], mode: ExportMode
|
|
|
337
332
|
*/
|
|
338
333
|
declare function isLocalHost(hostname: string): boolean;
|
|
339
334
|
|
|
340
|
-
/**
|
|
341
|
-
* Geometry helpers for the draggable recording widget (spec 007).
|
|
342
|
-
* Pure functions — no DOM — so the drag/clamp/expansion logic is unit-testable
|
|
343
|
-
* without real layout (jsdom returns 0-sized rects).
|
|
344
|
-
*/
|
|
345
|
-
type ExpandDirection = 'up-left' | 'up-right' | 'down-left' | 'down-right';
|
|
346
|
-
interface Point {
|
|
347
|
-
x: number;
|
|
348
|
-
y: number;
|
|
349
|
-
}
|
|
350
|
-
/** Toggle radius (44/2) + small gap, so the toggle never touches the edge. */
|
|
351
|
-
declare const TOGGLE_MARGIN = 30;
|
|
352
|
-
/** Pixels the pointer must travel before a press becomes a drag (vs a click). */
|
|
353
|
-
declare const DRAG_THRESHOLD = 5;
|
|
354
|
-
/**
|
|
355
|
-
* Toggle-centre offset inside the 190×190 widget box, per expansion direction.
|
|
356
|
-
* The toggle sits at the box corner nearest the screen edge so the arc always
|
|
357
|
-
* expands toward the viewport interior (and stays inside the box / on screen).
|
|
358
|
-
*/
|
|
359
|
-
declare function boxOffsetForDirection(dir: ExpandDirection): Point;
|
|
360
|
-
/** Clamps the toggle-centre so the toggle button stays fully on screen. */
|
|
361
|
-
declare function clampTogglePosition(x: number, y: number, vw: number, vh: number, margin?: number): Point;
|
|
362
|
-
/**
|
|
363
|
-
* Chooses the radial expansion direction so the menu opens toward the centre of
|
|
364
|
-
* the viewport (top half → expand down; left half → expand right).
|
|
365
|
-
*/
|
|
366
|
-
declare function resolveExpandDirection(x: number, y: number, vw: number, vh: number): ExpandDirection;
|
|
367
|
-
/** Default toggle-centre (bottom-right corner), matching the original CSS anchor. */
|
|
368
|
-
declare function defaultTogglePosition(vw: number, vh: number): Point;
|
|
369
|
-
/** Box top-left for a given (clamped) toggle-centre and direction. */
|
|
370
|
-
declare function boxTopLeftFor(toggleCentre: Point, dir: ExpandDirection): Point;
|
|
371
|
-
|
|
372
335
|
/**
|
|
373
336
|
* Infers a sensible Cypress assertion for an element, given the selector already
|
|
374
337
|
* resolved for it (spec 009 — Alt+click assertion capture):
|
|
@@ -444,6 +407,7 @@ interface IssueTrackerConfig {
|
|
|
444
407
|
declare class SaveTestElement extends HTMLElement {
|
|
445
408
|
private shadow;
|
|
446
409
|
private _step;
|
|
410
|
+
private _stepBeforeDiscard;
|
|
447
411
|
description: string;
|
|
448
412
|
notes: string;
|
|
449
413
|
tags: string[];
|
|
@@ -452,11 +416,13 @@ declare class SaveTestElement extends HTMLElement {
|
|
|
452
416
|
translation: TranslationService;
|
|
453
417
|
constructor();
|
|
454
418
|
connectedCallback(): void;
|
|
455
|
-
get step(): 'ask' | 'desc';
|
|
419
|
+
get step(): 'ask' | 'desc' | 'confirm-discard';
|
|
456
420
|
askSave(): void;
|
|
457
421
|
confirmSave(): void;
|
|
458
422
|
confirmSaveAndExport(): void;
|
|
459
423
|
cancel(): void;
|
|
424
|
+
confirmDiscard(): void;
|
|
425
|
+
backFromDiscard(): void;
|
|
460
426
|
restartComponent(): void;
|
|
461
427
|
addTag(tag: string): void;
|
|
462
428
|
removeTag(tag: string): void;
|
|
@@ -513,6 +479,15 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
513
479
|
exportSelectedIds: Set<number>;
|
|
514
480
|
exportSelectedTags: Set<string>;
|
|
515
481
|
issueTrackerConfig: IssueTrackerConfig;
|
|
482
|
+
isLoginSetupOpen: boolean;
|
|
483
|
+
loginSetupConfig: LoginSetupConfig | null;
|
|
484
|
+
loginSetupDraftPath: string;
|
|
485
|
+
loginSetupDraftFunctions: string[];
|
|
486
|
+
loginSetupDraftBeforeFn: string | null;
|
|
487
|
+
loginSetupDraftBeforeEachFn: string | null;
|
|
488
|
+
loginSetupDraftHasContent: boolean;
|
|
489
|
+
private loginSetupDraftHandle;
|
|
490
|
+
private loginSetupDraftContent;
|
|
516
491
|
private filesystemGranted;
|
|
517
492
|
private cypressFolderName;
|
|
518
493
|
constructor();
|
|
@@ -530,6 +505,13 @@ declare class ConfigurationElement extends HTMLElement {
|
|
|
530
505
|
onIssueTrackerEnabledChange(enabled: boolean): Promise<void>;
|
|
531
506
|
onIssueTrackerProviderChange(provider: IssueTrackerProvider): Promise<void>;
|
|
532
507
|
onIssueTrackerBaseUrlChange(baseUrl: string): Promise<void>;
|
|
508
|
+
openLoginSetupPanel(): void;
|
|
509
|
+
closeLoginSetupPanel(): void;
|
|
510
|
+
saveLoginSetupConfig(config: LoginSetupConfig): Promise<void>;
|
|
511
|
+
clearLoginSetupConfig(): Promise<void>;
|
|
512
|
+
loginSetupPickFile(): Promise<void>;
|
|
513
|
+
loginSetupCreateScaffold(): Promise<void>;
|
|
514
|
+
loginSetupRescan(): Promise<void>;
|
|
533
515
|
changeFolder(): Promise<void>;
|
|
534
516
|
revokeAccess(): Promise<void>;
|
|
535
517
|
private downloadTests;
|
|
@@ -568,6 +550,7 @@ declare class AdvancedTestEditorElement extends HTMLElement {
|
|
|
568
550
|
isCreatingFolder: boolean;
|
|
569
551
|
collapsedDirs: Set<string>;
|
|
570
552
|
sidebarWidth: number;
|
|
553
|
+
loginSetupConfig: LoginSetupConfig | null;
|
|
571
554
|
private hasPermission;
|
|
572
555
|
private needsReauth;
|
|
573
556
|
private _dirHandle;
|
|
@@ -755,9 +738,10 @@ declare class LibE2eRecorderElement extends HTMLElement {
|
|
|
755
738
|
private onSaveAndExportTest;
|
|
756
739
|
private toggleModal;
|
|
757
740
|
private resizePopup;
|
|
741
|
+
private openSwalDialog;
|
|
758
742
|
private render;
|
|
759
743
|
}
|
|
760
744
|
|
|
761
|
-
declare const VERSION = "0.
|
|
745
|
+
declare const VERSION = "1.0.0";
|
|
762
746
|
|
|
763
|
-
export {
|
|
747
|
+
export { type ActiveSessionState, AdvancedTestEditorElement, AdvancedTestTransformationService, ConfigurationElement, type DBSchema, type DBStore, type DBStoreIndex, DB_SCHEMA, DB_STORE_NAMES, type DirectoryNode, type ExportMode, type ExportSelectionOptions, type FileNode, FilePreviewElement, HelpPanelElement, HttpMonitor, INPUT_TYPES, type InputType, LIB_E2E_CYPRESS_FOR_DUMMYS_SWAL2_STYLES, LOCALE_BY_LANG, type Lang, LibE2eRecorderElement, PersistenceService, RecordingService, SCROLLBAR_STYLES, SUPPORTED_LANGS, SaveTestElement, SelectorPickerElement, type SelectorStrategy, type TestDetail, TestEditorElement, TestPrevisualizerElement, type TestWithDetails, TransformationService, TranslationService, VERSION, generateAlias, inferAssertionCommand, injectStyles, isLang, isLocalHost, localeForLang, makeModalResizable, makeSwalDraggable, selectTestsForExport, showToast };
|