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,314 +0,0 @@
|
|
|
1
|
-
import {findLast} from 'lodash';
|
|
2
|
-
import {produce} from 'immer';
|
|
3
|
-
import actionNames from '../../action-names';
|
|
4
|
-
import {
|
|
5
|
-
initSuitesState, changeAllSuitesState, changeSuiteState, updateSuitesStatus,
|
|
6
|
-
getFailedRootSuiteIds, updateAllSuitesStatus, calcSuitesShowness, calcSuitesOpenness, failSuites
|
|
7
|
-
} from './nodes/suites';
|
|
8
|
-
import {
|
|
9
|
-
initBrowsersState, changeAllBrowsersState, changeBrowserState,
|
|
10
|
-
calcBrowsersShowness, calcBrowsersOpenness, setBrowsersLastRetry
|
|
11
|
-
} from './nodes/browsers';
|
|
12
|
-
import {initResultsState, changeAllResultsState, changeResultState, addResult, removeResult} from './nodes/results';
|
|
13
|
-
import {
|
|
14
|
-
initImagesState, changeAllImagesState, changeImageState, addImages, calcImagesOpenness
|
|
15
|
-
} from './nodes/images';
|
|
16
|
-
import viewModes from '../../../../constants/view-modes';
|
|
17
|
-
import {EXPAND_RETRIES} from '../../../../constants/expand-modes';
|
|
18
|
-
import {FAIL} from '../../../../constants/test-statuses';
|
|
19
|
-
import {isSuccessStatus} from '../../../../common-utils';
|
|
20
|
-
|
|
21
|
-
export default produce((state, action) => {
|
|
22
|
-
switch (action.type) {
|
|
23
|
-
case actionNames.INIT_GUI_REPORT:
|
|
24
|
-
case actionNames.INIT_STATIC_REPORT: {
|
|
25
|
-
const {tree} = action.payload;
|
|
26
|
-
const {filteredBrowsers} = state.view;
|
|
27
|
-
|
|
28
|
-
state.tree = tree;
|
|
29
|
-
state.tree.suites.failedRootIds = getFailedRootSuiteIds(tree.suites);
|
|
30
|
-
|
|
31
|
-
state.tree.suites.stateById = {};
|
|
32
|
-
state.tree.browsers.stateById = {};
|
|
33
|
-
state.tree.results.stateById = {};
|
|
34
|
-
state.tree.images.stateById = {};
|
|
35
|
-
|
|
36
|
-
updateAllSuitesStatus(state.tree, filteredBrowsers);
|
|
37
|
-
initNodesStates(state);
|
|
38
|
-
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
case actionNames.RUN_ALL_TESTS: {
|
|
43
|
-
const {status} = action.payload;
|
|
44
|
-
const {tree} = state;
|
|
45
|
-
|
|
46
|
-
tree.suites.allIds.forEach((suiteId) => {
|
|
47
|
-
tree.suites.byId[suiteId].status = status;
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
case actionNames.TEST_BEGIN: {
|
|
54
|
-
[].concat(action.payload).forEach(({result, suites}) => {
|
|
55
|
-
addResult(state.tree, result);
|
|
56
|
-
setBrowsersLastRetry(state.tree, result.parentId);
|
|
57
|
-
updateSuitesStatus(state.tree, suites);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
case actionNames.TEST_RESULT:
|
|
64
|
-
case actionNames.ACCEPT_OPENED_SCREENSHOTS:
|
|
65
|
-
case actionNames.ACCEPT_SCREENSHOT:
|
|
66
|
-
case actionNames.APPLY_DELAYED_TEST_RESULTS: {
|
|
67
|
-
addNodesToTree(state, action.payload);
|
|
68
|
-
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
case actionNames.TOGGLE_SUITE_SECTION: {
|
|
73
|
-
const {suiteId, shouldBeOpened} = action.payload;
|
|
74
|
-
|
|
75
|
-
changeSuiteState(state.tree, suiteId, {shouldBeOpened});
|
|
76
|
-
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
case actionNames.TOGGLE_BROWSER_SECTION: {
|
|
81
|
-
const {browserId, shouldBeOpened} = action.payload;
|
|
82
|
-
|
|
83
|
-
changeBrowserState(state.tree, browserId, {shouldBeOpened});
|
|
84
|
-
|
|
85
|
-
break;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
case actionNames.TOGGLE_STATE_RESULT: {
|
|
89
|
-
const {imageId, shouldBeOpened} = action.payload;
|
|
90
|
-
|
|
91
|
-
changeImageState(state.tree, imageId, {shouldBeOpened});
|
|
92
|
-
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
case actionNames.CHANGE_TEST_RETRY: {
|
|
97
|
-
const {browserId, retryIndex} = action.payload;
|
|
98
|
-
const browserState = {retryIndex};
|
|
99
|
-
|
|
100
|
-
if (state.view.keyToGroupTestsBy) {
|
|
101
|
-
browserState.lastMatchedRetryIndex = null;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
changeBrowserState(state.tree, browserId, browserState);
|
|
105
|
-
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
case actionNames.BROWSERS_SELECTED: {
|
|
110
|
-
const {tree, view} = state;
|
|
111
|
-
|
|
112
|
-
updateAllSuitesStatus(tree, view.filteredBrowsers);
|
|
113
|
-
calcBrowsersShowness(tree, view);
|
|
114
|
-
calcSuitesShowness(tree);
|
|
115
|
-
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
case actionNames.CHANGE_VIEW_MODE:
|
|
120
|
-
case actionNames.VIEW_UPDATE_FILTER_BY_NAME:
|
|
121
|
-
case actionNames.VIEW_SET_STRICT_MATCH_FILTER: {
|
|
122
|
-
const {tree, view} = state;
|
|
123
|
-
|
|
124
|
-
calcBrowsersShowness(tree, view);
|
|
125
|
-
calcSuitesShowness(tree);
|
|
126
|
-
|
|
127
|
-
break;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
case actionNames.VIEW_EXPAND_ALL: {
|
|
131
|
-
changeAllNodesState(state.tree, {shouldBeOpened: true});
|
|
132
|
-
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
case actionNames.VIEW_COLLAPSE_ALL: {
|
|
137
|
-
changeAllNodesState(state.tree, {shouldBeOpened: false});
|
|
138
|
-
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
case actionNames.VIEW_EXPAND_ERRORS:
|
|
143
|
-
case actionNames.VIEW_EXPAND_RETRIES: {
|
|
144
|
-
const {tree, view} = state;
|
|
145
|
-
|
|
146
|
-
calcSuitesOpenness(tree, view.expand);
|
|
147
|
-
calcBrowsersOpenness(tree, view.expand);
|
|
148
|
-
calcImagesOpenness(tree, view.expand);
|
|
149
|
-
|
|
150
|
-
break;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
case actionNames.CLOSE_SECTIONS: {
|
|
154
|
-
const closeImageIds = action.payload;
|
|
155
|
-
|
|
156
|
-
closeImageIds.forEach((imageId) => {
|
|
157
|
-
changeImageState(state.tree, imageId, {shouldBeOpened: false});
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
case actionNames.TOGGLE_TESTS_GROUP: {
|
|
164
|
-
const {browserIds, resultIds, isActive} = action.payload;
|
|
165
|
-
const {tree, view} = state;
|
|
166
|
-
|
|
167
|
-
if (!isActive) {
|
|
168
|
-
changeAllBrowsersState(tree, {shouldBeShown: false, lastMatchedRetryIndex: null});
|
|
169
|
-
changeAllSuitesState(tree, {shouldBeShown: false});
|
|
170
|
-
changeAllResultsState(tree, {matchedSelectedGroup: false});
|
|
171
|
-
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
calcBrowsersShowness(tree, view, browserIds);
|
|
176
|
-
|
|
177
|
-
tree.browsers.allIds.forEach((browserId) => {
|
|
178
|
-
const {shouldBeShown} = tree.browsers.stateById[browserId];
|
|
179
|
-
|
|
180
|
-
if (!shouldBeShown) {
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (!browserIds.includes(browserId)) {
|
|
185
|
-
return changeBrowserState(tree, browserId, {shouldBeShown: false});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
const broResultIds = tree.browsers.byId[browserId].resultIds;
|
|
189
|
-
let lastMatchedRetryIndex = broResultIds.length - 1;
|
|
190
|
-
|
|
191
|
-
broResultIds.forEach((resultId, ind) => {
|
|
192
|
-
if (!resultIds.includes(resultId)) {
|
|
193
|
-
changeResultState(tree, resultId, {matchedSelectedGroup: false});
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
lastMatchedRetryIndex = ind;
|
|
198
|
-
changeResultState(tree, resultId, {matchedSelectedGroup: true});
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
changeBrowserState(tree, browserId, {lastMatchedRetryIndex});
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
calcSuitesShowness(tree);
|
|
205
|
-
|
|
206
|
-
break;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
case actionNames.GROUP_TESTS_BY_KEY: {
|
|
210
|
-
const {tree, view} = state;
|
|
211
|
-
|
|
212
|
-
changeAllResultsState(tree, {matchedSelectedGroup: false});
|
|
213
|
-
|
|
214
|
-
if (view.keyToGroupTestsBy) {
|
|
215
|
-
changeAllBrowsersState(tree, {shouldBeShown: false, lastMatchedRetryIndex: null});
|
|
216
|
-
changeAllSuitesState(tree, {shouldBeShown: false});
|
|
217
|
-
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
calcBrowsersShowness(tree, view);
|
|
222
|
-
calcSuitesShowness(tree);
|
|
223
|
-
changeAllBrowsersState(tree, {lastMatchedRetryIndex: null});
|
|
224
|
-
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
case actionNames.UNDO_ACCEPT_IMAGES: {
|
|
229
|
-
const {tree, view} = state;
|
|
230
|
-
const {updatedImages = [], removedResults = [], skipTreeUpdate} = action.payload;
|
|
231
|
-
|
|
232
|
-
if (skipTreeUpdate) {
|
|
233
|
-
return;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const failedRemovedResults = removedResults.filter(resultId => {
|
|
237
|
-
const result = tree.results.byId[resultId];
|
|
238
|
-
const browser = tree.browsers.byId[result.parentId];
|
|
239
|
-
const lastResultId = findLast(browser.resultIds, id => id !== resultId);
|
|
240
|
-
const lastResult = tree.results.byId[lastResultId];
|
|
241
|
-
|
|
242
|
-
return !isSuccessStatus(lastResult.status);
|
|
243
|
-
});
|
|
244
|
-
const failedResultIds = updatedImages.map(({parentId: resultId}) => resultId).concat(failedRemovedResults);
|
|
245
|
-
const suiteIdsToFail = failedResultIds.map(resultId => {
|
|
246
|
-
const result = tree.results.byId[resultId];
|
|
247
|
-
const browser = tree.browsers.byId[result.parentId];
|
|
248
|
-
const suite = tree.suites.byId[browser.parentId];
|
|
249
|
-
|
|
250
|
-
return suite.id;
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
for (const updatedImage of updatedImages) {
|
|
254
|
-
tree.images.byId[updatedImage.id] = updatedImage;
|
|
255
|
-
tree.images.stateById[updatedImage.id].shouldBeOpened = true;
|
|
256
|
-
|
|
257
|
-
tree.results.byId[updatedImage.parentId].status = FAIL;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
for (const removedResultId of removedResults) {
|
|
261
|
-
removeResult(tree, removedResultId);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
failSuites(tree, suiteIdsToFail);
|
|
265
|
-
|
|
266
|
-
calcBrowsersShowness(tree, view);
|
|
267
|
-
calcSuitesShowness(tree);
|
|
268
|
-
|
|
269
|
-
break;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
function initNodesStates(state) {
|
|
275
|
-
const {tree, view} = state;
|
|
276
|
-
|
|
277
|
-
initBrowsersState(tree, view);
|
|
278
|
-
initSuitesState(tree, view);
|
|
279
|
-
initImagesState(tree, view.expand);
|
|
280
|
-
initResultsState(tree);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
function addNodesToTree(state, payload) {
|
|
284
|
-
const {tree, view} = state;
|
|
285
|
-
|
|
286
|
-
[].concat(payload).forEach(({result, images, suites}) => {
|
|
287
|
-
addResult(tree, result);
|
|
288
|
-
setBrowsersLastRetry(tree, result.parentId);
|
|
289
|
-
addImages(tree, images, view.expand);
|
|
290
|
-
updateSuitesStatus(tree, suites);
|
|
291
|
-
|
|
292
|
-
const browserId = result.parentId;
|
|
293
|
-
const youngestSuiteId = tree.browsers.byId[browserId].parentId;
|
|
294
|
-
const suiteIds = view.expand === EXPAND_RETRIES ? youngestSuiteId : suites.map(({id}) => id);
|
|
295
|
-
const imageIds = images.map(({id}) => id);
|
|
296
|
-
|
|
297
|
-
calcSuitesOpenness(tree, view.expand, suiteIds);
|
|
298
|
-
calcBrowsersOpenness(tree, view.expand, browserId);
|
|
299
|
-
calcImagesOpenness(tree, view.expand, imageIds);
|
|
300
|
-
|
|
301
|
-
if (view.viewMode === viewModes.FAILED) {
|
|
302
|
-
calcBrowsersShowness(tree, view, browserId);
|
|
303
|
-
calcSuitesShowness(tree, youngestSuiteId);
|
|
304
|
-
}
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
tree.suites.failedRootIds = getFailedRootSuiteIds(tree.suites);
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
function changeAllNodesState(tree, state) {
|
|
311
|
-
changeAllSuitesState(tree, state);
|
|
312
|
-
changeAllBrowsersState(tree, state);
|
|
313
|
-
changeAllImagesState(tree, state);
|
|
314
|
-
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import {isEmpty, last, initial} from 'lodash';
|
|
2
|
-
import {isBrowserMatchViewMode, isTestNameMatchFilters, shouldShowBrowser} from '../../../utils';
|
|
3
|
-
import {isNodeFailed} from '../../../utils';
|
|
4
|
-
import {changeNodeState, shouldNodeBeOpened} from '../helpers';
|
|
5
|
-
|
|
6
|
-
export function initBrowsersState(tree, view) {
|
|
7
|
-
tree.browsers.allIds.forEach((browserId) => {
|
|
8
|
-
setBrowsersLastRetry(tree, browserId);
|
|
9
|
-
|
|
10
|
-
if (view.keyToGroupTestsBy) {
|
|
11
|
-
changeBrowserState(tree, browserId, {shouldBeShown: false});
|
|
12
|
-
} else {
|
|
13
|
-
calcBrowsersShowness(tree, view, browserId);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
calcBrowsersOpenness(tree, view.expand, browserId);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function changeAllBrowsersState(tree, state) {
|
|
21
|
-
tree.browsers.allIds.forEach((browserId) => {
|
|
22
|
-
changeBrowserState(tree, browserId, state);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function changeBrowserState(tree, browserId, state) {
|
|
27
|
-
changeNodeState(tree.browsers.stateById, browserId, state);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function setBrowsersLastRetry(tree, browserIds) {
|
|
31
|
-
if (isEmpty(browserIds)) {
|
|
32
|
-
browserIds = tree.browsers.allIds;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
[].concat(browserIds).forEach((browserId) => {
|
|
36
|
-
const retryIndex = getLastRetryIndex(tree, browserId);
|
|
37
|
-
changeBrowserState(tree, browserId, {retryIndex});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function calcBrowsersShowness(tree, view, browserIds) {
|
|
42
|
-
if (isEmpty(browserIds)) {
|
|
43
|
-
browserIds = tree.browsers.allIds;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
[].concat(browserIds).forEach((browserId) => {
|
|
47
|
-
const browser = tree.browsers.byId[browserId];
|
|
48
|
-
const lastResult = tree.results.byId[last(browser.resultIds)];
|
|
49
|
-
const shouldBeShown = calcBrowserShowness(browser, lastResult, view);
|
|
50
|
-
|
|
51
|
-
changeBrowserState(tree, browserId, {shouldBeShown});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export function calcBrowsersOpenness(tree, expand, browserIds) {
|
|
56
|
-
if (isEmpty(browserIds)) {
|
|
57
|
-
browserIds = tree.browsers.allIds;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
[].concat(browserIds).forEach((browserId) => {
|
|
61
|
-
const browser = tree.browsers.byId[browserId];
|
|
62
|
-
const lastResult = tree.results.byId[last(browser.resultIds)];
|
|
63
|
-
const shouldBeOpened = calcBrowserOpenness(browser, lastResult, expand, tree);
|
|
64
|
-
|
|
65
|
-
changeBrowserState(tree, browserId, {shouldBeOpened});
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function removeResultFromBrowsers(tree, resultId) {
|
|
70
|
-
const result = tree.results.byId[resultId];
|
|
71
|
-
const browser = tree.browsers.byId[result.parentId];
|
|
72
|
-
|
|
73
|
-
const {retryIndex} = tree.browsers.stateById[browser.id];
|
|
74
|
-
|
|
75
|
-
browser.resultIds = browser.resultIds.filter(id => id !== resultId);
|
|
76
|
-
|
|
77
|
-
tree.browsers.stateById[browser.id].retryIndex = Math.min(retryIndex, browser.resultIds.length - 1);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function getLastRetryIndex(tree, browserId) {
|
|
81
|
-
return tree.browsers.byId[browserId].resultIds.length - 1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function calcBrowserOpenness(browser, lastResult, expand, tree) {
|
|
85
|
-
const errorsCb = () => isNodeFailed(lastResult);
|
|
86
|
-
const retriesCb = () => {
|
|
87
|
-
const retries = [].concat(initial(browser.resultIds)).map((resultId) => tree.results.byId[resultId]);
|
|
88
|
-
|
|
89
|
-
return retries.some((retry) => isNodeFailed(retry));
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
return shouldNodeBeOpened(expand, {errorsCb, retriesCb});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
function calcBrowserShowness(browser, lastResult, view) {
|
|
96
|
-
const {viewMode, filteredBrowsers, testNameFilter, strictMatchFilter} = view;
|
|
97
|
-
|
|
98
|
-
if (!isBrowserMatchViewMode(browser, lastResult, viewMode)) {
|
|
99
|
-
return false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const testName = browser.parentId;
|
|
103
|
-
|
|
104
|
-
if (!isTestNameMatchFilters(testName, testNameFilter, strictMatchFilter)) {
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return shouldShowBrowser(browser, filteredBrowsers);
|
|
109
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
import {isNodeFailed} from '../../../utils';
|
|
3
|
-
import {changeNodeState, shouldNodeBeOpened} from '../helpers';
|
|
4
|
-
|
|
5
|
-
export function initImagesState(tree, expand) {
|
|
6
|
-
calcImagesOpenness(tree, expand);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function calcImagesOpenness(tree, expand, imageIds) {
|
|
10
|
-
if (_.isEmpty(imageIds)) {
|
|
11
|
-
imageIds = tree.images.allIds;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
[].concat(imageIds).forEach((imageId) => {
|
|
15
|
-
const image = tree.images.byId[imageId];
|
|
16
|
-
const shouldBeOpened = calcImageOpenness(image, expand);
|
|
17
|
-
|
|
18
|
-
changeImageState(tree, imageId, {shouldBeOpened});
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function changeAllImagesState(tree, state) {
|
|
23
|
-
tree.images.allIds.forEach((imageId) => {
|
|
24
|
-
changeImageState(tree, imageId, state);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function changeImageState(tree, imageId, state) {
|
|
29
|
-
changeNodeState(tree.images.stateById, imageId, state);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function addImages(tree, images, expand) {
|
|
33
|
-
images.forEach((image) => {
|
|
34
|
-
tree.images.byId[image.id] = image;
|
|
35
|
-
|
|
36
|
-
if (!tree.images.allIds.includes(image.id)) {
|
|
37
|
-
tree.images.allIds.push(image.id);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const shouldBeOpened = calcImageOpenness(image, expand);
|
|
41
|
-
changeImageState(tree, image.id, {shouldBeOpened});
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function removeImages(tree, imageIds) {
|
|
46
|
-
tree.images.allIds = tree.images.allIds.filter(id => !imageIds.includes(id));
|
|
47
|
-
|
|
48
|
-
imageIds.forEach(imageId => {
|
|
49
|
-
delete tree.images.byId[imageId];
|
|
50
|
-
delete tree.images.stateById[imageId];
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function calcImageOpenness(image, expand) {
|
|
55
|
-
const errorsCb = () => isNodeFailed(image);
|
|
56
|
-
const retriesCb = errorsCb;
|
|
57
|
-
|
|
58
|
-
return shouldNodeBeOpened(expand, {errorsCb, retriesCb});
|
|
59
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {changeNodeState} from '../helpers';
|
|
2
|
-
import {removeResultFromBrowsers} from './browsers';
|
|
3
|
-
import {removeImages} from './images';
|
|
4
|
-
|
|
5
|
-
export function initResultsState(tree) {
|
|
6
|
-
changeAllResultsState(tree, {matchedSelectedGroup: false});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export function changeAllResultsState(tree, state) {
|
|
10
|
-
tree.results.allIds.forEach((resultId) => {
|
|
11
|
-
changeResultState(tree, resultId, state);
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function changeResultState(tree, resultId, state) {
|
|
16
|
-
changeNodeState(tree.results.stateById, resultId, state);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function addResult(tree, result) {
|
|
20
|
-
tree.results.byId[result.id] = result;
|
|
21
|
-
const browserId = result.parentId;
|
|
22
|
-
|
|
23
|
-
if (!tree.browsers.byId[browserId].resultIds.includes(result.id)) {
|
|
24
|
-
tree.results.allIds.push(result.id);
|
|
25
|
-
tree.browsers.byId[browserId].resultIds.push(result.id);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function removeResult(tree, resultId) {
|
|
30
|
-
const result = tree.results.byId[resultId];
|
|
31
|
-
|
|
32
|
-
removeImages(tree, result.imageIds);
|
|
33
|
-
removeResultFromBrowsers(tree, resultId);
|
|
34
|
-
|
|
35
|
-
tree.results.allIds = tree.results.allIds.filter(id => id !== resultId);
|
|
36
|
-
|
|
37
|
-
delete tree.results.byId[resultId];
|
|
38
|
-
delete tree.results.stateById[resultId];
|
|
39
|
-
}
|