html-reporter 11.11.0 → 11.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/build/lib/constants/local-storage.d.ts +1 -0
  2. package/build/lib/constants/local-storage.js +2 -1
  3. package/build/lib/constants/local-storage.js.map +1 -1
  4. package/build/lib/gui/app.d.ts +1 -0
  5. package/build/lib/gui/app.js +4 -0
  6. package/build/lib/gui/app.js.map +1 -1
  7. package/build/lib/gui/server.js +9 -0
  8. package/build/lib/gui/server.js.map +1 -1
  9. package/build/lib/gui/tool-runner/index.d.ts +2 -1
  10. package/build/lib/gui/tool-runner/index.js +10 -2
  11. package/build/lib/gui/tool-runner/index.js.map +1 -1
  12. package/build/lib/report-builder/gui.d.ts +2 -0
  13. package/build/lib/report-builder/gui.js +11 -0
  14. package/build/lib/report-builder/gui.js.map +1 -1
  15. package/build/lib/report-builder/static.d.ts +1 -0
  16. package/build/lib/report-builder/static.js +3 -0
  17. package/build/lib/report-builder/static.js.map +1 -1
  18. package/build/lib/sqlite-client.d.ts +2 -1
  19. package/build/lib/sqlite-client.js +12 -0
  20. package/build/lib/sqlite-client.js.map +1 -1
  21. package/build/lib/static/343.min.js +1 -1
  22. package/build/lib/static/516.min.js +1 -1
  23. package/build/lib/static/685.min.css +1 -0
  24. package/build/lib/static/685.min.js +1 -0
  25. package/build/lib/static/964.min.js +1 -0
  26. package/build/lib/static/gui.html +1 -1
  27. package/build/lib/static/gui.min.js +1 -1
  28. package/build/lib/static/icons/word-wrap-icon.svg +6 -0
  29. package/build/lib/static/index.html +1 -1
  30. package/build/lib/static/new-ui-gui.html +1 -1
  31. package/build/lib/static/new-ui-report.html +1 -1
  32. package/build/lib/static/newGui.min.js +1 -1
  33. package/build/lib/static/newReport.min.js +1 -1
  34. package/build/lib/static/report.min.js +1 -1
  35. package/build/package.json +1 -1
  36. package/package.json +1 -1
  37. package/plugins-sdk/build-ui/lib/constants/local-storage.d.ts +1 -0
  38. package/plugins-sdk/build-ui/lib/gui/app.d.ts +1 -0
  39. package/plugins-sdk/build-ui/lib/gui/tool-runner/index.d.ts +2 -1
  40. package/plugins-sdk/build-ui/lib/report-builder/gui.d.ts +2 -0
  41. package/plugins-sdk/build-ui/lib/report-builder/static.d.ts +1 -0
  42. package/plugins-sdk/build-ui/lib/sqlite-client.d.ts +2 -1
  43. package/plugins-sdk/build-ui/lib/static/modules/action-names.d.ts +1 -0
  44. package/plugins-sdk/build-ui/lib/static/modules/actions/filters.d.ts +3 -1
  45. package/plugins-sdk/build-ui/lib/static/modules/actions/lifecycle.d.ts +1 -0
  46. package/plugins-sdk/build-ui/lib/static/modules/selectors/tree.d.ts +5 -144
  47. package/plugins-sdk/build-ui/lib/static/new-ui/types/store.d.ts +3 -0
  48. package/build/lib/static/190.min.js +0 -1
  49. package/build/lib/static/648.min.css +0 -1
  50. package/build/lib/static/648.min.js +0 -1
  51. /package/build/lib/static/{190.min.css → 964.min.css} +0 -0
@@ -16,6 +16,7 @@ export declare class App {
16
16
  updateReferenceImage(failedTests?: TestRefUpdateData[]): Promise<TestBranch[]>;
17
17
  undoAcceptImages(imageIds: TestRefUpdateData[]): Promise<UndoAcceptImagesResult>;
18
18
  findEqualDiffs(data: TestEqualDiffsData[]): Promise<string[]>;
19
+ refreshTests(): Promise<ToolRunnerTree | null>;
19
20
  addClient(connection: Response): void;
20
21
  sendClientEvent(event: string, data: unknown): void;
21
22
  }
@@ -40,6 +40,7 @@ export declare class ToolRunner {
40
40
  get tree(): ToolRunnerTree | null;
41
41
  initialize(): Promise<void>;
42
42
  _readTests(): Promise<TestCollectionAdapter>;
43
+ refreshTests(): Promise<void>;
43
44
  protected _ensureReportBuilder(): GuiReportBuilder;
44
45
  protected _ensureTestCollection(): TestCollectionAdapter;
45
46
  finalize(): Promise<void>;
@@ -55,7 +56,7 @@ export declare class ToolRunner {
55
56
  protected _getTestAdapterById(updateData: TestRefUpdateData): TestAdapter;
56
57
  protected _prepareAssertViewResults(imagesInfo: TestRefUpdateData['imagesInfo'], testAdapter: TestAdapter): AssertViewResult[];
57
58
  protected _handleReferenceUpdate(testResult: ReporterTestResult, imageInfo: ImageInfoUpdated, state: string): void;
58
- _fillTestsTree(): Promise<void>;
59
+ _fillTestsTree(tree?: Tree): Promise<void>;
59
60
  protected _loadDataFromDatabase(): Promise<Tree | null>;
60
61
  protected _resolveImgPath(imgPath: string): string;
61
62
  }
@@ -33,6 +33,8 @@ export declare class GuiReportBuilder extends StaticReportBuilder {
33
33
  setApiValues(values: HtmlReporterValues): this;
34
34
  reuseTestsTree(tree: Tree): void;
35
35
  getResult(): GuiReportBuilderResult;
36
+ resetTree(): void;
37
+ buildTreeFromCurrentDb(): Tree;
36
38
  getTestBranch(id: string): TestBranch;
37
39
  getTestsDataToUpdateRefs(imageIds: string[]): TestRefUpdateData[];
38
40
  getImageDataToFindEqualDiffs(imageIds: string[]): TestEqualDiffsData[];
@@ -21,6 +21,7 @@ export declare class StaticReportBuilder {
21
21
  private _workers?;
22
22
  static create<T extends StaticReportBuilder>(this: new (options: StaticReportBuilderOptions) => T, options: StaticReportBuilderOptions): T;
23
23
  constructor({ htmlReporter, reporterConfig, dbClient, imagesInfoSaver }: StaticReportBuilderOptions);
24
+ resetAttemps(): void;
24
25
  saveStaticFiles(): Promise<void>;
25
26
  registerWorkers(workers: RegisterWorkers<['saveDiffTo']>): void;
26
27
  registerAttempt(testInfo: {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="gemini-testing__sql.js" />
2
2
  import type { Database } from '@gemini-testing/sql.js';
3
3
  import { TestStatus } from './constants';
4
- import type { Attachment, ImageInfoFull, TestError, TestStepCompressed } from './types';
4
+ import type { Attachment, ImageInfoFull, TestError, TestStepCompressed, RawSuitesRow } from './types';
5
5
  import type { HtmlReporter } from './plugin-api';
6
6
  import { ReporterTestResult } from './adapters/test-result';
7
7
  import { DbTestResultTransformer } from './adapters/test-result/transformers/db';
@@ -52,6 +52,7 @@ export declare class SqliteClient {
52
52
  getRawConnection(): Database;
53
53
  close(): void;
54
54
  query<T = unknown>(queryParams?: QueryParams, ...queryArgs: string[]): T | undefined;
55
+ getAllSuites(): RawSuitesRow[];
55
56
  write(testResult: ReporterTestResult): void;
56
57
  delete(deleteParams?: DeleteParams, ...deleteArgs: string[]): void;
57
58
  private _createSentence;
@@ -82,6 +82,7 @@ declare const _default: {
82
82
  readonly SNAPSHOTS_PLAYER_GO_TO_TIME: "SNAPSHOTS_PLAYER_GO_TO_TIME";
83
83
  readonly SNAPSHOTS_PLAYER_TOGGLE_VISIBILITY: "SNAPSHOTS_PLAYER_TOGGLE_VISIBILITY";
84
84
  readonly SET_BROWSER_FEATURES: "SET_BROWSER_FEATURES";
85
+ readonly SET_REFRESH_LOADING: "SET_REFRESH_LOADING";
85
86
  readonly SET_SEARCH_LOADING: "SET_SEARCH_LOADING";
86
87
  };
87
88
  export default _default;
@@ -17,5 +17,7 @@ export type SetSearchLoading = Action<typeof actionNames.SET_SEARCH_LOADING, boo
17
17
  export declare const setSearchLoading: (payload: boolean) => SetSearchLoading;
18
18
  export type ChangeViewModeAction = Action<typeof actionNames.CHANGE_VIEW_MODE, FilterPayload<ViewMode>>;
19
19
  export declare const changeViewMode: (payload: ChangeViewModeAction['payload']) => ChangeViewModeAction;
20
- export type FiltersAction = UpdateNameFilterAction | SetMatchCaseFilterAction | SetUseRegexFilterAction | SelectBrowsersAction | ChangeViewModeAction | SetSearchLoading;
20
+ export type SetRefreshLoading = Action<typeof actionNames.SET_REFRESH_LOADING, boolean>;
21
+ export declare const setRefreshLoading: (payload: boolean) => SetRefreshLoading;
22
+ export type FiltersAction = UpdateNameFilterAction | SetMatchCaseFilterAction | SetUseRegexFilterAction | SelectBrowsersAction | ChangeViewModeAction | SetRefreshLoading | SetSearchLoading;
21
23
  export {};
@@ -27,6 +27,7 @@ interface InitStaticReportData {
27
27
  isNewUi?: boolean;
28
28
  }
29
29
  export declare const thunkInitStaticReport: ({ isNewUi }?: InitStaticReportData) => AppThunk;
30
+ export declare const thunkRefreshGuiReport: () => AppThunk;
30
31
  export type FinGuiReportAction = Action<typeof actionNames.FIN_GUI_REPORT>;
31
32
  export declare const finGuiReport: () => FinGuiReportAction;
32
33
  export type FinStaticReportAction = Action<typeof actionNames.FIN_STATIC_REPORT>;
@@ -9,6 +9,7 @@ export function mkGetTestsBySuiteId(): ((state: {
9
9
  isInitialized: boolean;
10
10
  availableFeatures: import("../../../constants").Feature[];
11
11
  isSearchLoading?: boolean | undefined;
12
+ isRefreshTestsLoading?: boolean | undefined;
12
13
  nameFilter: string;
13
14
  useRegexFilter: boolean;
14
15
  useMatchCaseFilter: boolean;
@@ -155,6 +156,7 @@ export function mkGetLastImageByStateName(): ((state: {
155
156
  isInitialized: boolean;
156
157
  availableFeatures: import("../../../constants").Feature[];
157
158
  isSearchLoading?: boolean | undefined;
159
+ isRefreshTestsLoading?: boolean | undefined;
158
160
  nameFilter: string;
159
161
  useRegexFilter: boolean;
160
162
  useMatchCaseFilter: boolean;
@@ -330,150 +332,7 @@ export const getVisibleBrowserIds: ((state: {} | undefined) => any) & import("re
330
332
  export const getSelectedBrowserIds: ((state: {} | undefined) => any) & import("reselect").OutputSelectorFields<(args_0: any, args_1: Record<string, import("../../new-ui/types/store").BrowserEntity>, args_2: any) => any> & {
331
333
  clearCache: () => void;
332
334
  };
333
- export const getVisibleImages: ((state: {
334
- app: {
335
- isNewUi: boolean;
336
- isInitialized: boolean;
337
- availableFeatures: import("../../../constants").Feature[];
338
- isSearchLoading?: boolean | undefined;
339
- nameFilter: string;
340
- useRegexFilter: boolean;
341
- useMatchCaseFilter: boolean;
342
- viewMode: ViewMode;
343
- filteredBrowsers: import("../../../types").BrowserItem[];
344
- loading: {
345
- isVisible: boolean;
346
- isInProgress: boolean;
347
- taskTitle: string;
348
- progress: Record<string, number>;
349
- };
350
- staticImageAccepterModal: {
351
- commitMessage: string;
352
- };
353
- groupTestsData: {
354
- availableSections: import("../../new-ui/types/store").GroupBySection[];
355
- availableExpressions: import("../../new-ui/types/store").GroupByExpression[];
356
- currentExpressionIds: string[];
357
- };
358
- sortTestsData: {
359
- availableExpressions: import("../../new-ui/types/store").SortByExpression[];
360
- currentExpressionIds: string[];
361
- currentDirection: import("../../new-ui/types/store").SortDirection;
362
- previousExpressionIds: string[];
363
- previousDirection: import("../../new-ui/types/store").SortDirection;
364
- };
365
- guiServerConnection: {
366
- isConnected: boolean;
367
- };
368
- snapshotsPlayer: import("../../new-ui/types/store").SnapshotsPlayerHighlightState;
369
- suitesPage: {
370
- currentTreeNodeId: string | null;
371
- currentBrowserId: string | null;
372
- currentGroupId: string | null;
373
- currentStepId: string | null;
374
- currentHighlightedStepId: string | null;
375
- };
376
- visualChecksPage: {
377
- stateName: string | null;
378
- diffMode: "3-up" | "3-up-scaled" | "3-up-scaled-to-fit" | "only-diff" | "switch" | "swipe" | "onion-skin" | "2-up-interactive";
379
- };
380
- };
381
- ui: {
382
- staticImageAccepterToolbar: {
383
- offset: import("../../new-ui/types").Point;
384
- };
385
- suitesPage: {
386
- treeViewMode: import("../../new-ui/types/store").TreeViewMode;
387
- retryIndexByTreeNodeId: Record<string, number | null>;
388
- expandedTreeNodesById: Record<string, boolean>;
389
- expandedSectionsById: Record<string, boolean>;
390
- expandedStepsByResultId: Record<string, Record<string, boolean>>;
391
- sectionSizes: number[];
392
- backupSectionSizes: number[];
393
- isSnapshotsPlayerVisible: boolean;
394
- };
395
- visualChecksPage: {
396
- sectionSizes: number[];
397
- backupSectionSizes: number[];
398
- is2UpDiffVisible: boolean;
399
- twoUpFitMode: import("../../../constants").TwoUpFitMode;
400
- };
401
- };
402
- browsers: import("../../../types").BrowserItem[];
403
- browserFeatures: Record<string, import("../../../constants").BrowserFeature[]>;
404
- tree: import("../../new-ui/types/store").TreeEntity;
405
- view: {
406
- diffMode: "3-up" | "3-up-scaled" | "3-up-scaled-to-fit" | "only-diff" | "switch" | "swipe" | "onion-skin" | "2-up-interactive";
407
- keyToGroupTestsBy: string;
408
- baseHost: string;
409
- };
410
- running: boolean;
411
- repeatCount: number;
412
- repeatLeft: number;
413
- processing: boolean;
414
- gui: boolean;
415
- apiValues: import("../../../plugin-api").HtmlReporterValues;
416
- config: import("../../../types").StoreReporterConfig;
417
- staticImageAccepter: {
418
- enabled: boolean;
419
- acceptableImages: Record<string, import("../static-image-accepter").AcceptableImage>;
420
- accepterDelayedImages: {
421
- imageId: string;
422
- stateName: string;
423
- stateNameImageId: string;
424
- }[];
425
- imagesToCommitCount: number;
426
- };
427
- timestamp: number;
428
- fetchDbDetails: import("../../../db-utils/common").DbDetails[];
429
- stats: {
430
- all: import("../../../tests-tree-builder/static").Stats | Record<string, never>;
431
- perBrowser: import("../../../tests-tree-builder/static").PerBrowserStats | undefined;
432
- } | null;
433
- db?: {
434
- close(): void;
435
- create_function(name: string, func: (...args: any[]) => any): any;
436
- each(sql: string, params: import("@gemini-testing/sql.js").BindParams, callback: import("@gemini-testing/sql.js").ParamsCallback, done: () => void): any;
437
- each(sql: string, callback: import("@gemini-testing/sql.js").ParamsCallback, done: () => void): any;
438
- exec(sql: string, params?: import("@gemini-testing/sql.js").BindParams | undefined): import("@gemini-testing/sql.js").QueryExecResult[];
439
- export(): Uint8Array;
440
- getRowsModified(): number;
441
- handleError(): null;
442
- iterateStatements(sql: string): {
443
- getRemainingSQL(): string;
444
- next(): import("@gemini-testing/sql.js").StatementIteratorResult;
445
- [Symbol.iterator](): Iterator<{
446
- bind(values?: import("@gemini-testing/sql.js").BindParams | undefined): boolean;
447
- free(): boolean;
448
- freemem(): void;
449
- get(params?: import("@gemini-testing/sql.js").BindParams | undefined): import("@gemini-testing/sql.js").SqlValue[];
450
- getAsObject(params?: import("@gemini-testing/sql.js").BindParams | undefined): import("@gemini-testing/sql.js").ParamsObject;
451
- getColumnNames(): string[];
452
- getNormalizedSQL(): string;
453
- getSQL(): string;
454
- reset(): void;
455
- run(values?: import("@gemini-testing/sql.js").BindParams | undefined): void;
456
- step(): boolean;
457
- }, any, undefined>;
458
- };
459
- prepare(sql: string, params?: import("@gemini-testing/sql.js").BindParams | undefined): {
460
- bind(values?: import("@gemini-testing/sql.js").BindParams | undefined): boolean;
461
- free(): boolean;
462
- freemem(): void;
463
- get(params?: import("@gemini-testing/sql.js").BindParams | undefined): import("@gemini-testing/sql.js").SqlValue[];
464
- getAsObject(params?: import("@gemini-testing/sql.js").BindParams | undefined): import("@gemini-testing/sql.js").ParamsObject;
465
- getColumnNames(): string[];
466
- getNormalizedSQL(): string;
467
- getSQL(): string;
468
- reset(): void;
469
- run(values?: import("@gemini-testing/sql.js").BindParams | undefined): void;
470
- step(): boolean;
471
- };
472
- run(sql: string, params?: import("@gemini-testing/sql.js").BindParams | undefined): any;
473
- } | undefined;
474
- plugins: Record<string, unknown>;
475
- autoRun: boolean;
476
- }) => any) & import("reselect").OutputSelectorFields<(args_0: any, args_1: Record<string, import("../../new-ui/types/store").BrowserEntity>, args_2: Record<string, import("../../new-ui/types/store").ResultEntity>, args_3: Record<string, import("../../new-ui/types/store").ImageEntity>, args_4: boolean, args_5: boolean) => any> & {
335
+ export const getVisibleImages: ((state: {} | undefined) => any) & import("reselect").OutputSelectorFields<(args_0: any, args_1: Record<string, import("../../new-ui/types/store").BrowserEntity>, args_2: Record<string, import("../../new-ui/types/store").ResultEntity>, args_3: Record<string, import("../../new-ui/types/store").ImageEntity>, args_4: boolean, args_5: boolean, args_6: any) => any> & {
477
336
  clearCache: () => void;
478
337
  };
479
338
  export const getSelectedImages: ((state: {
@@ -482,6 +341,7 @@ export const getSelectedImages: ((state: {
482
341
  isInitialized: boolean;
483
342
  availableFeatures: import("../../../constants").Feature[];
484
343
  isSearchLoading?: boolean | undefined;
344
+ isRefreshTestsLoading?: boolean | undefined;
485
345
  nameFilter: string;
486
346
  useRegexFilter: boolean;
487
347
  useMatchCaseFilter: boolean;
@@ -631,6 +491,7 @@ export const areAllRootSuitesIdle: ((state: {
631
491
  isInitialized: boolean;
632
492
  availableFeatures: import("../../../constants").Feature[];
633
493
  isSearchLoading?: boolean | undefined;
494
+ isRefreshTestsLoading?: boolean | undefined;
634
495
  nameFilter: string;
635
496
  useRegexFilter: boolean;
636
497
  useMatchCaseFilter: boolean;
@@ -119,6 +119,8 @@ export interface ImageEntityFail extends ImageEntityCommon {
119
119
  actualImg: ImageFile;
120
120
  expectedImg: ImageFile;
121
121
  refImg: RefImageFile;
122
+ differentPixels: number;
123
+ diffRatio: number;
122
124
  }
123
125
  export type ImageEntity = ImageEntityError | ImageEntityFail | ImageEntitySuccess | ImageEntityUpdated | ImageEntityStaged | ImageEntityCommitted;
124
126
  export declare const isImageEntityFail: (image: ImageEntity) => image is ImageEntityFail;
@@ -215,6 +217,7 @@ export interface State {
215
217
  isInitialized: boolean;
216
218
  availableFeatures: Feature[];
217
219
  isSearchLoading?: boolean;
220
+ isRefreshTestsLoading?: boolean;
218
221
  nameFilter: string;
219
222
  useRegexFilter: boolean;
220
223
  useMatchCaseFilter: boolean;