html-reporter 9.10.0 → 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/{lib → build/lib}/constants/checked-statuses.js +1 -1
- 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.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/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/CHANGELOG.md +0 -2896
- 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 -123
- 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/bullet.js +0 -30
- 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 -34
- 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 -46
- 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/index.js +0 -129
- package/lib/static/components/controls/run-button/index.styl +0 -49
- 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/show-checkboxes-input.js +0 -24
- 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 -66
- 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 -89
- package/lib/static/components/popup/index.styl +0 -43
- 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 -39
- package/lib/static/components/section/title/browser.js +0 -81
- package/lib/static/components/section/title/simple.js +0 -86
- 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 -177
- package/lib/static/gui.js +0 -14
- 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/useLocalStorage.js +0 -39
- package/lib/static/hooks/useWindowSize.js +0 -25
- package/lib/static/index.js +0 -14
- package/lib/static/modules/action-names.js +0 -60
- package/lib/static/modules/actions.js +0 -335
- 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 -44
- package/lib/static/modules/reducers/tree/index.js +0 -369
- package/lib/static/modules/reducers/tree/nodes/browsers.js +0 -116
- 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 -271
- 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 -269
- 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 -937
- 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/gui.min.css +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
- /package/{lib → build/lib}/static/report.min.css +0 -0
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import React, {Component, Fragment} from 'react';
|
|
2
|
-
import ReactDOM from 'react-dom';
|
|
3
|
-
import {connect} from 'react-redux';
|
|
4
|
-
import {bindActionCreators} from 'redux';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import {isEmpty, isNumber, size, get, findIndex, last} from 'lodash';
|
|
7
|
-
|
|
8
|
-
import * as actions from '../../../modules/actions';
|
|
9
|
-
import ScreenshotAccepterHeader from './header';
|
|
10
|
-
import ScreenshotAccepterMeta from './meta';
|
|
11
|
-
import ScreenshotAccepterBody from './body';
|
|
12
|
-
import {getAcceptableImagesByStateName} from '../../../modules/selectors/tree';
|
|
13
|
-
import {preloadImage} from '../../../modules/utils';
|
|
14
|
-
|
|
15
|
-
import './style.css';
|
|
16
|
-
|
|
17
|
-
const PRELOAD_IMAGE_COUNT = 3;
|
|
18
|
-
|
|
19
|
-
class ScreenshotAccepter extends Component {
|
|
20
|
-
static propTypes = {
|
|
21
|
-
image: PropTypes.shape({
|
|
22
|
-
id: PropTypes.string.isRequired,
|
|
23
|
-
parentId: PropTypes.string.isRequired,
|
|
24
|
-
stateName: PropTypes.string.isRequired
|
|
25
|
-
}).isRequired,
|
|
26
|
-
// from ModalContainer
|
|
27
|
-
onClose: PropTypes.func.isRequired,
|
|
28
|
-
// store
|
|
29
|
-
imagesByStateName: PropTypes.object.isRequired,
|
|
30
|
-
stateNameImageIds: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
31
|
-
activeImageIndex: PropTypes.number.isRequired
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
constructor(props) {
|
|
35
|
-
super(props);
|
|
36
|
-
|
|
37
|
-
const {image, activeImageIndex, stateNameImageIds, imagesByStateName} = this.props;
|
|
38
|
-
const images = this._getActiveImages(activeImageIndex, stateNameImageIds);
|
|
39
|
-
const retryIndex = findIndex(images, {id: image.id});
|
|
40
|
-
|
|
41
|
-
this.acceptedImages = [];
|
|
42
|
-
this.delayedTestResults = [];
|
|
43
|
-
this.state = {
|
|
44
|
-
stateNameImageIds,
|
|
45
|
-
activeImageIndex,
|
|
46
|
-
retryIndex,
|
|
47
|
-
showMeta: false
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
this.totalImagesCount = size(imagesByStateName);
|
|
51
|
-
|
|
52
|
-
for (let i = 1; i <= PRELOAD_IMAGE_COUNT; i++) {
|
|
53
|
-
this._preloadAdjacentImages(i);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
componentDidUpdate() {
|
|
58
|
-
ReactDOM.findDOMNode(this).parentNode.scrollTo(0, 0);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
onRetryChange = (retryIndex) => {
|
|
62
|
-
this.setState({retryIndex});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
onActiveImageChange = (activeImageIndex) => {
|
|
66
|
-
const images = this._getActiveImages(activeImageIndex);
|
|
67
|
-
|
|
68
|
-
this.setState({retryIndex: images.length - 1, activeImageIndex});
|
|
69
|
-
this._preloadAdjacentImages();
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
onScreenshotAccept = async (imageId) => {
|
|
73
|
-
const currentImages = this._getActiveImages();
|
|
74
|
-
const {stateName} = currentImages[0];
|
|
75
|
-
const updatedData = await this.props.actions.screenshotAccepterAccept(imageId);
|
|
76
|
-
|
|
77
|
-
if (updatedData === null) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
this.delayedTestResults = this.delayedTestResults.concat(updatedData);
|
|
82
|
-
|
|
83
|
-
const updatedImagesData = get(updatedData, '[0].images', []);
|
|
84
|
-
const {id: updatedImageId} = updatedImagesData.find(img => img.stateName === stateName) || {};
|
|
85
|
-
const acceptedStateNameImageIdIndex = this.state.stateNameImageIds.findIndex((stateNameImageId) => {
|
|
86
|
-
const currImages = this.props.imagesByStateName[stateNameImageId];
|
|
87
|
-
|
|
88
|
-
return currImages.some(img => img.id === imageId);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
this.acceptedImages.push({
|
|
92
|
-
stateNameImageId: this.state.stateNameImageIds[acceptedStateNameImageIdIndex],
|
|
93
|
-
ind: acceptedStateNameImageIdIndex,
|
|
94
|
-
imageId: updatedImageId
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
const stateNameIds = this.state.stateNameImageIds.filter((_, ind) => ind !== acceptedStateNameImageIdIndex);
|
|
98
|
-
|
|
99
|
-
if (isEmpty(stateNameIds)) {
|
|
100
|
-
return this.setState({
|
|
101
|
-
activeImageIndex: null,
|
|
102
|
-
stateNameImageIds: stateNameIds,
|
|
103
|
-
retryIndex: null
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const activeImageIndex = Math.min(this.state.activeImageIndex, stateNameIds.length - 1);
|
|
108
|
-
const newImages = this._getActiveImages(activeImageIndex, stateNameIds);
|
|
109
|
-
|
|
110
|
-
this.setState({
|
|
111
|
-
activeImageIndex,
|
|
112
|
-
stateNameImageIds: stateNameIds,
|
|
113
|
-
retryIndex: newImages.length - 1
|
|
114
|
-
});
|
|
115
|
-
this._preloadAdjacentImages();
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
onScreenshotUndo = async () => {
|
|
119
|
-
if (isEmpty(this.acceptedImages)) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const {stateNameImageIds} = this.state;
|
|
124
|
-
const {stateNameImageId, ind, imageId} = this.acceptedImages.pop();
|
|
125
|
-
|
|
126
|
-
const previousStateNameImageId = [
|
|
127
|
-
...stateNameImageIds.slice(0, ind),
|
|
128
|
-
stateNameImageId,
|
|
129
|
-
...stateNameImageIds.slice(ind)
|
|
130
|
-
];
|
|
131
|
-
const images = this._getActiveImages(ind, previousStateNameImageId);
|
|
132
|
-
|
|
133
|
-
await this.props.actions.undoAcceptImage(imageId, {skipTreeUpdate: true});
|
|
134
|
-
|
|
135
|
-
this.delayedTestResults.pop();
|
|
136
|
-
|
|
137
|
-
this.setState({
|
|
138
|
-
activeImageIndex: ind,
|
|
139
|
-
stateNameImageIds: previousStateNameImageId,
|
|
140
|
-
retryIndex: images.length - 1
|
|
141
|
-
});
|
|
142
|
-
this._preloadAdjacentImages();
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
onShowMeta = () => {
|
|
146
|
-
this.setState({showMeta: !this.state.showMeta});
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
onClose = () => {
|
|
150
|
-
if (!isEmpty(this.delayedTestResults)) {
|
|
151
|
-
this.props.actions.applyDelayedTestResults(this.delayedTestResults);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
this.props.onClose();
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
_getActiveImages(
|
|
158
|
-
activeImageIndex = this.state.activeImageIndex,
|
|
159
|
-
stateNameImageIds = this.state.stateNameImageIds
|
|
160
|
-
) {
|
|
161
|
-
return isNumber(activeImageIndex)
|
|
162
|
-
? this.props.imagesByStateName[stateNameImageIds[activeImageIndex]]
|
|
163
|
-
: [];
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
_preloadAdjacentImages(offset = PRELOAD_IMAGE_COUNT) {
|
|
167
|
-
const screensCount = size(this.state.stateNameImageIds);
|
|
168
|
-
const previosImagesIndex = (screensCount + this.state.activeImageIndex - offset) % screensCount;
|
|
169
|
-
const nextImagesIndex = (this.state.activeImageIndex + offset) % screensCount;
|
|
170
|
-
|
|
171
|
-
[previosImagesIndex, nextImagesIndex].filter(ind => ind >= 0).forEach(preloadingImagesIndex => {
|
|
172
|
-
const stateNameImageId = this.state.stateNameImageIds[preloadingImagesIndex];
|
|
173
|
-
const {expectedImg, actualImg, diffImg} = last(this.props.imagesByStateName[stateNameImageId]);
|
|
174
|
-
|
|
175
|
-
[expectedImg, actualImg, diffImg].filter(Boolean).forEach(({path}) => preloadImage(path));
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
render() {
|
|
180
|
-
const {retryIndex, stateNameImageIds, activeImageIndex, showMeta} = this.state;
|
|
181
|
-
const images = this._getActiveImages();
|
|
182
|
-
const currImage = isNumber(retryIndex) ? images[retryIndex] : null;
|
|
183
|
-
const acceptedImagesCount = this.totalImagesCount - stateNameImageIds.length;
|
|
184
|
-
|
|
185
|
-
return (
|
|
186
|
-
<Fragment>
|
|
187
|
-
<ScreenshotAccepterHeader
|
|
188
|
-
images={images}
|
|
189
|
-
stateNameImageIds={stateNameImageIds}
|
|
190
|
-
retryIndex={retryIndex}
|
|
191
|
-
activeImageIndex={activeImageIndex}
|
|
192
|
-
showMeta={showMeta}
|
|
193
|
-
onClose={this.onClose}
|
|
194
|
-
totalImages={this.totalImagesCount}
|
|
195
|
-
acceptedImages={acceptedImagesCount}
|
|
196
|
-
onRetryChange={this.onRetryChange}
|
|
197
|
-
onActiveImageChange={this.onActiveImageChange}
|
|
198
|
-
onScreenshotAccept={this.onScreenshotAccept}
|
|
199
|
-
onScreenshotUndo={this.onScreenshotUndo}
|
|
200
|
-
onShowMeta={this.onShowMeta}
|
|
201
|
-
/>
|
|
202
|
-
<ScreenshotAccepterMeta
|
|
203
|
-
showMeta={showMeta}
|
|
204
|
-
image={currImage}
|
|
205
|
-
/>
|
|
206
|
-
<ScreenshotAccepterBody image={currImage} />
|
|
207
|
-
</Fragment>
|
|
208
|
-
);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export default connect(
|
|
213
|
-
(state, {image}) => {
|
|
214
|
-
const imagesByStateName = getAcceptableImagesByStateName(state);
|
|
215
|
-
const stateNameImageIds = Object.keys(imagesByStateName);
|
|
216
|
-
const result = state.tree.results.byId[image.parentId];
|
|
217
|
-
const browserId = result.parentId;
|
|
218
|
-
const stateNameImageId = `${browserId} ${image.stateName}`;
|
|
219
|
-
const activeImageIndex = stateNameImageIds.indexOf(stateNameImageId);
|
|
220
|
-
|
|
221
|
-
return {
|
|
222
|
-
imagesByStateName,
|
|
223
|
-
stateNameImageIds,
|
|
224
|
-
activeImageIndex
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
228
|
-
)(ScreenshotAccepter);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, {Component, Fragment} from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import MetaInfoContent from '../../section/body/meta-info/content';
|
|
5
|
-
|
|
6
|
-
export default class ScreenshotAccepterMeta extends Component {
|
|
7
|
-
static propTypes = {
|
|
8
|
-
showMeta: PropTypes.bool.isRequired,
|
|
9
|
-
image: PropTypes.shape({
|
|
10
|
-
parentId: PropTypes.string
|
|
11
|
-
})
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
render() {
|
|
15
|
-
const {showMeta, image} = this.props;
|
|
16
|
-
|
|
17
|
-
if (!showMeta || !image) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Fragment>
|
|
23
|
-
<div className="screenshot-accepter__meta container">
|
|
24
|
-
<MetaInfoContent
|
|
25
|
-
resultId={image.parentId}
|
|
26
|
-
/>
|
|
27
|
-
</div>
|
|
28
|
-
<hr className='tab__separator' />
|
|
29
|
-
</Fragment>
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
.screenshot-accepter {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
background-color: #F0F2F5;
|
|
10
|
-
z-index: 1300;
|
|
11
|
-
overflow-y: auto;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.screenshot-accepter__header {
|
|
15
|
-
background-color: #fff;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.screenshot-accepter__controls.state-controls .progress-bar {
|
|
19
|
-
margin-left: auto;
|
|
20
|
-
margin-bottom: 20px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.screenshot-accepter__controls.state-controls .progress-bar::after {
|
|
24
|
-
content: "Accepted: " attr(data-content);
|
|
25
|
-
font-size: 13px;
|
|
26
|
-
line-height: 18px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.state-controls.screenshot-accepter__controls {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-wrap: wrap;
|
|
32
|
-
margin-top: 20px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.screenshot-accepter__controls .button,
|
|
36
|
-
.screenshot-accepter__controls .tab-switcher {
|
|
37
|
-
margin-right: 20px;
|
|
38
|
-
margin-bottom: 20px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.button.screenshot-accepter__arrows-open-btn,
|
|
42
|
-
.button.screenshot-accepter__arrows-close-btn {
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.button.screenshot-accepter__arrows-open-btn .arrows-open,
|
|
48
|
-
.button.screenshot-accepter__arrows-close-btn .arrows-close {
|
|
49
|
-
margin-right: 5px;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.button.screenshot-accepter__arrow-up-btn,
|
|
53
|
-
.button.screenshot-accepter__arrow-down-btn {
|
|
54
|
-
padding-left: 7px;
|
|
55
|
-
padding-right: 7px;
|
|
56
|
-
border-radius: 2px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.button.screenshot-accepter__arrow-up-btn {
|
|
60
|
-
margin-right: 5px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.button.screenshot-accepter__arrow-down-btn,
|
|
64
|
-
.button.screenshot-accepter__accept-btn {
|
|
65
|
-
margin-right: 20px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.button.screenshot-accepter__arrow-down-btn .arrow-icon {
|
|
69
|
-
transform: rotate(180deg);
|
|
70
|
-
transform-origin: center;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.button:disabled .arrows-open__icon,
|
|
74
|
-
.button:disabled .arrows-close__icon {
|
|
75
|
-
fill: rgba(16, 16, 16, .3);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.button:disabled .arrow-icon {
|
|
79
|
-
stroke: rgba(16, 16, 16, .3);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.screenshot-accepter__title {
|
|
83
|
-
font-size: 16px;
|
|
84
|
-
line-height: 20px;
|
|
85
|
-
margin-top: 20px;
|
|
86
|
-
margin-bottom: 20px;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.screenshot-accepter__test-name {
|
|
90
|
-
font-weight: bold;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.screenshot-accepter__title-divider {
|
|
94
|
-
margin-left: 5px;
|
|
95
|
-
margin-right: 5px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.screenshot-accepter__completion-info {
|
|
99
|
-
margin-top: 20px;
|
|
100
|
-
text-align: center;
|
|
101
|
-
font-size: 20px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.screenshot-accepter__body {
|
|
105
|
-
margin-bottom: 30px;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.screenshot-accepter__body .screenshot-accepter__icon_view-in-browser {
|
|
109
|
-
background: inherit;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.screenshot-accepter__meta {
|
|
113
|
-
margin-top: 20px;
|
|
114
|
-
margin-bottom: 10px;
|
|
115
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React, {useRef, useState, useEffect} from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
|
|
4
|
-
import useElementSize from '../../hooks/useElementSize';
|
|
5
|
-
import useWindowSize from '../../hooks/useWindowSize';
|
|
6
|
-
|
|
7
|
-
import './index.styl';
|
|
8
|
-
|
|
9
|
-
const OVERFLOW_BORDER = 20;
|
|
10
|
-
|
|
11
|
-
const Popup = (props) => {
|
|
12
|
-
const {action, target, hideOnClick, children, ...rest} = props;
|
|
13
|
-
|
|
14
|
-
const isClickHandled = useRef(false);
|
|
15
|
-
const [show, setShow] = useState(false);
|
|
16
|
-
const {width: windowWidth} = useWindowSize();
|
|
17
|
-
const [targetRef, targetPos] = useElementSize();
|
|
18
|
-
const [popupRef, popupPos] = useElementSize();
|
|
19
|
-
|
|
20
|
-
const handleClick = (newState, {isLast} = {}) => {
|
|
21
|
-
if (!isClickHandled.current) {
|
|
22
|
-
isClickHandled.current = true;
|
|
23
|
-
setShow(newState);
|
|
24
|
-
}
|
|
25
|
-
if (isLast) {
|
|
26
|
-
isClickHandled.current = false;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const xOffset = targetPos.left + targetPos.width / 2;
|
|
31
|
-
const yOffset = targetPos.top + targetPos.height;
|
|
32
|
-
|
|
33
|
-
const overflowRight = Math.max(xOffset + popupPos.width / 2 - windowWidth + OVERFLOW_BORDER, 0);
|
|
34
|
-
const overflowLeft = Math.min(xOffset - popupPos.width / 2 - OVERFLOW_BORDER, 0);
|
|
35
|
-
const overflow = overflowLeft || overflowRight;
|
|
36
|
-
|
|
37
|
-
const mouseEnterHandler = action === 'hover' ? () => setShow(true) : null;
|
|
38
|
-
const mouseLeaveHandler = action === 'hover' ? () => setShow(false) : null;
|
|
39
|
-
|
|
40
|
-
const mouseClickTargetHandler = action === 'click' ? () => handleClick(s => !s) : null;
|
|
41
|
-
const mouseClickOuterHandler = action === 'click' ? () => handleClick(true) : null;
|
|
42
|
-
const mouseClickAwayHandler = action === 'click' ? () => handleClick(false, {isLast: true}) : null;
|
|
43
|
-
|
|
44
|
-
const childrenClickHandler = hideOnClick ? () => setShow(false) : null;
|
|
45
|
-
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
if (mouseClickAwayHandler) {
|
|
48
|
-
window.addEventListener('click', mouseClickAwayHandler);
|
|
49
|
-
|
|
50
|
-
return () => window.removeEventListener('click', mouseClickAwayHandler);
|
|
51
|
-
}
|
|
52
|
-
}), [];
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<span
|
|
56
|
-
{...rest}
|
|
57
|
-
onMouseEnter={mouseEnterHandler}
|
|
58
|
-
onMouseLeave={mouseLeaveHandler}
|
|
59
|
-
onClick={mouseClickOuterHandler}
|
|
60
|
-
>
|
|
61
|
-
{React.cloneElement(target, {
|
|
62
|
-
ref: targetRef,
|
|
63
|
-
onClick: mouseClickTargetHandler
|
|
64
|
-
})}
|
|
65
|
-
<span
|
|
66
|
-
className={`popup popup_${show ? 'visible' : 'hidden'}`}
|
|
67
|
-
style={{left: xOffset, top: yOffset}}
|
|
68
|
-
>
|
|
69
|
-
<div className='popup__pointer' />
|
|
70
|
-
<div
|
|
71
|
-
ref={popupRef}
|
|
72
|
-
className='popup__content'
|
|
73
|
-
style={{transform: `translate(${-overflow}px)`}}
|
|
74
|
-
onClick={childrenClickHandler}
|
|
75
|
-
>
|
|
76
|
-
{children}
|
|
77
|
-
</div>
|
|
78
|
-
</span>
|
|
79
|
-
</span>
|
|
80
|
-
);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
Popup.propTypes = {
|
|
84
|
-
action: PropTypes.oneOf(['hover', 'click']).isRequired,
|
|
85
|
-
target: PropTypes.node.isRequired,
|
|
86
|
-
hideOnClick: PropTypes.bool
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export default Popup;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.popup {
|
|
2
|
-
position: absolute;
|
|
3
|
-
z-index: 1500;
|
|
4
|
-
transform: translate(-50%, -1px);
|
|
5
|
-
|
|
6
|
-
&.popup_visible {
|
|
7
|
-
visibility: visible;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&.popup_hidden {
|
|
11
|
-
visibility: hidden;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.popup__pointer {
|
|
15
|
-
position: relative;
|
|
16
|
-
height: pointer-height = 20px;
|
|
17
|
-
|
|
18
|
-
&::after {
|
|
19
|
-
content: '';
|
|
20
|
-
pointer-border-width = 1px;
|
|
21
|
-
border-left: pointer-border-width solid #ccc;
|
|
22
|
-
border-top: pointer-border-width solid #ccc;
|
|
23
|
-
margin-top: pointer-height - (2 * pointer-border-width * math(2, 'sqrt'));
|
|
24
|
-
position: absolute;
|
|
25
|
-
box-sizing: content-box;
|
|
26
|
-
height: 20px;
|
|
27
|
-
width: 20px;
|
|
28
|
-
background: white;
|
|
29
|
-
z-index: 1400;
|
|
30
|
-
left: 50%;
|
|
31
|
-
transform: rotate(45deg) translate(-50%);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.popup__content {
|
|
36
|
-
border: 1px solid #ccc;
|
|
37
|
-
border-radius: .25rem;
|
|
38
|
-
box-shadow: 0 2px 4px 0 rgba(34, 36, 38, .12),
|
|
39
|
-
0 2px 10px 0 rgba(34, 36, 38, .15);
|
|
40
|
-
background-color: white;
|
|
41
|
-
padding: 15px;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import './index.styl';
|
|
4
|
-
|
|
5
|
-
export default ({done, total}) => {
|
|
6
|
-
const percent = (done / total).toFixed(2) * 100;
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<span className="progress-bar" data-content={`${done}/${total}`}>
|
|
10
|
-
<span className="progress-bar__container" style={{width: `${percent}%`}}/>
|
|
11
|
-
</span>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
.progress-bar {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
outline: 1px solid #ccc;
|
|
5
|
-
border-radius: 5px;
|
|
6
|
-
|
|
7
|
-
&__container {
|
|
8
|
-
position: absolute;
|
|
9
|
-
height: 100%;
|
|
10
|
-
z-index: -1;
|
|
11
|
-
background-color: #fc0;
|
|
12
|
-
transition: width .25s ease-in-out,
|
|
13
|
-
margin-right .25s ease-in-out;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&::after {
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
width: 100%;
|
|
19
|
-
padding-left: 10px;
|
|
20
|
-
padding-right: 10px;
|
|
21
|
-
text-align: center;
|
|
22
|
-
align-self: center;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import React, {Component, Fragment} from 'react';
|
|
2
|
-
import {connect} from 'react-redux';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import NotificationsSystem, {wyboTheme} from 'reapop';
|
|
5
|
-
import {bindActionCreators} from 'redux';
|
|
6
|
-
|
|
7
|
-
import {ROOT} from '../../constants/extension-points';
|
|
8
|
-
import * as actions from '../modules/actions';
|
|
9
|
-
import Loading from './loading';
|
|
10
|
-
import StickyHeader from './sticky-header/report';
|
|
11
|
-
import MainTree from './main-tree';
|
|
12
|
-
import CustomScripts from './custom-scripts';
|
|
13
|
-
import FaviconChanger from './favicon-changer';
|
|
14
|
-
import ExtensionPoint from './extension-point';
|
|
15
|
-
import BottomProgressBar from './bottom-progress-bar';
|
|
16
|
-
|
|
17
|
-
class Report extends Component {
|
|
18
|
-
static propTypes = {
|
|
19
|
-
// from store
|
|
20
|
-
allRootSuiteIds: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
21
|
-
fetchDbDetails: PropTypes.array.isRequired,
|
|
22
|
-
customScripts: PropTypes.array,
|
|
23
|
-
notifications: PropTypes.array
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
componentDidMount() {
|
|
27
|
-
this.props.actions.initStaticReport();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
componentWillUnmount() {
|
|
31
|
-
this.props.actions.finStaticReport();
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
render() {
|
|
35
|
-
const {allRootSuiteIds, fetchDbDetails, notifications, actions} = this.props;
|
|
36
|
-
const notificationElem = <NotificationsSystem theme={wyboTheme} notifications={notifications} dismissNotification={actions.dismissNotification} />;
|
|
37
|
-
|
|
38
|
-
if (!allRootSuiteIds.length && !fetchDbDetails.length) {
|
|
39
|
-
return (
|
|
40
|
-
<Fragment>
|
|
41
|
-
{notificationElem}
|
|
42
|
-
<Loading active={true} />
|
|
43
|
-
</Fragment>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<Fragment>
|
|
49
|
-
<ExtensionPoint name={ROOT}>
|
|
50
|
-
<CustomScripts scripts={this.props.customScripts}/>
|
|
51
|
-
{notificationElem}
|
|
52
|
-
<FaviconChanger />
|
|
53
|
-
<StickyHeader />
|
|
54
|
-
<main className="container">
|
|
55
|
-
<MainTree />
|
|
56
|
-
</main>
|
|
57
|
-
<BottomProgressBar />
|
|
58
|
-
</ExtensionPoint>
|
|
59
|
-
</Fragment>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default connect(
|
|
65
|
-
({tree, fetchDbDetails, config, notifications}) => ({
|
|
66
|
-
allRootSuiteIds: tree.suites.allRootIds,
|
|
67
|
-
fetchDbDetails,
|
|
68
|
-
customScripts: config.customScripts,
|
|
69
|
-
notifications
|
|
70
|
-
}),
|
|
71
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
72
|
-
)(Report);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React, {Component} from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import RetrySwitcherItem from './item';
|
|
4
|
-
|
|
5
|
-
export default class RetrySwitcher extends Component {
|
|
6
|
-
static propTypes = {
|
|
7
|
-
resultIds: PropTypes.arrayOf(PropTypes.string).isRequired,
|
|
8
|
-
retryIndex: PropTypes.number,
|
|
9
|
-
title: PropTypes.string,
|
|
10
|
-
onChange: PropTypes.func.isRequired
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
render() {
|
|
14
|
-
const {resultIds, retryIndex, title, onChange} = this.props;
|
|
15
|
-
|
|
16
|
-
if (resultIds.length <= 1) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<div className="tab-switcher">
|
|
22
|
-
{resultIds.map((resultId, ind) => {
|
|
23
|
-
const isActive = ind === retryIndex;
|
|
24
|
-
|
|
25
|
-
return <RetrySwitcherItem
|
|
26
|
-
key={resultId}
|
|
27
|
-
resultId={resultId}
|
|
28
|
-
isActive={isActive}
|
|
29
|
-
title={title}
|
|
30
|
-
onClick={() => onChange(ind)}
|
|
31
|
-
/>;
|
|
32
|
-
})}
|
|
33
|
-
</div>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|