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,265 +0,0 @@
|
|
|
1
|
-
# Plugins
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Use the `plugins` option in the `html-reporter` plugin config to extend the functionality of the report using your own plugins to the report.
|
|
6
|
-
|
|
7
|
-
To make your plugins work in the report, enable the [pluginsEnabled][plugins-enabled] option in the `html-reporter` plugin config by setting its value to `true`.
|
|
8
|
-
|
|
9
|
-
The list of plugins is set as an array with their descriptions. By default, the list is considered empty: `[]`.
|
|
10
|
-
|
|
11
|
-
Plugins allow you to add your own UI components to the report (both for a static report and for GUI mode), as well as server "handles" _(routes)_ (for GUI mode).
|
|
12
|
-
|
|
13
|
-
## Setup
|
|
14
|
-
|
|
15
|
-
The description of plugins looks like this:
|
|
16
|
-
|
|
17
|
-
```javascript
|
|
18
|
-
plugins: [
|
|
19
|
-
{
|
|
20
|
-
name: 'plugin-name',
|
|
21
|
-
component: 'PluginReactComponentName',
|
|
22
|
-
point: 'extension-point-name',
|
|
23
|
-
position: 'wrap',
|
|
24
|
-
config: { param: 'value' }
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'plugin-name',
|
|
28
|
-
component: 'AnotherPluginReactComponentName',
|
|
29
|
-
point: 'extension-point-name',
|
|
30
|
-
position: 'before'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// ...
|
|
34
|
-
]
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Description of configuration parameters
|
|
38
|
-
|
|
39
|
-
| **Parameter** | **Type** | **Description** |
|
|
40
|
-
| ------------- | -------- | --------------- |
|
|
41
|
-
| [name](#name) | String | Required parameter. The name of the package with the plugin for the report. It is assumed that the plugin can be connected using _require(name)_. |
|
|
42
|
-
| [component](#component) | String | The name of the React component from the plugin. |
|
|
43
|
-
| [point](#point) | String | The name of the extension point in the html-reporter plugin. |
|
|
44
|
-
| [position](#position) | String | Defines the method by which the component will be placed at the extension point. |
|
|
45
|
-
| [config](#config) | Object | Plugin configuration. |
|
|
46
|
-
|
|
47
|
-
A plugin for which only the `name` parameter is set can be used to override an existing GUI server middleware.
|
|
48
|
-
|
|
49
|
-
A plugin can define more than one component. Each component can be applied to multiple extension points and/or multiple times to the same point (with separate configuration entries). The order in which components are applied is determined by the configuration order.
|
|
50
|
-
|
|
51
|
-
### name
|
|
52
|
-
|
|
53
|
-
Required parameter. The name of the package with the plugin for the report. It is assumed that the plugin can be connected using _require(name)_.
|
|
54
|
-
|
|
55
|
-
### component
|
|
56
|
-
|
|
57
|
-
The name of the React component from the plugin.
|
|
58
|
-
|
|
59
|
-
### point
|
|
60
|
-
|
|
61
|
-
The name of the extension point in the _html-reporter_ plugin.
|
|
62
|
-
|
|
63
|
-
Defines the specific location of the specified component inside the html-reporter user interface.
|
|
64
|
-
|
|
65
|
-
For more information, see the section "Extension points".
|
|
66
|
-
|
|
67
|
-
### position
|
|
68
|
-
|
|
69
|
-
Defines the method by which the component will be placed at the extension point of the html-report user interface.
|
|
70
|
-
|
|
71
|
-
The following values are available:
|
|
72
|
-
|
|
73
|
-
| **Value** | **Description** |
|
|
74
|
-
| --------- | --------------- |
|
|
75
|
-
| wrap | wrap the extension point in the UI |
|
|
76
|
-
| before | place the component before the extension point |
|
|
77
|
-
| after | place the component after the extension point |
|
|
78
|
-
|
|
79
|
-
### config
|
|
80
|
-
|
|
81
|
-
Plugin configuration.
|
|
82
|
-
|
|
83
|
-
## Plugin code for the report
|
|
84
|
-
|
|
85
|
-
Examples of plugins can be [viewed in functional tests][html-reporter-plugins].
|
|
86
|
-
|
|
87
|
-
The `html-reporter` plugin is an object with some set of React components specified as its keys, and an optional `reducers` key with an array of redux-reducers to control the state of components, which are later combined using [reduce-reducers][reduce-reducers].
|
|
88
|
-
|
|
89
|
-
The plugin for the report is expected to have the following module files in the root of its package: `plugin.js` and/or `middleware.js`.
|
|
90
|
-
|
|
91
|
-
### plugin.js
|
|
92
|
-
|
|
93
|
-
Optional module. A file that should export an object (or a set of named exports) or a function that returns such an object or array with some specific structure.
|
|
94
|
-
|
|
95
|
-
You can reuse the `html-reporter` dependencies in plugins (React, Redux, etc.). To do this, an array with a list of necessary dependencies must be exported from the module, followed by a function with the corresponding dependencies passed to it, and returning the plugin itself.
|
|
96
|
-
|
|
97
|
-
For example:
|
|
98
|
-
|
|
99
|
-
```javascript
|
|
100
|
-
import 'plugin-styles.css';
|
|
101
|
-
|
|
102
|
-
export default ['react', function(React, options) {
|
|
103
|
-
class PluginComponent extends React.Component {
|
|
104
|
-
// component implementation
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return {
|
|
108
|
-
PluginComponent,
|
|
109
|
-
reducers: []
|
|
110
|
-
};
|
|
111
|
-
}];
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Styles for the plugin must be loaded together with `plugin.js`, and the resulting file should be one bundle.
|
|
115
|
-
|
|
116
|
-
Value exported from `plugin.js`, should be passed to `__hermione_html_reporter_register_plugin__`.
|
|
117
|
-
|
|
118
|
-
There are two ways to do this.
|
|
119
|
-
|
|
120
|
-
For example, configure the build by _webpack_ so that it creates the corresponding `jsonp` library:
|
|
121
|
-
|
|
122
|
-
```javascript
|
|
123
|
-
// ...
|
|
124
|
-
output: {
|
|
125
|
-
filename: 'plugin.js',
|
|
126
|
-
path: __dirname,
|
|
127
|
-
library: '__hermione_html_reporter_register_plugin__',
|
|
128
|
-
libraryTarget: 'jsonp'
|
|
129
|
-
},
|
|
130
|
-
// ...
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
Or pass the value exported from `plugin.js`, clearly:
|
|
134
|
-
|
|
135
|
-
```javascript
|
|
136
|
-
__hermione_html_reporter_register_plugin__(['react', function(React, options) {
|
|
137
|
-
// ...
|
|
138
|
-
return { PluginComponent };
|
|
139
|
-
}]);
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### middleware.js
|
|
143
|
-
|
|
144
|
-
Optional module. Exports a function that accepts `Router` from [express][express]. It is expected that the "routes" of the plugin will be connected to the router. And the router then connects to the "route" `/plugin-routes/:PluginName/`.
|
|
145
|
-
|
|
146
|
-
```javascript
|
|
147
|
-
module.exports = function(pluginRouter) {
|
|
148
|
-
pluginRouter.get('/plugin-route', function(req, res) {
|
|
149
|
-
// "route" implementation
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Then the "routes" can be called from the React components of the plugin defined in `plugin.js`. For convenience, the plugin name is always passed with options called `pluginName` when a function or an array of functions is used for export:
|
|
155
|
-
|
|
156
|
-
```javascript
|
|
157
|
-
export default ['react', 'axios', function(React, axios, { pluginName, pluginConfig, actions, actionNames, selectors }) {
|
|
158
|
-
class PluginComponent extends React.Component {
|
|
159
|
-
// ... somewhere inside the component ...
|
|
160
|
-
const result = await axios.get(`/plugin-routes/${pluginName}/plugin-route`);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
return {
|
|
164
|
-
PluginComponent,
|
|
165
|
-
reducers: []
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
In this example, you can also see the following properties:
|
|
171
|
-
|
|
172
|
-
| **Property** | **Description** |
|
|
173
|
-
| ------------ | ------------ |
|
|
174
|
-
| pluginName | plugin name |
|
|
175
|
-
| pluginConfig | plugin configuration |
|
|
176
|
-
| actions | Redux-actions |
|
|
177
|
-
| actionNames | action names in _html-reporter_ that are used in Redux-actions, allow to subscribe to report events |
|
|
178
|
-
| selectors | cached report selectors that were created using the [reselect][redux-reselect] library |
|
|
179
|
-
|
|
180
|
-
### Available dependencies
|
|
181
|
-
|
|
182
|
-
The following dependencies are available in plugins:
|
|
183
|
-
|
|
184
|
-
- [react][react]
|
|
185
|
-
- [redux][redux]
|
|
186
|
-
- [react-redux][react-redux]
|
|
187
|
-
- [lodash][lodash]
|
|
188
|
-
- [prop-types][prop-types]
|
|
189
|
-
- [classnames][classnames]
|
|
190
|
-
- [semantic-ui-react][semantic-ui-react]
|
|
191
|
-
- [react-markdown][react-markdown]
|
|
192
|
-
- [reduce-reducers][reduce-reducers]
|
|
193
|
-
- [immer][immer]
|
|
194
|
-
- [reselect][redux-reselect]
|
|
195
|
-
- [axios][axios]
|
|
196
|
-
|
|
197
|
-
### Available components
|
|
198
|
-
|
|
199
|
-
#### `<Details />`
|
|
200
|
-
|
|
201
|
-
A component with which you can switch the display of content.
|
|
202
|
-
|
|
203
|
-
Usage example:
|
|
204
|
-
|
|
205
|
-
```javascript
|
|
206
|
-
// ...inside your React component
|
|
207
|
-
|
|
208
|
-
render() {
|
|
209
|
-
return <Details
|
|
210
|
-
title='Some title'
|
|
211
|
-
content='Some content' // content that will appear by clicking on the title
|
|
212
|
-
extendClassNames='some_class_name' // you can add your own css classes to the component
|
|
213
|
-
onClick={() => console.log('clicked')} // as well as your handler
|
|
214
|
-
/>
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
where:
|
|
219
|
-
|
|
220
|
-
| **Property** | **Type** | **Description** |
|
|
221
|
-
| ------------ | -------- | --------------- |
|
|
222
|
-
| title | String or JSX.Element | Required parameter. A header describing the information hidden under it. |
|
|
223
|
-
| content | Function or String or String[] or JSX.Element | Required parameter. The content that will appear when you click on the title. |
|
|
224
|
-
| extendClassNames | String or String[] | CSS classes to add to the component. Optional parameter. |
|
|
225
|
-
| onClick | Function | The handler that will be called by clicking on the header. Optional parameter. |
|
|
226
|
-
|
|
227
|
-
## Extension points
|
|
228
|
-
|
|
229
|
-
Extension points are places in the user interface of the report that are available for extension using React components exported by _plugins for the report_.
|
|
230
|
-
|
|
231
|
-
Each extension point can pass certain props to plugin components depending on the point itself. Since some plugins may rely on a specific placement and, therefore, on specific props, it is possible to restrict plugin components to certain extension points by specifying a static `point` property for such plugin components:
|
|
232
|
-
|
|
233
|
-
```javascript
|
|
234
|
-
class PluginComponent extends React.Component {
|
|
235
|
-
static point = 'result';
|
|
236
|
-
// ...
|
|
237
|
-
}
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
The following extension points are currently available:
|
|
241
|
-
|
|
242
|
-
| **Point** | **Description** |
|
|
243
|
-
| --------- | --------------- |
|
|
244
|
-
| result | Allows you to extend each test result. Adds the _resultId_ and _testName_ props to the plugin component. |
|
|
245
|
-
| result_meta | Allows you to extend the meta information for each test result. Adds the _resultId_ and _testName_ props to the plugin component. |
|
|
246
|
-
| menu-bar | Allows you to extend the menu. |
|
|
247
|
-
| root | Allows you to add floating elements such as a modal window or a popup. |
|
|
248
|
-
|
|
249
|
-
An extension point can be extended by more than one component. In this case, the order in which components are applied is determined by the order in which plugins are configured. Each subsequent component is applied to all previously composed components at the extension point.
|
|
250
|
-
|
|
251
|
-
[plugins-enabled]: ./html-reporter-setup.md#pluginsenabled
|
|
252
|
-
[html-reporter-plugins]: https://github.com/gemini-testing/html-reporter/blob//master/./test/func/html-reporter-plugins
|
|
253
|
-
[reduce-reducers]: https://github.com/redux-utilities/reduce-reducers
|
|
254
|
-
[express]: https://github.com/expressjs/express
|
|
255
|
-
[redux-reselect]: https://github.com/reduxjs/reselect
|
|
256
|
-
[react]: https://github.com/facebook/react
|
|
257
|
-
[redux]: https://github.com/reduxjs/redux
|
|
258
|
-
[react-redux]: https://github.com/reduxjs/react-redux
|
|
259
|
-
[lodash]: https://github.com/lodash/lodash
|
|
260
|
-
[prop-types]: https://github.com/facebook/prop-types
|
|
261
|
-
[classnames]: https://github.com/JedWatson/classnames
|
|
262
|
-
[semantic-ui-react]: https://github.com/Semantic-Org/Semantic-UI-React
|
|
263
|
-
[react-markdown]: https://github.com/remarkjs/react-markdown
|
|
264
|
-
[immer]: https://github.com/immerjs/immer
|
|
265
|
-
[axios]: https://github.com/axios/axios
|
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
# Setup
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Use the [html-reporter][html-reporter] plugin to get an html-report on the tests run.
|
|
6
|
-
|
|
7
|
-
:warning: _For the html-reporter plugin to work correctly, [hermione][hermione] version 4 and higher is required._
|
|
8
|
-
|
|
9
|
-
The plugin saves the tests run results to the [SQLite][sqlite] database. Therefore, you will not be able to open the local report as a file using the `file://` protocol.
|
|
10
|
-
|
|
11
|
-
To view the report, run Hermione in GUI mode:
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npx hermione gui
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Or run [http-server][http-server] in the report folder:
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npx http-server -p 8000
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
If you are starting a local server not from the folder with the report, then specify the path to the report:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx http-server ./hermione-report -p 8000
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Then open the page `http://localhost:8000` in the browser.
|
|
30
|
-
|
|
31
|
-
## Install
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -D html-reporter
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Setup
|
|
38
|
-
|
|
39
|
-
Add the plugin to the `plugins` section of the `hermione` config:
|
|
40
|
-
|
|
41
|
-
**Minimum config**
|
|
42
|
-
|
|
43
|
-
```javascript
|
|
44
|
-
module.exports = {
|
|
45
|
-
plugins: {
|
|
46
|
-
'html-reporter/hermione': {
|
|
47
|
-
enabled: true
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
// other hermione plugins...
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
// other hermione settings...
|
|
54
|
-
};
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Maximum config**
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
module.exports = {
|
|
61
|
-
plugins: {
|
|
62
|
-
'html-reporter/hermione': {
|
|
63
|
-
enabled: true,
|
|
64
|
-
path: 'my/hermione-reports',
|
|
65
|
-
defaultView: 'all',
|
|
66
|
-
baseHost: 'test.com',
|
|
67
|
-
errorPatterns: [
|
|
68
|
-
'Parameter .* must be a string',
|
|
69
|
-
{
|
|
70
|
-
name: 'Cannot read property of undefined',
|
|
71
|
-
pattern: 'Cannot read property .* of undefined',
|
|
72
|
-
hint: '<div>google it, i dont know how to fix it =(</div>'
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
customScripts: [
|
|
76
|
-
function() {
|
|
77
|
-
// custom script
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
// other scripts...
|
|
81
|
-
],
|
|
82
|
-
customGui: {
|
|
83
|
-
// DEPRECATED
|
|
84
|
-
// additional controls for GUI mode
|
|
85
|
-
// use report plugins instead of customGui
|
|
86
|
-
},
|
|
87
|
-
pluginsEnabled: true,
|
|
88
|
-
plugins: [
|
|
89
|
-
// report plugins...
|
|
90
|
-
],
|
|
91
|
-
yandexMetrika: {
|
|
92
|
-
counter: 1234567
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
// other hermione plugins...
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
// other hermione settings...
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### Description of configuration parameters
|
|
104
|
-
|
|
105
|
-
| **Parameter** | **Type** | **Default value** | **Description** |
|
|
106
|
-
| ------------- | -------- | :--------------------: | --------------- |
|
|
107
|
-
| [enabled](#enabled) | Boolean | true | Enable / disable the plugin. |
|
|
108
|
-
| [path](#path) | String | "hermione-report" | The path to the folder for saving html-report files. |
|
|
109
|
-
| [saveErrorDetails](#saveerrordetails) | Boolean | false | Save / do not save error details in json files. |
|
|
110
|
-
| [defaultView](#defaultview) | String | "all" | The test filtering mode when displayed, which will be set by default. |
|
|
111
|
-
| [diffMode](#diffmode) | String | "3-up" | The mode of viewing diffs, which will be set by default. |
|
|
112
|
-
| [baseHost](#basehost) | String | _N/A_ | Replaces the original host address for viewing in the browser. |
|
|
113
|
-
| [errorPatterns](#errorpatterns) | Object[] or String[] | [ ] | Error patterns with hints to improve the UX of the report. |
|
|
114
|
-
| [metaInfoBaseUrls](#metainfobaseurls) | Object | `{ }` | Base URLs for generating links in the _Meta_ section based on meta information about the test run. |
|
|
115
|
-
| [saveFormat](#saveformat) | String | "sqlite" | DEPRECATED. Allows you to set the format in which the results of the tests run will be saved. |
|
|
116
|
-
| [customGui](#customgui) | Object | `{ }` | DEPRECATED. Use [plugins](#plugins) instead. Description of custom controls for GUI mode. |
|
|
117
|
-
| [pluginsEnabled](#pluginsenabled) | Boolean | false | Enable plugins for the report. |
|
|
118
|
-
| [plugins](#plugins) | Object[] | [ ] | A list of plugins with their settings. |
|
|
119
|
-
| [customScripts](#customscripts) | Function[] | [ ] | A list of functions that implement custom scripts. For example, Yandex.Metrika scripts or a Bug. |
|
|
120
|
-
| [yandexMetrika](#yandexmetrika) | Object | `{ }` | [Yandex.Metrika][yandex-metrika]. |
|
|
121
|
-
|
|
122
|
-
### enabled
|
|
123
|
-
|
|
124
|
-
Enables or disables the plugin.
|
|
125
|
-
|
|
126
|
-
### path
|
|
127
|
-
|
|
128
|
-
The path to the folder for saving html-report files. By default, the files will be saved to the `hermione-report` folder in the current working folder.
|
|
129
|
-
|
|
130
|
-
### saveErrorDetails
|
|
131
|
-
|
|
132
|
-
Save or not save error details in json files (to the `error-details` folder).
|
|
133
|
-
|
|
134
|
-
By default, "do not save": `false`.
|
|
135
|
-
|
|
136
|
-
Any hermione plugin can add any details to the error object when it occurs. These details can help the user in debugging problems that have occurred in the test. Html-reporter saves these details in the `error-details` folder in a file named: `<hash from the full name of the test>-<browser>_<retry number>_<timestamp>.json`.
|
|
137
|
-
|
|
138
|
-
Under the stack trace, the html-reporter adds an `Error details` section with a `<title>` link pointing to the json file. The user can open this file either in the browser or in any IDE.
|
|
139
|
-
|
|
140
|
-
Example of how to add details to an error object from a plugin:
|
|
141
|
-
|
|
142
|
-
```javascript
|
|
143
|
-
const err = new Error('some error');
|
|
144
|
-
|
|
145
|
-
err.details = {
|
|
146
|
-
title: 'description, will be used as url title',
|
|
147
|
-
data: {} // or [], or String
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
throw err;
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### defaultView
|
|
154
|
-
|
|
155
|
-
The test filtering mode when displayed, which will be set by default. The following values are available:
|
|
156
|
-
|
|
157
|
-
| **View mode** | **Description** |
|
|
158
|
-
| --------- | ------------ |
|
|
159
|
-
| all | all tests |
|
|
160
|
-
| passed | only passed tests |
|
|
161
|
-
| failed | only failed tests |
|
|
162
|
-
| retried | only those tests in which there were retries (re-runs) |
|
|
163
|
-
| skipped | only disabled (skipped) tests |
|
|
164
|
-
|
|
165
|
-
By default: `all`, that is, if the parameter is not set, all tests will be displayed.
|
|
166
|
-
|
|
167
|
-
### diffMode
|
|
168
|
-
|
|
169
|
-
The mode of viewing diffs, which will be set by default. The following values are available:
|
|
170
|
-
|
|
171
|
-
| **Diff mode** | **Description** |
|
|
172
|
-
| --------- | ------------ |
|
|
173
|
-
| 3-up | all images _(expected, actual, diff)_ in one column, under each other |
|
|
174
|
-
| 3‑up‑scaled | all images _(expected, actual, diff)_ in one row so that they fit on the screen |
|
|
175
|
-
| only-diff | only diff image |
|
|
176
|
-
| switch | reference image with the ability to switch to the actual image by mouse click |
|
|
177
|
-
| swipe | the actual image on top of the reference image, with a separator opening the reference image |
|
|
178
|
-
| onion-skin | the actual image on top of the reference with the ability to change the transparency of the actual image |
|
|
179
|
-
|
|
180
|
-
By default: `3-up`.
|
|
181
|
-
|
|
182
|
-
### baseHost
|
|
183
|
-
|
|
184
|
-
Replaces the original host address for viewing in the browser. By default, the original host address is not changed.
|
|
185
|
-
|
|
186
|
-
### errorPatterns
|
|
187
|
-
|
|
188
|
-
Error patterns are used:
|
|
189
|
-
|
|
190
|
-
* to show more understandable error information if they correspond to patterns for which there is a detailed description;
|
|
191
|
-
* in the `Group by` display mode with the `error` key selected.
|
|
192
|
-
|
|
193
|
-
Error patterns can be set either as objects or as strings.
|
|
194
|
-
|
|
195
|
-
To set the error pattern as an object, use the following format:
|
|
196
|
-
|
|
197
|
-
```javascript
|
|
198
|
-
{
|
|
199
|
-
name: '<error name>',
|
|
200
|
-
pattern: '<error pattern>',
|
|
201
|
-
hint: '<hint to the user>'
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
where:
|
|
206
|
-
|
|
207
|
-
| **Parameter** | **Type** | **Description** |
|
|
208
|
-
| ------------- | -------- | --------------- |
|
|
209
|
-
| name | String | Error name. |
|
|
210
|
-
| pattern | String or RegExp | A regular expression or a regular string that the error should match. |
|
|
211
|
-
| hint | String | Optional parameter. A hint of what can be done with this error: why it occurred, how to fix it, etc. |
|
|
212
|
-
|
|
213
|
-
If the error pattern is specified as a string, for example: `<error>`, then this string is automatically treated as an object of the form:
|
|
214
|
-
|
|
215
|
-
```javascript
|
|
216
|
-
{
|
|
217
|
-
name: '<error>',
|
|
218
|
-
pattern: '<error>'
|
|
219
|
-
}
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
This way of setting a pattern is convenient for those errors where `name` and `pattern` are completely the same.
|
|
223
|
-
|
|
224
|
-
When one of the error patterns matches the error message, then:
|
|
225
|
-
|
|
226
|
-
* the `name` of the error template will be displayed as the title of the error message, and the original error message will be hidden under the cut;
|
|
227
|
-
* the `hint` for the error will be displayed after the error field `stack`. The hint can be specified as an html string. For example, `<div>some-useful-hint</div>`.
|
|
228
|
-
|
|
229
|
-
In the `Group by` mode with the selected `error` key, the test will be associated with the group if the test error matches the group error pattern. If the test cannot be linked to existing groups, a new group will be created.
|
|
230
|
-
|
|
231
|
-
### metaInfoBaseUrls
|
|
232
|
-
|
|
233
|
-
Base URLs for generating links in the `Meta` section based on meta information about the test run.
|
|
234
|
-
|
|
235
|
-
The parameter is set as an object:
|
|
236
|
-
|
|
237
|
-
```javascript
|
|
238
|
-
{
|
|
239
|
-
'<option-1>': 'value of option 1',
|
|
240
|
-
'<option-2>': 'value of option 2',
|
|
241
|
-
// etc.
|
|
242
|
-
}
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
For example:
|
|
246
|
-
|
|
247
|
-
```javascript
|
|
248
|
-
{
|
|
249
|
-
'file': 'base/path'
|
|
250
|
-
}
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### saveFormat
|
|
254
|
-
|
|
255
|
-
**DEPRECATED**
|
|
256
|
-
|
|
257
|
-
Allows you to set the format in which the results of the tests run will be saved.
|
|
258
|
-
|
|
259
|
-
Only one value is available now, which is used by default:
|
|
260
|
-
* `sqlite` — save the results of the tests run in the database of SQLite format.
|
|
261
|
-
|
|
262
|
-
### customGui
|
|
263
|
-
|
|
264
|
-
**DEPRECATED**
|
|
265
|
-
|
|
266
|
-
:warning: _Instead of customGui, it is recommended to use [report plugins](#plugins)._
|
|
267
|
-
|
|
268
|
-
Description of custom controls for GUI mode.
|
|
269
|
-
|
|
270
|
-
See more in the section "[Customizing GUI](./html-reporter-custom-gui.md)".
|
|
271
|
-
|
|
272
|
-
### pluginsEnabled
|
|
273
|
-
|
|
274
|
-
Enable plugins for `html-reporter`.
|
|
275
|
-
|
|
276
|
-
### plugins
|
|
277
|
-
|
|
278
|
-
A list of plugins with their settings.
|
|
279
|
-
|
|
280
|
-
See more details in the section "[Plugins](./html-reporter-plugins.md)".
|
|
281
|
-
|
|
282
|
-
### customScripts
|
|
283
|
-
|
|
284
|
-
A list of custom scripts in the form of an array of functions. Using this parameter, you can add any script to the html-report page. For example, to collect any metrics or implement additional functionality. The scripts will be executed immediately after rendering the page.
|
|
285
|
-
|
|
286
|
-
For example:
|
|
287
|
-
|
|
288
|
-
```javascript
|
|
289
|
-
customScripts: [
|
|
290
|
-
function() {
|
|
291
|
-
console.info('some logs');
|
|
292
|
-
},
|
|
293
|
-
() => {
|
|
294
|
-
const div = document.createElement('div');
|
|
295
|
-
div.innerHTML = 'hello';
|
|
296
|
-
document.body.prepend(div);
|
|
297
|
-
}
|
|
298
|
-
]
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### yandexMetrika
|
|
302
|
-
|
|
303
|
-
This parameter allows you to add [Yandex.Metrika][yandex-metrika] to the report. The parameter is set as an object with the key `counterNumber`. As the key value, you must specify the Yandex.Metrica counter number (see "[How to create a counter][how-to-create-counter]"). The number should be set as a Number, not a String.
|
|
304
|
-
|
|
305
|
-
Also, in the Yandex.Metrika interface, go to the _"Counter"_ tab in the settings section, click _"Copy"_ and paste the counter code into the [customScripts](#customscripts) field.
|
|
306
|
-
|
|
307
|
-
With the help of metrics, you can find out how developers interact with your report and what kind of problems they face.
|
|
308
|
-
|
|
309
|
-
The report supports the following [goals of metrics][yandex-metrika-goals]:
|
|
310
|
-
|
|
311
|
-
* **ACCEPT_SCREENSHOT**—there was a click on the _Accept_ button to accept a screenshot;
|
|
312
|
-
* **ACCEPT_OPENED_SCREENSHOTS**—there was a click on the _Accept opened_ button to accept screenshots from open tests.
|
|
313
|
-
|
|
314
|
-
Example of setting up Yandex.Metrika in one of the projects:
|
|
315
|
-
|
|
316
|
-
```javascript
|
|
317
|
-
module.exports = {
|
|
318
|
-
plugins: {
|
|
319
|
-
'html-reporter/hermione': {
|
|
320
|
-
customScripts: [
|
|
321
|
-
function(){(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); ym(56782912, "init", { clickmap:true, trackLinks:true, accurateTrackBounce:true, webvisor:true })},
|
|
322
|
-
|
|
323
|
-
// other scripts...
|
|
324
|
-
],
|
|
325
|
-
yandexMetrika: {
|
|
326
|
-
counterNumber: 1234567
|
|
327
|
-
},
|
|
328
|
-
|
|
329
|
-
// other plugin settings...
|
|
330
|
-
},
|
|
331
|
-
|
|
332
|
-
// other hermione plugins...
|
|
333
|
-
},
|
|
334
|
-
|
|
335
|
-
// other hermione settings...
|
|
336
|
-
};
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
### Passing parameters via the CLI
|
|
340
|
-
|
|
341
|
-
All plugin parameters that can be defined in the config can also be passed as command line options or through environment variables during Hermione startup. Use the prefix `--html-reporter-` for command line options and `html_reporter_` for environment variables.
|
|
342
|
-
|
|
343
|
-
For example, the settings parameter [path](#path) can be passed in the following ways:
|
|
344
|
-
|
|
345
|
-
```bash
|
|
346
|
-
hermione path/to/mytest.js --html-reporter-path custom/dir
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
```bash
|
|
350
|
-
html_reporter_path=custom/dir hermione path/to/mytest.js
|
|
351
|
-
```
|
|
352
|
-
|
|
353
|
-
## Data storage
|
|
354
|
-
|
|
355
|
-
As mentioned above, `html-reporter` saves the tests run results to the [SQLite][sqlite] database.
|
|
356
|
-
|
|
357
|
-
Why do we use SQLite? Because it is:
|
|
358
|
-
|
|
359
|
-
* serverless, easy to connect and requires no configuration
|
|
360
|
-
* cross-platform, runs on any operating system
|
|
361
|
-
* single-file, easy to reuse reports and share them
|
|
362
|
-
* faster than if you store the report on the file system
|
|
363
|
-
* compact and has full SQL.
|
|
364
|
-
|
|
365
|
-
Files that are created during the execution of tests:
|
|
366
|
-
|
|
367
|
-
* `sqlite.db`—Sqlite database with tests run results
|
|
368
|
-
* `data.js`—report configuration
|
|
369
|
-
* `databaseUrls.json`—absolute or relative URLs to SQLite databases (`sqlite.db`) and/or URLs of other `databaseUrls.json` files (see command [merge-reports][merge-reports]).
|
|
370
|
-
|
|
371
|
-
[html-reporter]: https://github.com/gemini-testing/html-reporter
|
|
372
|
-
[hermione]: https://github.com/gemini-testing/hermione
|
|
373
|
-
[sqlite]: https://www.sqlite.org/index.html
|
|
374
|
-
[yandex-metrika]: https://yandex.ru/support/metrica/index.html
|
|
375
|
-
[yandex-metrika-goals]: https://yandex.ru/support/metrica/general/goals.html
|
|
376
|
-
[how-to-create-counter]: https://yandex.ru/support/metrica/general/creating-counter.html
|
|
377
|
-
[merge-reports]: ./html-reporter-commands.md#merge-reports
|
|
378
|
-
[http-server]: https://github.com/http-party/http-server#http-server-a-simple-static-http-server
|
package/docs/en/html-reporter.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# html-reporter
|
|
2
|
-
|
|
3
|
-
* [Setup](./html-reporter-setup.md)
|
|
4
|
-
* [Commands](./html-reporter-commands.md)
|
|
5
|
-
* [Plugins](./html-reporter-plugins.md)
|
|
6
|
-
* [Customizing GUI](./html-reporter-custom-gui.md)
|
|
7
|
-
* [API](./html-reporter-api.md)
|
|
8
|
-
* [Events](./html-reporter-events.md)
|