html-reporter 9.9.2 → 9.10.1
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/build/gemini.d.ts +2 -0
- package/{gemini.js → build/gemini.js} +1 -1
- package/build/gemini.js.map +1 -0
- package/build/hermione.d.ts +2 -0
- package/{hermione.js → build/hermione.js} +3 -21
- package/build/hermione.js.map +1 -0
- package/build/lib/cli-commands/gui.d.ts +2 -0
- package/{lib → build/lib}/cli-commands/gui.js +5 -7
- package/build/lib/cli-commands/gui.js.map +1 -0
- package/build/lib/cli-commands/index.d.ts +3 -0
- package/{lib → build/lib}/cli-commands/index.js +1 -1
- package/build/lib/cli-commands/index.js.map +1 -0
- package/build/lib/cli-commands/merge-reports.d.ts +2 -0
- package/{lib → build/lib}/cli-commands/merge-reports.js +11 -11
- package/build/lib/cli-commands/merge-reports.js.map +1 -0
- package/build/lib/cli-commands/remove-unused-screens/index.d.ts +2 -0
- package/{lib → build/lib}/cli-commands/remove-unused-screens/index.js +61 -110
- package/build/lib/cli-commands/remove-unused-screens/index.js.map +1 -0
- package/build/lib/cli-commands/remove-unused-screens/utils.d.ts +16 -0
- package/{lib → build/lib}/cli-commands/remove-unused-screens/utils.js +10 -48
- package/build/lib/cli-commands/remove-unused-screens/utils.js.map +1 -0
- package/build/lib/common-utils.d.ts +24 -0
- package/build/lib/common-utils.js +116 -0
- package/build/lib/common-utils.js.map +1 -0
- package/build/lib/config/custom-gui-asserts.d.ts +1 -0
- package/{lib → build/lib}/config/custom-gui-asserts.js +2 -12
- package/build/lib/config/custom-gui-asserts.js.map +1 -0
- package/build/lib/config/index.d.ts +21 -0
- package/{lib → build/lib}/config/index.js +7 -32
- package/build/lib/config/index.js.map +1 -0
- package/build/lib/constants/browser.d.ts +3 -0
- package/build/lib/constants/browser.js +5 -0
- package/build/lib/constants/browser.js.map +1 -0
- package/build/lib/constants/checked-statuses.d.ts +3 -0
- package/build/lib/constants/checked-statuses.js +7 -0
- package/build/lib/constants/checked-statuses.js.map +1 -0
- package/build/lib/constants/database.d.ts +25 -0
- package/build/lib/constants/database.js +47 -0
- package/build/lib/constants/database.js.map +1 -0
- package/build/lib/constants/defaults.d.ts +18 -0
- package/{lib → build/lib}/constants/defaults.js +1 -2
- package/build/lib/constants/defaults.js.map +1 -0
- package/build/lib/constants/diff-modes.d.ts +53 -0
- package/{lib → build/lib}/constants/diff-modes.js +2 -0
- package/build/lib/constants/diff-modes.js.map +1 -0
- package/build/lib/constants/errors.d.ts +5 -0
- package/{lib → build/lib}/constants/errors.js +1 -1
- package/build/lib/constants/errors.js.map +1 -0
- package/build/lib/constants/expand-modes.d.ts +4 -0
- package/{lib → build/lib}/constants/expand-modes.js +1 -1
- package/build/lib/constants/expand-modes.js.map +1 -0
- package/build/lib/constants/extension-points.d.ts +4 -0
- package/build/lib/constants/extension-points.js +8 -0
- package/build/lib/constants/extension-points.js.map +1 -0
- package/build/lib/constants/group-tests.d.ts +7 -0
- package/{lib → build/lib}/constants/group-tests.js +2 -0
- package/build/lib/constants/group-tests.js.map +1 -0
- package/build/lib/constants/paths.d.ts +2 -0
- package/{lib → build/lib}/constants/paths.js +1 -1
- package/build/lib/constants/paths.js.map +1 -0
- package/build/lib/constants/plugin-events.d.ts +5 -0
- package/{lib → build/lib}/constants/plugin-events.js +2 -4
- package/build/lib/constants/plugin-events.js.map +1 -0
- package/build/lib/constants/save-formats.d.ts +1 -0
- package/{lib → build/lib}/constants/save-formats.js +1 -1
- package/build/lib/constants/save-formats.js.map +1 -0
- package/build/lib/constants/test-statuses.d.ts +8 -0
- package/{lib → build/lib}/constants/test-statuses.js +1 -1
- package/build/lib/constants/test-statuses.js.map +1 -0
- package/build/lib/constants/view-modes.d.ts +5 -0
- package/{lib → build/lib}/constants/view-modes.js +1 -1
- package/build/lib/constants/view-modes.js.map +1 -0
- package/build/lib/db-utils/client.d.ts +19 -0
- package/{lib → build/lib}/db-utils/client.js +18 -45
- package/build/lib/db-utils/client.js.map +1 -0
- package/build/lib/db-utils/common.d.ts +10 -0
- package/build/lib/db-utils/common.js +56 -0
- package/build/lib/db-utils/common.js.map +1 -0
- package/build/lib/db-utils/server.d.ts +16 -0
- package/{lib → build/lib}/db-utils/server.js +15 -41
- package/build/lib/db-utils/server.js.map +1 -0
- package/build/lib/gui/api/facade.d.ts +8 -0
- package/{lib → build/lib}/gui/api/facade.js +1 -4
- package/build/lib/gui/api/facade.js.map +1 -0
- package/build/lib/gui/api/index.d.ts +9 -0
- package/{lib → build/lib}/gui/api/index.js +1 -5
- package/build/lib/gui/api/index.js.map +1 -0
- package/build/lib/gui/app.d.ts +62 -0
- package/{lib → build/lib}/gui/app.js +2 -21
- package/build/lib/gui/app.js.map +1 -0
- package/build/lib/gui/constants/client-events.d.ts +6 -0
- package/{lib → build/lib}/gui/constants/client-events.js +1 -4
- package/build/lib/gui/constants/client-events.js.map +1 -0
- package/build/lib/gui/constants/custom-gui-control-types.d.ts +2 -0
- package/{lib → build/lib}/gui/constants/custom-gui-control-types.js +1 -1
- package/build/lib/gui/constants/custom-gui-control-types.js.map +1 -0
- package/build/lib/gui/constants/gui-events.d.ts +2 -0
- package/{lib → build/lib}/gui/constants/gui-events.js +1 -1
- package/build/lib/gui/constants/gui-events.js.map +1 -0
- package/build/lib/gui/constants/server.d.ts +3 -0
- package/{lib → build/lib}/gui/constants/server.js +1 -1
- package/build/lib/gui/constants/server.js.map +1 -0
- package/build/lib/gui/event-source.d.ts +6 -0
- package/{lib → build/lib}/gui/event-source.js +2 -5
- package/build/lib/gui/event-source.js.map +1 -0
- package/build/lib/gui/index.d.ts +12 -0
- package/build/lib/gui/index.js +22 -0
- package/build/lib/gui/index.js.map +1 -0
- package/build/lib/gui/routes/plugins.d.ts +2 -0
- package/{lib → build/lib}/gui/routes/plugins.js +9 -24
- package/build/lib/gui/routes/plugins.js.map +1 -0
- package/build/lib/gui/server.d.ts +8 -0
- package/{lib → build/lib}/gui/server.js +32 -51
- package/build/lib/gui/server.js.map +1 -0
- package/build/lib/gui/tool-runner/index.d.ts +123 -0
- package/{lib → build/lib}/gui/tool-runner/index.js +42 -122
- package/build/lib/gui/tool-runner/index.js.map +1 -0
- package/build/lib/gui/tool-runner/report-subscriber.d.ts +2 -0
- package/{lib → build/lib}/gui/tool-runner/report-subscriber.js +7 -30
- package/build/lib/gui/tool-runner/report-subscriber.js.map +1 -0
- package/build/lib/gui/tool-runner/runner/all-test-runner.d.ts +4 -0
- package/{lib → build/lib}/gui/tool-runner/runner/all-test-runner.js +1 -3
- package/build/lib/gui/tool-runner/runner/all-test-runner.js.map +1 -0
- package/build/lib/gui/tool-runner/runner/index.d.ts +3 -0
- package/{lib → build/lib}/gui/tool-runner/runner/index.js +1 -2
- package/build/lib/gui/tool-runner/runner/index.js.map +1 -0
- package/build/lib/gui/tool-runner/runner/runner.d.ts +6 -0
- package/{lib → build/lib}/gui/tool-runner/runner/runner.js +1 -2
- package/build/lib/gui/tool-runner/runner/runner.js.map +1 -0
- package/build/lib/gui/tool-runner/runner/specific-test-runner.d.ts +7 -0
- package/{lib → build/lib}/gui/tool-runner/runner/specific-test-runner.js +2 -8
- package/build/lib/gui/tool-runner/runner/specific-test-runner.js.map +1 -0
- package/build/lib/gui/tool-runner/utils.d.ts +7 -0
- package/{lib → build/lib}/gui/tool-runner/utils.js +11 -35
- package/build/lib/gui/tool-runner/utils.js.map +1 -0
- package/build/lib/history-utils.d.ts +1 -0
- package/{lib → build/lib}/history-utils.js +5 -20
- package/build/lib/history-utils.js.map +1 -0
- package/build/lib/local-images-saver.d.ts +4 -0
- package/build/lib/local-images-saver.js +9 -0
- package/build/lib/local-images-saver.js.map +1 -0
- package/build/lib/merge-reports/index.d.ts +4 -0
- package/{lib → build/lib}/merge-reports/index.js +3 -8
- package/build/lib/merge-reports/index.js.map +1 -0
- package/build/lib/plugin-adapter.d.ts +32 -0
- package/{lib → build/lib}/plugin-adapter.js +8 -25
- package/build/lib/plugin-adapter.js.map +1 -0
- package/build/lib/plugin-api.d.ts +57 -0
- package/{lib → build/lib}/plugin-api.js +2 -20
- package/build/lib/plugin-api.js.map +1 -0
- package/build/lib/plugin-utils.d.ts +3 -0
- package/{lib → build/lib}/plugin-utils.js +3 -5
- package/build/lib/plugin-utils.js.map +1 -0
- package/build/lib/report-builder/gui.d.ts +73 -0
- package/{lib → build/lib}/report-builder/gui.js +33 -92
- package/build/lib/report-builder/gui.js.map +1 -0
- package/build/lib/report-builder/static.d.ts +32 -0
- package/{lib → build/lib}/report-builder/static.js +25 -64
- package/build/lib/report-builder/static.js.map +1 -0
- package/build/lib/reporter-helpers.d.ts +3 -0
- package/{lib → build/lib}/reporter-helpers.js +2 -11
- package/build/lib/reporter-helpers.js.map +1 -0
- package/build/lib/server-utils.d.ts +42 -0
- package/{lib → build/lib}/server-utils.js +37 -92
- package/build/lib/server-utils.js.map +1 -0
- package/build/lib/sqlite-adapter.d.ts +78 -0
- package/{lib → build/lib}/sqlite-adapter.js +15 -56
- package/build/lib/sqlite-adapter.js.map +1 -0
- package/build/lib/static/gui.min.css +1 -0
- package/build/lib/static/gui.min.js +124 -0
- package/build/lib/static/modules/utils.d.ts +31 -0
- package/{lib → build/lib}/static/modules/utils.js +16 -56
- package/build/lib/static/modules/utils.js.map +1 -0
- package/{lib → build/lib}/static/report.min.css +1 -1
- package/build/lib/static/report.min.js +124 -0
- package/build/lib/suite-adapter.d.ts +15 -0
- package/{lib → build/lib}/suite-adapter.js +2 -18
- package/build/lib/suite-adapter.js.map +1 -0
- package/build/lib/test-adapter.d.ts +118 -0
- package/{lib → build/lib}/test-adapter.js +38 -156
- package/build/lib/test-adapter.js.map +1 -0
- package/build/lib/tests-tree-builder/base.d.ts +70 -0
- package/{lib → build/lib}/tests-tree-builder/base.js +34 -74
- package/build/lib/tests-tree-builder/base.js.map +1 -0
- package/build/lib/tests-tree-builder/gui.d.ts +47 -0
- package/{lib → build/lib}/tests-tree-builder/gui.js +12 -63
- package/build/lib/tests-tree-builder/gui.js.map +1 -0
- package/build/lib/tests-tree-builder/static.d.ts +55 -0
- package/{lib → build/lib}/tests-tree-builder/static.js +11 -42
- package/build/lib/tests-tree-builder/static.js.map +1 -0
- package/build/lib/workers/create-workers.d.ts +2 -0
- package/{lib → build/lib}/workers/create-workers.js +1 -2
- package/build/lib/workers/create-workers.js.map +1 -0
- package/build/lib/workers/worker.d.ts +1 -0
- package/build/lib/workers/worker.js +13 -0
- package/build/lib/workers/worker.js.map +1 -0
- package/build/package.json +178 -0
- package/package.json +44 -23
- package/2html-reporter.iml +0 -9
- package/CHANGELOG.md +0 -2886
- package/docs/en/html-reporter-api.md +0 -198
- package/docs/en/html-reporter-commands.md +0 -96
- package/docs/en/html-reporter-custom-gui.md +0 -99
- package/docs/en/html-reporter-events.md +0 -125
- package/docs/en/html-reporter-plugins.md +0 -265
- package/docs/en/html-reporter-setup.md +0 -378
- package/docs/en/html-reporter.md +0 -8
- package/docs/ru/html-reporter-api.md +0 -198
- package/docs/ru/html-reporter-commands.md +0 -96
- package/docs/ru/html-reporter-custom-gui.md +0 -99
- package/docs/ru/html-reporter-events.md +0 -125
- package/docs/ru/html-reporter-plugins.md +0 -265
- package/docs/ru/html-reporter-setup.md +0 -378
- package/docs/ru/html-reporter.md +0 -8
- package/lib/common-utils.js +0 -117
- package/lib/constants/browser.js +0 -3
- package/lib/constants/database.js +0 -49
- package/lib/constants/extension-points.js +0 -6
- package/lib/db-utils/common.js +0 -76
- package/lib/gui/index.js +0 -19
- package/lib/local-images-saver.js +0 -11
- package/lib/static/components/bottom-progress-bar/index.js +0 -42
- package/lib/static/components/controls/accept-opened-button.js +0 -39
- package/lib/static/components/controls/base-host-input.js +0 -39
- package/lib/static/components/controls/browser-list/index.js +0 -239
- package/lib/static/components/controls/browser-list/index.styl +0 -52
- package/lib/static/components/controls/browser-list/label.js +0 -60
- package/lib/static/components/controls/browser-list/label.styl +0 -18
- package/lib/static/components/controls/browser-list/utils.js +0 -43
- package/lib/static/components/controls/common-controls.js +0 -75
- package/lib/static/components/controls/common-filters.js +0 -32
- package/lib/static/components/controls/control-button.js +0 -54
- package/lib/static/components/controls/controls.less +0 -109
- package/lib/static/components/controls/custom-gui-controls.js +0 -70
- package/lib/static/components/controls/find-same-diffs-button.js +0 -47
- package/lib/static/components/controls/gui-controls.js +0 -81
- package/lib/static/components/controls/menu-bar.js +0 -47
- package/lib/static/components/controls/report-controls.js +0 -21
- package/lib/static/components/controls/report-info.js +0 -31
- package/lib/static/components/controls/run-button.js +0 -27
- package/lib/static/components/controls/selects/control.js +0 -51
- package/lib/static/components/controls/selects/group-tests.js +0 -94
- package/lib/static/components/controls/selects/index.styl +0 -57
- package/lib/static/components/controls/strict-match-filter-input.js +0 -39
- package/lib/static/components/controls/test-name-filter-input.js +0 -42
- package/lib/static/components/custom-scripts.js +0 -23
- package/lib/static/components/details.js +0 -58
- package/lib/static/components/error-boundary.js +0 -26
- package/lib/static/components/extension-point.js +0 -106
- package/lib/static/components/favicon-changer.js +0 -56
- package/lib/static/components/group-tests/item.js +0 -39
- package/lib/static/components/group-tests/list.js +0 -71
- package/lib/static/components/group-tests/prop-types.js +0 -12
- package/lib/static/components/gui.js +0 -105
- package/lib/static/components/header/header.css +0 -5
- package/lib/static/components/header/index.js +0 -26
- package/lib/static/components/header/summary/dbBtn.js +0 -36
- package/lib/static/components/header/summary/dbSummary.js +0 -49
- package/lib/static/components/header/summary/index.js +0 -43
- package/lib/static/components/header/summary/item.js +0 -28
- package/lib/static/components/header/summary/summary.css +0 -77
- package/lib/static/components/icons/arrow.js +0 -24
- package/lib/static/components/icons/arrows-close.js +0 -25
- package/lib/static/components/icons/arrows-move.js +0 -24
- package/lib/static/components/icons/arrows-open.js +0 -25
- package/lib/static/components/icons/view-in-browser/index.js +0 -59
- package/lib/static/components/icons/view-in-browser/index.styl +0 -28
- package/lib/static/components/loading.js +0 -25
- package/lib/static/components/main-tree.js +0 -23
- package/lib/static/components/modals/find-same-diffs.js +0 -34
- package/lib/static/components/modals/index.js +0 -6
- package/lib/static/components/modals/modal.css +0 -3
- package/lib/static/components/modals/modal.js +0 -27
- package/lib/static/components/modals/screenshot-accepter/body.js +0 -88
- package/lib/static/components/modals/screenshot-accepter/header.js +0 -192
- package/lib/static/components/modals/screenshot-accepter/index.js +0 -228
- package/lib/static/components/modals/screenshot-accepter/meta.js +0 -32
- package/lib/static/components/modals/screenshot-accepter/style.css +0 -115
- package/lib/static/components/popup/index.js +0 -85
- package/lib/static/components/popup/index.styl +0 -37
- package/lib/static/components/progress-bar/index.js +0 -13
- package/lib/static/components/progress-bar/index.styl +0 -24
- package/lib/static/components/report.js +0 -72
- package/lib/static/components/retry-switcher/index.js +0 -36
- package/lib/static/components/retry-switcher/item.js +0 -55
- package/lib/static/components/section/body/description.js +0 -24
- package/lib/static/components/section/body/history/index.js +0 -29
- package/lib/static/components/section/body/history/index.styl +0 -4
- package/lib/static/components/section/body/index.js +0 -114
- package/lib/static/components/section/body/meta-info/content.js +0 -114
- package/lib/static/components/section/body/meta-info/index.js +0 -33
- package/lib/static/components/section/body/result.js +0 -41
- package/lib/static/components/section/body/tabs.js +0 -52
- package/lib/static/components/section/section-browser.js +0 -113
- package/lib/static/components/section/section-common.js +0 -100
- package/lib/static/components/section/section-wrapper.js +0 -20
- package/lib/static/components/section/title/browser-skipped.js +0 -22
- package/lib/static/components/section/title/browser.js +0 -74
- package/lib/static/components/section/title/simple.js +0 -82
- package/lib/static/components/state/error-details.js +0 -18
- package/lib/static/components/state/index.js +0 -208
- package/lib/static/components/state/screenshot/diff-circle.js +0 -66
- package/lib/static/components/state/screenshot/full.js +0 -28
- package/lib/static/components/state/screenshot/resized.js +0 -90
- package/lib/static/components/state/screenshot/with-encode-uri.js +0 -44
- package/lib/static/components/state/screenshot/with-synced-scale.js +0 -116
- package/lib/static/components/state/state-error.js +0 -140
- package/lib/static/components/state/state-fail/index.js +0 -161
- package/lib/static/components/state/state-fail/index.styl +0 -31
- package/lib/static/components/state/state-fail/onion-skin-diff/index.js +0 -43
- package/lib/static/components/state/state-fail/onion-skin-diff/index.styl +0 -19
- package/lib/static/components/state/state-fail/prop-types.js +0 -16
- package/lib/static/components/state/state-fail/swipe-diff/index.js +0 -138
- package/lib/static/components/state/state-fail/swipe-diff/index.styl +0 -82
- package/lib/static/components/state/state-fail/switch-diff/index.js +0 -36
- package/lib/static/components/state/state-fail/switch-diff/index.styl +0 -12
- package/lib/static/components/state/state-fail/useFitImages.js +0 -63
- package/lib/static/components/state/state-success.js +0 -23
- package/lib/static/components/sticky-header/gui.js +0 -12
- package/lib/static/components/sticky-header/index.js +0 -36
- package/lib/static/components/sticky-header/index.styl +0 -37
- package/lib/static/components/sticky-header/report.js +0 -14
- package/lib/static/components/suites.js +0 -157
- package/lib/static/containers/array/array.styl +0 -32
- package/lib/static/containers/array/index.js +0 -61
- package/lib/static/containers/modal.js +0 -43
- package/lib/static/gui.css +0 -161
- package/lib/static/gui.js +0 -14
- package/lib/static/gui.min.css +0 -1
- package/lib/static/gui.min.js +0 -124
- package/lib/static/hooks/useElementSize.js +0 -30
- package/lib/static/hooks/useEventListener.js +0 -25
- package/lib/static/hooks/useWindowSize.js +0 -25
- package/lib/static/index.js +0 -14
- package/lib/static/modules/action-names.js +0 -57
- package/lib/static/modules/actions.js +0 -332
- package/lib/static/modules/custom-queries.js +0 -27
- package/lib/static/modules/default-state.js +0 -84
- package/lib/static/modules/load-plugin.js +0 -109
- package/lib/static/modules/local-storage-wrapper.js +0 -54
- package/lib/static/modules/middlewares/local-storage.js +0 -30
- package/lib/static/modules/middlewares/metrika.js +0 -121
- package/lib/static/modules/plugins.js +0 -52
- package/lib/static/modules/query-params.js +0 -98
- package/lib/static/modules/reducers/api-values.js +0 -25
- package/lib/static/modules/reducers/auto-run.js +0 -14
- package/lib/static/modules/reducers/bottom-progress-bar.js +0 -16
- package/lib/static/modules/reducers/browsers.js +0 -43
- package/lib/static/modules/reducers/close-ids.js +0 -12
- package/lib/static/modules/reducers/config.js +0 -48
- package/lib/static/modules/reducers/date.js +0 -16
- package/lib/static/modules/reducers/db.js +0 -30
- package/lib/static/modules/reducers/fetch-db-details.js +0 -13
- package/lib/static/modules/reducers/grouped-tests/by/meta.js +0 -31
- package/lib/static/modules/reducers/grouped-tests/by/result.js +0 -57
- package/lib/static/modules/reducers/grouped-tests/helpers.js +0 -91
- package/lib/static/modules/reducers/grouped-tests/index.js +0 -52
- package/lib/static/modules/reducers/gui.js +0 -16
- package/lib/static/modules/reducers/index.js +0 -56
- package/lib/static/modules/reducers/loading.js +0 -12
- package/lib/static/modules/reducers/modals.js +0 -16
- package/lib/static/modules/reducers/notifications.js +0 -12
- package/lib/static/modules/reducers/plugins.js +0 -25
- package/lib/static/modules/reducers/processing.js +0 -21
- package/lib/static/modules/reducers/running.js +0 -19
- package/lib/static/modules/reducers/skips.js +0 -15
- package/lib/static/modules/reducers/stats.js +0 -21
- package/lib/static/modules/reducers/stopping.js +0 -16
- package/lib/static/modules/reducers/tree/helpers.js +0 -28
- package/lib/static/modules/reducers/tree/index.js +0 -314
- package/lib/static/modules/reducers/tree/nodes/browsers.js +0 -109
- package/lib/static/modules/reducers/tree/nodes/images.js +0 -59
- package/lib/static/modules/reducers/tree/nodes/results.js +0 -39
- package/lib/static/modules/reducers/tree/nodes/suites.js +0 -239
- package/lib/static/modules/reducers/view.js +0 -93
- package/lib/static/modules/selectors/grouped-tests.js +0 -8
- package/lib/static/modules/selectors/index.js +0 -3
- package/lib/static/modules/selectors/stats.js +0 -33
- package/lib/static/modules/selectors/tree.js +0 -256
- package/lib/static/modules/selectors/view.js +0 -5
- package/lib/static/modules/store.js +0 -25
- package/lib/static/modules/web-vitals.js +0 -13
- package/lib/static/modules/yandex-metrika.js +0 -50
- package/lib/static/report.min.js +0 -124
- package/lib/static/styles.css +0 -887
- package/lib/static/template.html +0 -13
- package/lib/workers/worker.js +0 -15
- package/webpack.common.js +0 -95
- package/webpack.dev.js +0 -25
- package/webpack.prod.js +0 -19
- /package/{lib → build/lib}/static/gui.html +0 -0
- /package/{lib → build/lib}/static/icons/favicon-failure.png +0 -0
- /package/{lib → build/lib}/static/icons/favicon-running.png +0 -0
- /package/{lib → build/lib}/static/icons/favicon-success.png +0 -0
- /package/{lib → build/lib}/static/icons/favicon.png +0 -0
- /package/{lib → build/lib}/static/index.html +0 -0
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {useState, useCallback, useLayoutEffect} from 'react';
|
|
2
|
-
|
|
3
|
-
import useEventListener from './useEventListener';
|
|
4
|
-
|
|
5
|
-
export default function useElementSize({shouldListenResize = false} = {}) {
|
|
6
|
-
const [ref, setRef] = useState(null);
|
|
7
|
-
const [size, setSize] = useState({
|
|
8
|
-
width: 0,
|
|
9
|
-
height: 0,
|
|
10
|
-
left: 0,
|
|
11
|
-
top: 0
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const handlePosition = useCallback(() => {
|
|
15
|
-
setSize({
|
|
16
|
-
width: ref && ref.offsetWidth || 0,
|
|
17
|
-
height: ref && ref.offsetHeight || 0,
|
|
18
|
-
left: ref && ref.offsetLeft || 0,
|
|
19
|
-
top: ref && ref.offsetTop || 0
|
|
20
|
-
});
|
|
21
|
-
}, [ref && ref.offsetHeight, ref && ref.offsetWidth, ref && ref.offsetLeft, ref && ref.offsetTop]);
|
|
22
|
-
|
|
23
|
-
shouldListenResize && useEventListener('resize', handlePosition);
|
|
24
|
-
|
|
25
|
-
useLayoutEffect(() => {
|
|
26
|
-
handlePosition();
|
|
27
|
-
}, [ref && ref.offsetHeight, ref && ref.offsetWidth, ref && ref.offsetLeft, ref && ref.offsetTop]);
|
|
28
|
-
|
|
29
|
-
return [setRef, size];
|
|
30
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {useRef, useEffect, useLayoutEffect} from 'react';
|
|
2
|
-
|
|
3
|
-
export default function useEventListener(eventName, handler, element, options) {
|
|
4
|
-
const savedHandler = useRef(handler);
|
|
5
|
-
|
|
6
|
-
useLayoutEffect(() => {
|
|
7
|
-
savedHandler.current = handler;
|
|
8
|
-
}, [handler]);
|
|
9
|
-
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const targetElement = element && element.current || window;
|
|
12
|
-
|
|
13
|
-
if (!targetElement || !targetElement.addEventListener) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const listener = event => savedHandler.current(event);
|
|
18
|
-
|
|
19
|
-
targetElement.addEventListener(eventName, listener, options);
|
|
20
|
-
|
|
21
|
-
return () => {
|
|
22
|
-
targetElement.removeEventListener(eventName, listener, options);
|
|
23
|
-
};
|
|
24
|
-
}, [eventName, element, options]);
|
|
25
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import {useState, useLayoutEffect, useCallback} from 'react';
|
|
2
|
-
|
|
3
|
-
import useEventListener from './useEventListener';
|
|
4
|
-
|
|
5
|
-
export default function useWindowSize() {
|
|
6
|
-
const [windowSize, setWindowSize] = useState({
|
|
7
|
-
width: 0,
|
|
8
|
-
height: 0
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const handleSize = useCallback(() => {
|
|
12
|
-
setWindowSize({
|
|
13
|
-
width: window.innerWidth,
|
|
14
|
-
height: window.innerHeight
|
|
15
|
-
});
|
|
16
|
-
}, [setWindowSize]);
|
|
17
|
-
|
|
18
|
-
useEventListener('resize', handleSize);
|
|
19
|
-
|
|
20
|
-
useLayoutEffect(() => {
|
|
21
|
-
handleSize();
|
|
22
|
-
}, []);
|
|
23
|
-
|
|
24
|
-
return windowSize;
|
|
25
|
-
}
|
package/lib/static/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import {Provider} from 'react-redux';
|
|
4
|
-
import store from './modules/store';
|
|
5
|
-
import Report from './components/report';
|
|
6
|
-
|
|
7
|
-
const rootEl = document.getElementById('app');
|
|
8
|
-
|
|
9
|
-
ReactDOM.render(
|
|
10
|
-
<Provider store={store}>
|
|
11
|
-
<Report/>
|
|
12
|
-
</Provider>,
|
|
13
|
-
rootEl
|
|
14
|
-
);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
INIT_GUI_REPORT: 'INIT_GUI_REPORT',
|
|
5
|
-
INIT_STATIC_REPORT: 'INIT_STATIC_REPORT',
|
|
6
|
-
FIN_GUI_REPORT: 'FIN_GUI_REPORT',
|
|
7
|
-
FIN_STATIC_REPORT: 'FIN_STATIC_REPORT',
|
|
8
|
-
RUN_ALL_TESTS: 'RUN_ALL_TESTS',
|
|
9
|
-
RUN_FAILED_TESTS: 'RUN_FAILED_TESTS',
|
|
10
|
-
STOP_TESTS: 'STOP_TESTS',
|
|
11
|
-
RETRY_SUITE: 'RETRY_SUITE',
|
|
12
|
-
RETRY_TEST: 'RETRY_TEST',
|
|
13
|
-
SUITE_BEGIN: 'SUITE_BEGIN',
|
|
14
|
-
TEST_BEGIN: 'TEST_BEGIN',
|
|
15
|
-
TEST_RESULT: 'TEST_RESULT',
|
|
16
|
-
TESTS_END: 'TESTS_END',
|
|
17
|
-
ACCEPT_SCREENSHOT: 'ACCEPT_SCREENSHOT',
|
|
18
|
-
ACCEPT_OPENED_SCREENSHOTS: 'ACCEPT_OPENED_SCREENSHOTS',
|
|
19
|
-
SCREENSHOT_ACCEPTER_ACCEPT: 'SCREENSHOT_ACCEPTER/ACCEPT',
|
|
20
|
-
APPLY_DELAYED_TEST_RESULTS: 'APPLY_DELAYED_TEST_RESULTS',
|
|
21
|
-
UNDO_ACCEPT_IMAGES: 'UNDO_ACCEPT_IMAGES',
|
|
22
|
-
CLOSE_SECTIONS: 'CLOSE_SECTIONS',
|
|
23
|
-
TOGGLE_STATE_RESULT: 'TOGGLE_STATE_RESULT',
|
|
24
|
-
TOGGLE_LOADING: 'TOGGLE_LOADING',
|
|
25
|
-
OPEN_MODAL: 'OPEN_MODAL',
|
|
26
|
-
CLOSE_MODAL: 'CLOSE_MODAL',
|
|
27
|
-
CHANGE_TEST_RETRY: 'CHANGE_TEST_RETRY',
|
|
28
|
-
VIEW_EXPAND_ALL: 'VIEW_EXPAND_ALL',
|
|
29
|
-
VIEW_EXPAND_ERRORS: 'VIEW_EXPAND_ERRORS',
|
|
30
|
-
VIEW_EXPAND_RETRIES: 'VIEW_EXPAND_RETRIES',
|
|
31
|
-
VIEW_COLLAPSE_ALL: 'VIEW_COLLAPSE_ALL',
|
|
32
|
-
CHANGE_VIEW_MODE: 'CHANGE_VIEW_MODE',
|
|
33
|
-
VIEW_UPDATE_BASE_HOST: 'VIEW_UPDATE_BASE_HOST',
|
|
34
|
-
VIEW_UPDATE_FILTER_BY_NAME: 'VIEW_UPDATE_FILTER_BY_NAME',
|
|
35
|
-
VIEW_SET_STRICT_MATCH_FILTER: 'VIEW_SET_STRICT_MATCH_FILTER',
|
|
36
|
-
VIEW_THREE_UP_DIFF: 'VIEW_THREE_UP_DIFF',
|
|
37
|
-
VIEW_THREE_UP_SCALED_DIFF: 'VIEW_THREE_UP_SCALED_DIFF',
|
|
38
|
-
VIEW_THREE_UP_SCALED_TO_FIT_DIFF: 'VIEW_THREE_UP_SCALED_TO_FIT_DIFF',
|
|
39
|
-
VIEW_ONLY_DIFF: 'VIEW_ONLY_DIFF',
|
|
40
|
-
VIEW_SWITCH_DIFF: 'VIEW_SWITCH_DIFF',
|
|
41
|
-
VIEW_SWIPE_DIFF: 'VIEW_SWIPE_DIFF',
|
|
42
|
-
VIEW_ONION_SKIN_DIFF: 'VIEW_ONION_SKIN_DIFF',
|
|
43
|
-
PROCESS_BEGIN: 'PROCESS_BEGIN',
|
|
44
|
-
PROCESS_END: 'PROCESS_END',
|
|
45
|
-
RUN_CUSTOM_GUI_ACTION: 'RUN_CUSTOM_GUI_ACTION',
|
|
46
|
-
BROWSERS_SELECTED: 'BROWSERS_SELECTED',
|
|
47
|
-
COPY_SUITE_NAME: 'COPY_SUITE_NAME',
|
|
48
|
-
VIEW_IN_BROWSER: 'VIEW_IN_BROWSER',
|
|
49
|
-
COPY_TEST_LINK: 'COPY_TEST_LINK',
|
|
50
|
-
TOGGLE_SUITE_SECTION: 'TOGGLE_SUITE_SECTION',
|
|
51
|
-
TOGGLE_BROWSER_SECTION: 'TOGGLE_BROWSER_SECTION',
|
|
52
|
-
TOGGLE_META_INFO: 'TOGGLE_META_INFO',
|
|
53
|
-
TOGGLE_PAGE_SCREENSHOT: 'TOGGLE_PAGE_SCREENSHOT',
|
|
54
|
-
TOGGLE_TESTS_GROUP: 'TOGGLE_TESTS_GROUP',
|
|
55
|
-
UPDATE_BOTTOM_PROGRESS_BAR: 'UPDATE_BOTTOM_PROGRESS_BAR',
|
|
56
|
-
GROUP_TESTS_BY_KEY: 'GROUP_TESTS_BY_KEY'
|
|
57
|
-
};
|
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import {isEmpty, difference} from 'lodash';
|
|
3
|
-
import {notify, dismissNotification as dismissNotify, POSITIONS} from 'reapop';
|
|
4
|
-
import StaticTestsTreeBuilder from '../../tests-tree-builder/static';
|
|
5
|
-
import actionNames from './action-names';
|
|
6
|
-
import {types as modalTypes} from '../components/modals';
|
|
7
|
-
import {QUEUED} from '../../constants/test-statuses';
|
|
8
|
-
import diffModes from '../../constants/diff-modes';
|
|
9
|
-
import {getHttpErrorMessage} from './utils';
|
|
10
|
-
import {fetchDataFromDatabases, mergeDatabases, connectToDatabase, getMainDatabaseUrl, getSuitesTableRows} from '../../db-utils/client';
|
|
11
|
-
import {setFilteredBrowsers} from './query-params';
|
|
12
|
-
import plugins from './plugins';
|
|
13
|
-
|
|
14
|
-
export const createNotification = (id, status, message, props = {}) => {
|
|
15
|
-
const notificationProps = {
|
|
16
|
-
position: POSITIONS.topCenter,
|
|
17
|
-
dismissAfter: 5000,
|
|
18
|
-
dismissible: true,
|
|
19
|
-
showDismissButton: true,
|
|
20
|
-
allowHTML: true,
|
|
21
|
-
...props
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return notify({id, status, message, ...notificationProps});
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const createNotificationError = (id, error, props = {dismissAfter: 0}) =>
|
|
28
|
-
createNotification(id, 'error', getHttpErrorMessage(error), props);
|
|
29
|
-
|
|
30
|
-
export const dismissNotification = dismissNotify;
|
|
31
|
-
|
|
32
|
-
export const initGuiReport = () => {
|
|
33
|
-
return async (dispatch) => {
|
|
34
|
-
try {
|
|
35
|
-
const appState = await axios.get('/init');
|
|
36
|
-
|
|
37
|
-
const mainDatabaseUrl = getMainDatabaseUrl();
|
|
38
|
-
const db = await connectToDatabase(mainDatabaseUrl.href);
|
|
39
|
-
|
|
40
|
-
await plugins.loadAll(appState.data.config);
|
|
41
|
-
|
|
42
|
-
dispatch({
|
|
43
|
-
type: actionNames.INIT_GUI_REPORT,
|
|
44
|
-
payload: {...appState.data, db}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
const {customGuiError} = appState.data;
|
|
48
|
-
|
|
49
|
-
if (customGuiError) {
|
|
50
|
-
dispatch(createNotificationError('initGuiReport', {...customGuiError}));
|
|
51
|
-
delete appState.data.customGuiError;
|
|
52
|
-
}
|
|
53
|
-
} catch (e) {
|
|
54
|
-
dispatch(createNotificationError('initGuiReport', e));
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export const initStaticReport = () => {
|
|
60
|
-
return async dispatch => {
|
|
61
|
-
const dataFromStaticFile = window.data || {};
|
|
62
|
-
let fetchDbDetails = [];
|
|
63
|
-
let db = null;
|
|
64
|
-
|
|
65
|
-
try {
|
|
66
|
-
const mainDatabaseUrls = new URL('databaseUrls.json', window.location.href);
|
|
67
|
-
const fetchDbResponses = await fetchDataFromDatabases([mainDatabaseUrls.href]);
|
|
68
|
-
|
|
69
|
-
fetchDbDetails = fetchDbResponses.map(({url, status, data}) => ({url, status, success: !!data}));
|
|
70
|
-
|
|
71
|
-
const dataForDbs = fetchDbResponses.map(({data}) => data).filter(data => data);
|
|
72
|
-
|
|
73
|
-
db = await mergeDatabases(dataForDbs);
|
|
74
|
-
} catch (e) {
|
|
75
|
-
dispatch(createNotificationError('initStaticReport', e));
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
await plugins.loadAll(dataFromStaticFile.config);
|
|
79
|
-
|
|
80
|
-
if (!db || isEmpty(fetchDbDetails)) {
|
|
81
|
-
return dispatch({
|
|
82
|
-
type: actionNames.INIT_STATIC_REPORT,
|
|
83
|
-
payload: {...dataFromStaticFile, db, fetchDbDetails, tree: {suites: []}, stats: [], skips: [], browsers: []}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const testsTreeBuilder = StaticTestsTreeBuilder.create();
|
|
88
|
-
const suitesRows = getSuitesTableRows(db);
|
|
89
|
-
const {tree, stats, skips, browsers} = testsTreeBuilder.build(suitesRows);
|
|
90
|
-
|
|
91
|
-
dispatch({
|
|
92
|
-
type: actionNames.INIT_STATIC_REPORT,
|
|
93
|
-
payload: {...dataFromStaticFile, db, fetchDbDetails, tree, stats, skips, browsers}
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export const finGuiReport = () => ({type: actionNames.FIN_GUI_REPORT});
|
|
99
|
-
export const finStaticReport = () => ({type: actionNames.FIN_STATIC_REPORT});
|
|
100
|
-
|
|
101
|
-
const runTests = ({tests = [], action = {}} = {}) => {
|
|
102
|
-
return async (dispatch) => {
|
|
103
|
-
try {
|
|
104
|
-
dispatch(action);
|
|
105
|
-
await axios.post('/run', tests);
|
|
106
|
-
} catch (e) {
|
|
107
|
-
console.error('Error while running tests:', e);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
export const runAllTests = () => {
|
|
113
|
-
return runTests({
|
|
114
|
-
action: {
|
|
115
|
-
type: actionNames.RUN_ALL_TESTS,
|
|
116
|
-
payload: {status: QUEUED}
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export const runFailedTests = (failedTests, actionName = actionNames.RUN_FAILED_TESTS) => {
|
|
122
|
-
return runTests({tests: failedTests, action: {type: actionName}});
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export const retrySuite = (tests) => {
|
|
126
|
-
return runTests({tests, action: {type: actionNames.RETRY_SUITE}});
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export const retryTest = (test) => {
|
|
130
|
-
return runTests({tests: [test], action: {type: actionNames.RETRY_TEST}});
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export const acceptOpened = (imageIds, type = actionNames.ACCEPT_OPENED_SCREENSHOTS) => {
|
|
134
|
-
return async (dispatch) => {
|
|
135
|
-
dispatch({type: actionNames.PROCESS_BEGIN});
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
const {data} = await axios.post('/reference-data-to-update', imageIds);
|
|
139
|
-
const {data: updatedData} = await axios.post('/update-reference', data);
|
|
140
|
-
dispatch({type, payload: updatedData});
|
|
141
|
-
|
|
142
|
-
return updatedData;
|
|
143
|
-
} catch (e) {
|
|
144
|
-
console.error('Error while updating references of failed tests:', e);
|
|
145
|
-
dispatch(createNotificationError('acceptScreenshot', e));
|
|
146
|
-
|
|
147
|
-
return null;
|
|
148
|
-
} finally {
|
|
149
|
-
dispatch({type: actionNames.PROCESS_END});
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
export const acceptTest = (imageId) => {
|
|
155
|
-
return acceptOpened([imageId], actionNames.ACCEPT_SCREENSHOT);
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
export const screenshotAccepterAccept = (imageId) => {
|
|
159
|
-
return acceptOpened([imageId], actionNames.SCREENSHOT_ACCEPTER_ACCEPT);
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
export const applyDelayedTestResults = (testResults) => {
|
|
163
|
-
return {type: actionNames.APPLY_DELAYED_TEST_RESULTS, payload: testResults};
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
export const undoAcceptImages = (imageIds, {skipTreeUpdate = false} = {}) => {
|
|
167
|
-
return async (dispatch) => {
|
|
168
|
-
dispatch({type: actionNames.PROCESS_BEGIN});
|
|
169
|
-
|
|
170
|
-
try {
|
|
171
|
-
const {data} = await axios.post('/reference-data-to-update', imageIds);
|
|
172
|
-
const {data: updatedData} = await axios.post('/undo-accept-images', data);
|
|
173
|
-
const payload = {...updatedData, skipTreeUpdate};
|
|
174
|
-
|
|
175
|
-
dispatch({type: actionNames.UNDO_ACCEPT_IMAGES, payload});
|
|
176
|
-
} catch (e) {
|
|
177
|
-
console.error('Error while reverting reference:', e);
|
|
178
|
-
dispatch(createNotificationError('undoScreenshot', e));
|
|
179
|
-
} finally {
|
|
180
|
-
dispatch({type: actionNames.PROCESS_END});
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
export const undoAcceptImage = (imageId, opts) => undoAcceptImages([imageId], opts);
|
|
186
|
-
|
|
187
|
-
export const stopTests = () => async dispatch => {
|
|
188
|
-
try {
|
|
189
|
-
await axios.post('/stop');
|
|
190
|
-
dispatch({type: actionNames.STOP_TESTS});
|
|
191
|
-
} catch (e) {
|
|
192
|
-
console.error(`Error while stopping tests: {e}`);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
export const testsEnd = () => async dispatch => {
|
|
197
|
-
try {
|
|
198
|
-
const mainDatabaseUrl = getMainDatabaseUrl();
|
|
199
|
-
const db = await connectToDatabase(mainDatabaseUrl.href);
|
|
200
|
-
|
|
201
|
-
dispatch({
|
|
202
|
-
type: actionNames.TESTS_END,
|
|
203
|
-
payload: {db}
|
|
204
|
-
});
|
|
205
|
-
} catch (e) {
|
|
206
|
-
dispatch(createNotificationError('testsEnd', e));
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
export const suiteBegin = (suite) => ({type: actionNames.SUITE_BEGIN, payload: suite});
|
|
211
|
-
export const testBegin = (test) => ({type: actionNames.TEST_BEGIN, payload: test});
|
|
212
|
-
export const testResult = (result) => ({type: actionNames.TEST_RESULT, payload: result});
|
|
213
|
-
export const toggleStateResult = (result) => ({type: actionNames.TOGGLE_STATE_RESULT, payload: result});
|
|
214
|
-
export const changeTestRetry = (result) => ({type: actionNames.CHANGE_TEST_RETRY, payload: result});
|
|
215
|
-
export const toggleLoading = (payload) => ({type: actionNames.TOGGLE_LOADING, payload});
|
|
216
|
-
export const closeSections = (payload) => ({type: actionNames.CLOSE_SECTIONS, payload});
|
|
217
|
-
export const openModal = (payload) => ({type: actionNames.OPEN_MODAL, payload});
|
|
218
|
-
export const closeModal = (payload) => ({type: actionNames.CLOSE_MODAL, payload});
|
|
219
|
-
export const runFailed = () => ({type: actionNames.RUN_FAILED_TESTS});
|
|
220
|
-
export const expandAll = () => ({type: actionNames.VIEW_EXPAND_ALL});
|
|
221
|
-
export const expandErrors = () => ({type: actionNames.VIEW_EXPAND_ERRORS});
|
|
222
|
-
export const expandRetries = () => ({type: actionNames.VIEW_EXPAND_RETRIES});
|
|
223
|
-
export const collapseAll = () => ({type: actionNames.VIEW_COLLAPSE_ALL});
|
|
224
|
-
export const processBegin = () => ({type: actionNames.PROCESS_BEGIN});
|
|
225
|
-
export const processEnd = () => ({type: actionNames.PROCESS_END});
|
|
226
|
-
export const updateBaseHost = (host) => ({type: actionNames.VIEW_UPDATE_BASE_HOST, host});
|
|
227
|
-
export const copySuiteName = (payload) => ({type: actionNames.COPY_SUITE_NAME, payload});
|
|
228
|
-
export const viewInBrowser = () => ({type: actionNames.VIEW_IN_BROWSER});
|
|
229
|
-
export const copyTestLink = () => ({type: actionNames.COPY_TEST_LINK});
|
|
230
|
-
export const toggleSuiteSection = (payload) => ({type: actionNames.TOGGLE_SUITE_SECTION, payload});
|
|
231
|
-
export const toggleBrowserSection = (payload) => ({type: actionNames.TOGGLE_BROWSER_SECTION, payload});
|
|
232
|
-
export const toggleMetaInfo = () => ({type: actionNames.TOGGLE_META_INFO});
|
|
233
|
-
export const togglePageScreenshot = () => ({type: actionNames.TOGGLE_PAGE_SCREENSHOT});
|
|
234
|
-
export const updateBottomProgressBar = (payload) => ({type: actionNames.UPDATE_BOTTOM_PROGRESS_BAR, payload});
|
|
235
|
-
export const toggleTestsGroup = (payload) => ({type: actionNames.TOGGLE_TESTS_GROUP, payload});
|
|
236
|
-
export const groupTestsByKey = (payload) => ({type: actionNames.GROUP_TESTS_BY_KEY, payload});
|
|
237
|
-
export const changeViewMode = (payload) => ({type: actionNames.CHANGE_VIEW_MODE, payload});
|
|
238
|
-
|
|
239
|
-
export const runCustomGuiAction = (payload) => {
|
|
240
|
-
return async (dispatch) => {
|
|
241
|
-
try {
|
|
242
|
-
const {sectionName, groupIndex, controlIndex} = payload;
|
|
243
|
-
|
|
244
|
-
await axios.post('/run-custom-gui-action', {sectionName, groupIndex, controlIndex});
|
|
245
|
-
|
|
246
|
-
dispatch({type: actionNames.RUN_CUSTOM_GUI_ACTION, payload});
|
|
247
|
-
} catch (e) {
|
|
248
|
-
dispatch(createNotificationError('runCustomGuiAction', e));
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
export const updateTestNameFilter = (testNameFilter) => {
|
|
254
|
-
return {type: actionNames.VIEW_UPDATE_FILTER_BY_NAME, testNameFilter};
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
export const setStrictMatchFilter = (strictMatchFilter) => {
|
|
258
|
-
return {type: actionNames.VIEW_SET_STRICT_MATCH_FILTER, strictMatchFilter};
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
export function changeDiffMode(mode) {
|
|
262
|
-
switch (mode) {
|
|
263
|
-
case diffModes.ONLY_DIFF.id:
|
|
264
|
-
return {type: actionNames.VIEW_ONLY_DIFF};
|
|
265
|
-
|
|
266
|
-
case diffModes.SWITCH.id:
|
|
267
|
-
return {type: actionNames.VIEW_SWITCH_DIFF};
|
|
268
|
-
|
|
269
|
-
case diffModes.SWIPE.id:
|
|
270
|
-
return {type: actionNames.VIEW_SWIPE_DIFF};
|
|
271
|
-
|
|
272
|
-
case diffModes.ONION_SKIN.id:
|
|
273
|
-
return {type: actionNames.VIEW_ONION_SKIN_DIFF};
|
|
274
|
-
|
|
275
|
-
case diffModes.THREE_UP_SCALED.id:
|
|
276
|
-
return {type: actionNames.VIEW_THREE_UP_SCALED_DIFF};
|
|
277
|
-
|
|
278
|
-
case diffModes.THREE_UP_SCALED_TO_FIT.id:
|
|
279
|
-
return {type: actionNames.VIEW_THREE_UP_SCALED_TO_FIT_DIFF};
|
|
280
|
-
|
|
281
|
-
case diffModes.THREE_UP.id:
|
|
282
|
-
default:
|
|
283
|
-
return {type: actionNames.VIEW_THREE_UP_DIFF};
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
export const findSameDiffs = (selectedImageId, openedImageIds, browserName) => {
|
|
288
|
-
return async (dispatch) => {
|
|
289
|
-
dispatch(toggleLoading({active: true, content: 'Find same diffs...'}));
|
|
290
|
-
|
|
291
|
-
const comparedImageIds = openedImageIds.filter((id) => id.includes(browserName) && id !== selectedImageId);
|
|
292
|
-
let equalImagesIds = [];
|
|
293
|
-
|
|
294
|
-
try {
|
|
295
|
-
if (!isEmpty(comparedImageIds)) {
|
|
296
|
-
const {data} = await axios.post('/get-find-equal-diffs-data', [selectedImageId].concat(comparedImageIds));
|
|
297
|
-
|
|
298
|
-
if (!isEmpty(data)) {
|
|
299
|
-
equalImagesIds = (await axios.post('/find-equal-diffs', data)).data;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const closeImagesIds = difference(openedImageIds, [].concat(selectedImageId, equalImagesIds));
|
|
304
|
-
|
|
305
|
-
if (!isEmpty(closeImagesIds)) {
|
|
306
|
-
dispatch(closeSections(closeImagesIds));
|
|
307
|
-
}
|
|
308
|
-
} catch (e) {
|
|
309
|
-
console.error('Error while trying to find equal diffs:', e);
|
|
310
|
-
} finally {
|
|
311
|
-
dispatch(toggleLoading({active: false}));
|
|
312
|
-
dispatch(openModal({
|
|
313
|
-
id: modalTypes.FIND_SAME_DIFFS,
|
|
314
|
-
type: modalTypes.FIND_SAME_DIFFS,
|
|
315
|
-
data: {
|
|
316
|
-
browserId: browserName,
|
|
317
|
-
equalImages: equalImagesIds.length,
|
|
318
|
-
comparedImages: comparedImageIds.length
|
|
319
|
-
}
|
|
320
|
-
}));
|
|
321
|
-
}
|
|
322
|
-
};
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
export const selectBrowsers = (browsers) => {
|
|
326
|
-
setFilteredBrowsers(browsers);
|
|
327
|
-
|
|
328
|
-
return {
|
|
329
|
-
type: actionNames.BROWSERS_SELECTED,
|
|
330
|
-
payload: {browsers}
|
|
331
|
-
};
|
|
332
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import {parseQuery, decodeBrowsers} from './query-params';
|
|
4
|
-
import {pick, has} from 'lodash';
|
|
5
|
-
import viewModes from '../../constants/view-modes';
|
|
6
|
-
import {config} from '../../constants/defaults';
|
|
7
|
-
|
|
8
|
-
const allowedViewModes = new Set(Object.values(viewModes));
|
|
9
|
-
|
|
10
|
-
export function getViewQuery(queryString) {
|
|
11
|
-
const query = parseQuery(queryString, {browser: 'filteredBrowsers'});
|
|
12
|
-
|
|
13
|
-
query.filteredBrowsers = decodeBrowsers(query.filteredBrowsers);
|
|
14
|
-
|
|
15
|
-
if (has(query, 'viewMode') && !allowedViewModes.has(query.viewMode)) {
|
|
16
|
-
query.viewMode = config.defaultView;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return pick(query, [
|
|
20
|
-
'filteredBrowsers',
|
|
21
|
-
'testNameFilter',
|
|
22
|
-
'strictMatchFilter',
|
|
23
|
-
'retryIndex',
|
|
24
|
-
'viewMode',
|
|
25
|
-
'expand'
|
|
26
|
-
]);
|
|
27
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const defaults = require('../../constants/defaults');
|
|
4
|
-
const viewModes = require('../../constants/view-modes');
|
|
5
|
-
const diffModes = require('../../constants/diff-modes');
|
|
6
|
-
const {EXPAND_ERRORS} = require('../../constants/expand-modes');
|
|
7
|
-
const {RESULT_KEYS} = require('../../constants/group-tests');
|
|
8
|
-
|
|
9
|
-
export default Object.assign(defaults, {
|
|
10
|
-
gui: true,
|
|
11
|
-
running: false,
|
|
12
|
-
processing: false,
|
|
13
|
-
stopping: false,
|
|
14
|
-
autoRun: false,
|
|
15
|
-
skips: [],
|
|
16
|
-
browsers: [],
|
|
17
|
-
groupedTests: {
|
|
18
|
-
result: {
|
|
19
|
-
byKey: RESULT_KEYS.reduce((acc, v) => ({...acc, [v]: []}), {}),
|
|
20
|
-
allKeys: RESULT_KEYS
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
byKey: {},
|
|
24
|
-
allKeys: []
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
tree: {
|
|
28
|
-
suites: {
|
|
29
|
-
byId: {},
|
|
30
|
-
allIds: [],
|
|
31
|
-
allRootIds: [],
|
|
32
|
-
failedRootIds: []
|
|
33
|
-
},
|
|
34
|
-
browsers: {
|
|
35
|
-
byId: {},
|
|
36
|
-
stateById: {},
|
|
37
|
-
allIds: []
|
|
38
|
-
},
|
|
39
|
-
results: {
|
|
40
|
-
byId: {},
|
|
41
|
-
allIds: []
|
|
42
|
-
},
|
|
43
|
-
images: {
|
|
44
|
-
byId: {},
|
|
45
|
-
stateById: {},
|
|
46
|
-
allIds: []
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
closeIds: [],
|
|
50
|
-
apiValues: {
|
|
51
|
-
extraItems: {},
|
|
52
|
-
metaInfoExtenders: {}
|
|
53
|
-
},
|
|
54
|
-
loading: {},
|
|
55
|
-
modals: [],
|
|
56
|
-
stats: {
|
|
57
|
-
all: {
|
|
58
|
-
total: 0,
|
|
59
|
-
updated: 0,
|
|
60
|
-
passed: 0,
|
|
61
|
-
failed: 0,
|
|
62
|
-
skipped: 0,
|
|
63
|
-
retries: 0,
|
|
64
|
-
warned: 0
|
|
65
|
-
},
|
|
66
|
-
perBrowser: {}
|
|
67
|
-
},
|
|
68
|
-
view: {
|
|
69
|
-
viewMode: viewModes.ALL,
|
|
70
|
-
diffMode: diffModes.THREE_UP.id,
|
|
71
|
-
expand: EXPAND_ERRORS,
|
|
72
|
-
baseHost: '',
|
|
73
|
-
testNameFilter: '',
|
|
74
|
-
strictMatchFilter: false,
|
|
75
|
-
filteredBrowsers: [],
|
|
76
|
-
keyToGroupTestsBy: ''
|
|
77
|
-
},
|
|
78
|
-
db: undefined,
|
|
79
|
-
fetchDbDetails: [],
|
|
80
|
-
progressBar: {
|
|
81
|
-
currentRootSuiteId: null
|
|
82
|
-
},
|
|
83
|
-
notifications: []
|
|
84
|
-
});
|