html-reporter 9.10.0 → 9.10.2
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.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/build/lib/static/report.min.css +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.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/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.css +0 -1
- 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/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,106 +0,0 @@
|
|
|
1
|
-
import React, {Component, Fragment} from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import ErrorBoundary from './error-boundary';
|
|
4
|
-
import plugins from '../modules/plugins';
|
|
5
|
-
|
|
6
|
-
export default class ExtensionPoint extends Component {
|
|
7
|
-
static propTypes = {
|
|
8
|
-
name: PropTypes.string.isRequired
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
render() {
|
|
12
|
-
const loadedPluginConfigs = plugins.getLoadedConfigs();
|
|
13
|
-
|
|
14
|
-
if (loadedPluginConfigs.length) {
|
|
15
|
-
const {name: pointName, children: reportComponent, ...componentProps} = this.props;
|
|
16
|
-
const pluginComponents = getExtensionPointComponents(loadedPluginConfigs, pointName);
|
|
17
|
-
return getComponentsComposition(pluginComponents, reportComponent, componentProps);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return this.props.children;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function getComponentsComposition(pluginComponents, reportComponent, componentProps) {
|
|
25
|
-
let currentComponent = reportComponent;
|
|
26
|
-
|
|
27
|
-
for (const {PluginComponent, position, config} of pluginComponents) {
|
|
28
|
-
currentComponent = composeComponents(PluginComponent, componentProps, currentComponent, position, config);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return currentComponent;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function composeComponents(PluginComponent, pluginProps, currentComponent, position, config) {
|
|
35
|
-
switch (position) {
|
|
36
|
-
case 'wrap':
|
|
37
|
-
return <ErrorBoundary fallback={currentComponent}>
|
|
38
|
-
<PluginComponent {...pluginProps}>
|
|
39
|
-
{currentComponent}
|
|
40
|
-
</PluginComponent>
|
|
41
|
-
</ErrorBoundary>;
|
|
42
|
-
case 'before':
|
|
43
|
-
return <Fragment>
|
|
44
|
-
<ErrorBoundary>
|
|
45
|
-
<PluginComponent {...pluginProps}/>
|
|
46
|
-
</ErrorBoundary>
|
|
47
|
-
{currentComponent}
|
|
48
|
-
</Fragment>;
|
|
49
|
-
case 'after':
|
|
50
|
-
return <Fragment>
|
|
51
|
-
{currentComponent}
|
|
52
|
-
<ErrorBoundary>
|
|
53
|
-
<PluginComponent {...pluginProps}/>
|
|
54
|
-
</ErrorBoundary>
|
|
55
|
-
</Fragment>;
|
|
56
|
-
default:
|
|
57
|
-
console.error(`${getComponentSpec(config)} unexpected position "${position}" specified.`);
|
|
58
|
-
return currentComponent;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function getExtensionPointComponents(loadedPluginConfigs, pointName) {
|
|
63
|
-
return loadedPluginConfigs
|
|
64
|
-
.map(config => {
|
|
65
|
-
try {
|
|
66
|
-
const PluginComponent = plugins.get(config.name, config.component);
|
|
67
|
-
return {
|
|
68
|
-
PluginComponent,
|
|
69
|
-
name,
|
|
70
|
-
point: getComponentPoint(PluginComponent, config),
|
|
71
|
-
position: getComponentPosition(PluginComponent, config),
|
|
72
|
-
config
|
|
73
|
-
};
|
|
74
|
-
} catch (err) {
|
|
75
|
-
console.error(err);
|
|
76
|
-
return {};
|
|
77
|
-
}
|
|
78
|
-
})
|
|
79
|
-
.filter(({point, position}) => {
|
|
80
|
-
return point && position && point === pointName;
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function getComponentPoint(component, config) {
|
|
85
|
-
return getComponentConfigField(component, config, 'point');
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function getComponentPosition(component, config) {
|
|
89
|
-
return getComponentConfigField(component, config, 'position');
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function getComponentConfigField(component, config, field) {
|
|
93
|
-
if (component[field] && config[field] && component[field] !== config[field]) {
|
|
94
|
-
console.error(`${getComponentSpec(config)} "${field}" field does not match the one from the config: "${Component[field]}" vs "${config[field]}".`);
|
|
95
|
-
return null;
|
|
96
|
-
} else if (!component[field] && !config[field]) {
|
|
97
|
-
console.error(`${getComponentSpec(config)} "${field}" field is not set.`);
|
|
98
|
-
return null;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return component[field] || config[field];
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function getComponentSpec(config) {
|
|
105
|
-
return `Component "${config.component}" of "${config.name}" plugin`;
|
|
106
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {Component} from 'react';
|
|
2
|
-
import {connect} from 'react-redux';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import {areAllRootSuitesIdle} from '../modules/selectors/tree';
|
|
5
|
-
|
|
6
|
-
const RUNNING_HREF = 'icons/favicon-running.png';
|
|
7
|
-
const FAILURE_HREF = 'icons/favicon-failure.png';
|
|
8
|
-
const SUCCESS_HREF = 'icons/favicon-success.png';
|
|
9
|
-
|
|
10
|
-
class FaviconChanger extends Component {
|
|
11
|
-
static propTypes = {
|
|
12
|
-
// from store
|
|
13
|
-
isRunning: PropTypes.bool.isRequired,
|
|
14
|
-
hasFailedRootSuites: PropTypes.bool.isRequired,
|
|
15
|
-
allRootSuitesIdle: PropTypes.bool.isRequired
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
constructor(props) {
|
|
19
|
-
super(props);
|
|
20
|
-
|
|
21
|
-
this.favicon = document.getElementById('dynamic-favicon');
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_changeFavicon(href) {
|
|
25
|
-
this.favicon.href = href;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
render() {
|
|
29
|
-
const {isRunning, hasFailedRootSuites, allRootSuitesIdle} = this.props;
|
|
30
|
-
|
|
31
|
-
if (isRunning) {
|
|
32
|
-
this._changeFavicon(RUNNING_HREF);
|
|
33
|
-
} else if (hasFailedRootSuites) {
|
|
34
|
-
this._changeFavicon(FAILURE_HREF);
|
|
35
|
-
} else if (!allRootSuitesIdle) {
|
|
36
|
-
this._changeFavicon(SUCCESS_HREF);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default connect(
|
|
44
|
-
(state) => {
|
|
45
|
-
const hasFailedRootSuites = Boolean(state.tree.suites.failedRootIds.length);
|
|
46
|
-
const allRootSuitesIdle = state.gui
|
|
47
|
-
? !hasFailedRootSuites && areAllRootSuitesIdle(state)
|
|
48
|
-
: false;
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
isRunning: state.running,
|
|
52
|
-
hasFailedRootSuites,
|
|
53
|
-
allRootSuitesIdle
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
)(FaviconChanger);
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import {connect} from 'react-redux';
|
|
4
|
-
import {bindActionCreators} from 'redux';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
import * as actions from '../../modules/actions';
|
|
8
|
-
import Suites from '../suites';
|
|
9
|
-
import {INDETERMINATE} from '../../../constants/checked-statuses';
|
|
10
|
-
import {getToggledCheckboxState} from '../../../common-utils';
|
|
11
|
-
import Bullet from '../bullet';
|
|
12
|
-
|
|
13
|
-
const GroupTestsItem = ({group, isActive, onClick, checkStatus, actions}) => {
|
|
14
|
-
const {name, pattern, testCount, resultCount} = group;
|
|
15
|
-
|
|
16
|
-
const body = isActive ? (
|
|
17
|
-
<div className="tests-group__body">
|
|
18
|
-
<Suites />
|
|
19
|
-
</div>
|
|
20
|
-
) : null;
|
|
21
|
-
|
|
22
|
-
const className = classNames(
|
|
23
|
-
'tests-group',
|
|
24
|
-
{'tests-group_collapsed': !isActive}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
const onToggleCheckbox = (e) => {
|
|
28
|
-
e.stopPropagation();
|
|
29
|
-
|
|
30
|
-
actions.toggleGroupCheckbox({
|
|
31
|
-
browserIds: group.browserIds,
|
|
32
|
-
checkStatus: getToggledCheckboxState(checkStatus)
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<div className={className}>
|
|
38
|
-
<div className="tests-group__title" onClick={onClick} title={pattern}>
|
|
39
|
-
<Bullet status={checkStatus} onClick={onToggleCheckbox} className='tests-group__bullet'/>
|
|
40
|
-
<span className="tests-group__name">{name}</span>
|
|
41
|
-
<span className="tests-group__count"> ({`tests: ${testCount}, runs: ${resultCount}`})</span>
|
|
42
|
-
</div>
|
|
43
|
-
{body}
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
GroupTestsItem.propTypes = {
|
|
49
|
-
group: PropTypes.object.isRequired,
|
|
50
|
-
isActive: PropTypes.bool.isRequired,
|
|
51
|
-
onClick: PropTypes.func.isRequired,
|
|
52
|
-
checkStatus: PropTypes.number
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export default connect(
|
|
56
|
-
({tree}, {group}) => {
|
|
57
|
-
const childCount = group.browserIds.length;
|
|
58
|
-
const checkedCount = group.browserIds.reduce((sum, browserId) => {
|
|
59
|
-
return sum + tree.browsers.stateById[browserId].checkStatus;
|
|
60
|
-
}, 0);
|
|
61
|
-
const checkStatus = Number((checkedCount === childCount) || (checkedCount && INDETERMINATE));
|
|
62
|
-
|
|
63
|
-
return {checkStatus};
|
|
64
|
-
},
|
|
65
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
66
|
-
)(GroupTestsItem);
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React, {Component} from 'react';
|
|
2
|
-
import {connect} from 'react-redux';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import {bindActionCreators} from 'redux';
|
|
5
|
-
|
|
6
|
-
import GroupTestsItem from './item';
|
|
7
|
-
import {groupedTestsType} from './prop-types';
|
|
8
|
-
import * as actions from '../../modules/actions';
|
|
9
|
-
import {getParsedKeyToGroupTestsBy} from '../../modules/selectors/grouped-tests';
|
|
10
|
-
|
|
11
|
-
class GroupTestsList extends Component {
|
|
12
|
-
static propTypes = {
|
|
13
|
-
// from store
|
|
14
|
-
groupedTests: groupedTestsType.isRequired,
|
|
15
|
-
selectedGroupSection: PropTypes.string.isRequired,
|
|
16
|
-
selectedGroupKey: PropTypes.string.isRequired
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
state = {
|
|
20
|
-
activeGroupIndex: null
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
onGroupChange = (index) => {
|
|
24
|
-
const {groupedTests, selectedGroupSection, selectedGroupKey} = this.props;
|
|
25
|
-
const activeGroupIndex = this.state.activeGroupIndex === index ? null : index;
|
|
26
|
-
const isActive = activeGroupIndex !== null;
|
|
27
|
-
|
|
28
|
-
this.setState({activeGroupIndex}, () => {
|
|
29
|
-
const groups = groupedTests[selectedGroupSection].byKey[selectedGroupKey];
|
|
30
|
-
const {browserIds = [], resultIds = []} = isActive ? groups[index] : {};
|
|
31
|
-
|
|
32
|
-
this.props.actions.toggleTestsGroup({browserIds, resultIds, isActive});
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
render() {
|
|
37
|
-
const {groupedTests, selectedGroupSection, selectedGroupKey} = this.props;
|
|
38
|
-
const groups = groupedTests[selectedGroupSection].byKey[selectedGroupKey];
|
|
39
|
-
|
|
40
|
-
const {activeGroupIndex} = this.state;
|
|
41
|
-
|
|
42
|
-
if (groups.length === 0) {
|
|
43
|
-
const msg = `No tests match the key "${selectedGroupKey}" in the section "${selectedGroupSection}". `
|
|
44
|
-
+ `Try to clear "Group by" to see more results.`;
|
|
45
|
-
|
|
46
|
-
return <div className="grouped-tests">{msg}</div>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return <div className="grouped-tests">
|
|
50
|
-
{groups.map((group, ind) => {
|
|
51
|
-
const isActive = ind === activeGroupIndex;
|
|
52
|
-
|
|
53
|
-
return <GroupTestsItem
|
|
54
|
-
key={group.name}
|
|
55
|
-
group={group}
|
|
56
|
-
isActive={isActive}
|
|
57
|
-
onClick={() => this.onGroupChange(ind)}
|
|
58
|
-
/>;
|
|
59
|
-
})}
|
|
60
|
-
</div>;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export default connect(
|
|
65
|
-
(state) => {
|
|
66
|
-
const [selectedGroupSection, selectedGroupKey] = getParsedKeyToGroupTestsBy(state);
|
|
67
|
-
|
|
68
|
-
return {groupedTests: state.groupedTests, selectedGroupSection, selectedGroupKey};
|
|
69
|
-
},
|
|
70
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
71
|
-
)(GroupTestsList);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
|
-
|
|
3
|
-
export const groupedTestsType = PropTypes.shape({
|
|
4
|
-
result: PropTypes.shape({
|
|
5
|
-
byKey: PropTypes.object.isRequired,
|
|
6
|
-
allKeys: PropTypes.array.isRequired
|
|
7
|
-
}).isRequired,
|
|
8
|
-
meta: PropTypes.shape({
|
|
9
|
-
byKey: PropTypes.object.isRequired,
|
|
10
|
-
allKeys: PropTypes.array.isRequired
|
|
11
|
-
}).isRequired
|
|
12
|
-
});
|
|
@@ -1,105 +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 StickyHeader from './sticky-header/gui';
|
|
10
|
-
import Loading from './loading';
|
|
11
|
-
import ModalContainer from '../containers/modal';
|
|
12
|
-
import MainTree from './main-tree';
|
|
13
|
-
import CustomScripts from './custom-scripts';
|
|
14
|
-
import clientEvents from '../../gui/constants/client-events';
|
|
15
|
-
import FaviconChanger from './favicon-changer';
|
|
16
|
-
import ExtensionPoint from './extension-point';
|
|
17
|
-
import BottomProgressBar from './bottom-progress-bar';
|
|
18
|
-
|
|
19
|
-
class Gui extends Component {
|
|
20
|
-
static propTypes = {
|
|
21
|
-
// from store
|
|
22
|
-
loading: PropTypes.shape({
|
|
23
|
-
active: PropTypes.bool,
|
|
24
|
-
content: PropTypes.string
|
|
25
|
-
}).isRequired,
|
|
26
|
-
customScripts: PropTypes.array,
|
|
27
|
-
notifications: PropTypes.array
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
componentDidMount() {
|
|
31
|
-
this.props.actions.initGuiReport();
|
|
32
|
-
this._subscribeToEvents();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
componentWillUnmount() {
|
|
36
|
-
this.props.actions.finGuiReport();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
_subscribeToEvents() {
|
|
40
|
-
const {actions} = this.props;
|
|
41
|
-
const eventSource = new EventSource('/events');
|
|
42
|
-
|
|
43
|
-
eventSource.addEventListener(clientEvents.BEGIN_SUITE, (e) => {
|
|
44
|
-
const data = JSON.parse(e.data);
|
|
45
|
-
actions.suiteBegin(data);
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
eventSource.addEventListener(clientEvents.BEGIN_STATE, (e) => {
|
|
49
|
-
const data = JSON.parse(e.data);
|
|
50
|
-
actions.testBegin(data);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
[clientEvents.TEST_RESULT, clientEvents.ERROR].forEach((eventName) => {
|
|
54
|
-
eventSource.addEventListener(eventName, (e) => {
|
|
55
|
-
const data = JSON.parse(e.data);
|
|
56
|
-
actions.testResult(data);
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
eventSource.addEventListener(clientEvents.END, () => {
|
|
61
|
-
actions.testsEnd();
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
render() {
|
|
66
|
-
const {allRootSuiteIds, loading, customScripts, notifications, actions} = this.props;
|
|
67
|
-
const notificationElem = <NotificationsSystem theme={wyboTheme} notifications={notifications} dismissNotification={actions.dismissNotification} />;
|
|
68
|
-
|
|
69
|
-
if (!allRootSuiteIds.length) {
|
|
70
|
-
return (
|
|
71
|
-
<Fragment>
|
|
72
|
-
{notificationElem}
|
|
73
|
-
<Loading active={true} />
|
|
74
|
-
</Fragment>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Fragment>
|
|
80
|
-
<ExtensionPoint name={ROOT}>
|
|
81
|
-
<CustomScripts scripts={customScripts}/>
|
|
82
|
-
{notificationElem}
|
|
83
|
-
<FaviconChanger />
|
|
84
|
-
<StickyHeader />
|
|
85
|
-
<main className="container">
|
|
86
|
-
<MainTree />
|
|
87
|
-
</main>
|
|
88
|
-
<Loading active={loading.active} content={loading.content} />
|
|
89
|
-
<ModalContainer />
|
|
90
|
-
<BottomProgressBar />
|
|
91
|
-
</ExtensionPoint>
|
|
92
|
-
</Fragment>
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export default connect(
|
|
98
|
-
({tree, loading, config: {customScripts}, notifications}) => ({
|
|
99
|
-
allRootSuiteIds: tree.suites.allRootIds,
|
|
100
|
-
loading,
|
|
101
|
-
customScripts,
|
|
102
|
-
notifications
|
|
103
|
-
}),
|
|
104
|
-
(dispatch) => ({actions: bindActionCreators(actions, dispatch)})
|
|
105
|
-
)(Gui);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import React, {Component} from 'react';
|
|
4
|
-
import {connect} from 'react-redux';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import Summary from './summary';
|
|
7
|
-
|
|
8
|
-
import './header.css';
|
|
9
|
-
|
|
10
|
-
class Header extends Component {
|
|
11
|
-
static propTypes = {
|
|
12
|
-
date: PropTypes.string
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
render() {
|
|
16
|
-
return (
|
|
17
|
-
<header className="header container">
|
|
18
|
-
<Summary />
|
|
19
|
-
</header>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default connect((state) => {
|
|
25
|
-
return {date: state.date};
|
|
26
|
-
})(Header);
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import {Ref, Button} from 'semantic-ui-react';
|
|
4
|
-
import classNames from 'classnames';
|
|
5
|
-
|
|
6
|
-
const DbBtn = ({fetchDbDetails}, ref) => {
|
|
7
|
-
const successFetchDbDetails = fetchDbDetails.filter(d => d.success);
|
|
8
|
-
const isFailed = successFetchDbDetails.length !== fetchDbDetails.length;
|
|
9
|
-
const value = `${successFetchDbDetails.length}/${fetchDbDetails.length}`;
|
|
10
|
-
const content = `Databases loaded: ${value}`;
|
|
11
|
-
const className = classNames(
|
|
12
|
-
'db-info',
|
|
13
|
-
{'db-info_failed': isFailed}
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
return (
|
|
17
|
-
<Ref innerRef={ref}>
|
|
18
|
-
<Button
|
|
19
|
-
content={content}
|
|
20
|
-
icon="angle down"
|
|
21
|
-
className={className}
|
|
22
|
-
basic
|
|
23
|
-
/>
|
|
24
|
-
</Ref>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const ForwardedDbBtn = React.forwardRef(DbBtn);
|
|
29
|
-
|
|
30
|
-
ForwardedDbBtn.propTypes = {
|
|
31
|
-
fetchDbDetails: PropTypes.arrayOf(PropTypes.shape({
|
|
32
|
-
success: PropTypes.bool
|
|
33
|
-
})).isRequired
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default ForwardedDbBtn;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React, {Component} from 'react';
|
|
2
|
-
import {Dropdown} from 'semantic-ui-react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
|
|
5
|
-
import DbBtn from './dbBtn';
|
|
6
|
-
import Popup from '../../popup';
|
|
7
|
-
|
|
8
|
-
export default class DbSummaryKey extends Component {
|
|
9
|
-
/*
|
|
10
|
-
Component to display the amount of fetched databases (and response statuses of all databases).
|
|
11
|
-
Used when building a report using data from sqlite databases.
|
|
12
|
-
*/
|
|
13
|
-
static propTypes = {
|
|
14
|
-
fetchDbDetails: PropTypes.arrayOf(PropTypes.shape({
|
|
15
|
-
url: PropTypes.string,
|
|
16
|
-
status: PropTypes.number,
|
|
17
|
-
success: PropTypes.bool
|
|
18
|
-
})).isRequired
|
|
19
|
-
};
|
|
20
|
-
state = {
|
|
21
|
-
collapsed: true
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
render() {
|
|
25
|
-
const {fetchDbDetails} = this.props;
|
|
26
|
-
|
|
27
|
-
if (!fetchDbDetails) {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const additionalInfo = fetchDbDetails.map(({url, status, success}) => (
|
|
32
|
-
<Dropdown.Item key={url} className="db-info__row">
|
|
33
|
-
{' '}
|
|
34
|
-
{url} responded with
|
|
35
|
-
<span className={success ? 'db-info__row_success' : 'db-info__row_fail'}>{' ' + status}</span>
|
|
36
|
-
</Dropdown.Item>
|
|
37
|
-
));
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<Popup
|
|
41
|
-
className="db-info__popup"
|
|
42
|
-
action="hover"
|
|
43
|
-
target={<DbBtn fetchDbDetails={fetchDbDetails} />}
|
|
44
|
-
>
|
|
45
|
-
{additionalInfo}
|
|
46
|
-
</Popup>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, {Component} from 'react';
|
|
2
|
-
import {connect} from 'react-redux';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import SummaryKey from './item';
|
|
5
|
-
import DbSummaryKey from './dbSummary';
|
|
6
|
-
import {getStatsFilteredByBrowsers} from '../../../modules/selectors/stats';
|
|
7
|
-
|
|
8
|
-
import './summary.css';
|
|
9
|
-
|
|
10
|
-
class Summary extends Component {
|
|
11
|
-
static propTypes = {
|
|
12
|
-
stats: PropTypes.shape({
|
|
13
|
-
total: PropTypes.number,
|
|
14
|
-
passed: PropTypes.number,
|
|
15
|
-
failed: PropTypes.number,
|
|
16
|
-
skipped: PropTypes.number,
|
|
17
|
-
retries: PropTypes.number
|
|
18
|
-
})
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
render() {
|
|
22
|
-
const {total, passed, failed, skipped, retries} = this.props.stats;
|
|
23
|
-
const {fetchDbDetails} = this.props;
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<dl className="summary">
|
|
27
|
-
<SummaryKey label="Total Tests" id="total" value={total} />
|
|
28
|
-
<SummaryKey label="Passed" id="passed" value={passed} />
|
|
29
|
-
<SummaryKey label="Failed" id="failed" value={failed} />
|
|
30
|
-
<SummaryKey label="Retries" id="retries" value={retries} />
|
|
31
|
-
<SummaryKey label="Skipped" id="skipped" value={skipped} />
|
|
32
|
-
<DbSummaryKey fetchDbDetails={fetchDbDetails} />
|
|
33
|
-
</dl>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default connect(
|
|
39
|
-
(state) => ({
|
|
40
|
-
stats: getStatsFilteredByBrowsers(state),
|
|
41
|
-
fetchDbDetails: state.fetchDbDetails
|
|
42
|
-
})
|
|
43
|
-
)(Summary);
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
import React, {Component, Fragment} from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import classNames from 'classnames';
|
|
6
|
-
|
|
7
|
-
export default class SummaryItem extends Component {
|
|
8
|
-
static propTypes = {
|
|
9
|
-
id: PropTypes.oneOf(['total', 'passed', 'failed', 'retries', 'skipped']).isRequired,
|
|
10
|
-
label: PropTypes.string.isRequired,
|
|
11
|
-
value: PropTypes.number
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
render() {
|
|
15
|
-
const {id, label, value} = this.props;
|
|
16
|
-
const className = classNames(
|
|
17
|
-
'summary__key',
|
|
18
|
-
`summary__key_${id}`
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Fragment>
|
|
23
|
-
<dt className={className}>{label}</dt>
|
|
24
|
-
<dd className="summary__value">{value}</dd>
|
|
25
|
-
</Fragment>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
.summary {
|
|
2
|
-
margin: 0;
|
|
3
|
-
display: flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.summary__key {
|
|
7
|
-
font-weight: bold;
|
|
8
|
-
display: inline;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.summary__key::after {
|
|
12
|
-
content: ':';
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.summary__key_passed {
|
|
16
|
-
color: #169737;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.summary__key_failed {
|
|
20
|
-
color: #cf0c3d;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.summary__key_retries {
|
|
24
|
-
color: #ff9a9a;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.summary__key_skipped {
|
|
28
|
-
color: #8c8c8c;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.summary__value {
|
|
32
|
-
margin-left: 5px;
|
|
33
|
-
margin-right: 20px;
|
|
34
|
-
display: inline;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.db-info__popup {
|
|
38
|
-
margin-left: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.ui.basic.db-info {
|
|
42
|
-
font-family: inherit;
|
|
43
|
-
font-size: inherit;
|
|
44
|
-
line-height: 18px;
|
|
45
|
-
height: auto;
|
|
46
|
-
padding: 0;
|
|
47
|
-
box-shadow: none !important;
|
|
48
|
-
border: none;
|
|
49
|
-
color: #000 !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.ui.basic.db-info:hover {
|
|
53
|
-
color: #a3a3a3 !important;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.ui.db-info.db-info_failed {
|
|
57
|
-
color: #cf0c3d !important;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.ui.basic.db-info.db-info_failed:hover {
|
|
61
|
-
color: #e66767 !important;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.popup__content .db-info__row {
|
|
65
|
-
white-space: nowrap;
|
|
66
|
-
font-size: 15px;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.db-info__row_success {
|
|
70
|
-
color: #038035;
|
|
71
|
-
font-weight: bold;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.db-info__row_fail {
|
|
75
|
-
color: #c00;
|
|
76
|
-
font-weight: bold;
|
|
77
|
-
}
|