@allurereport/web-awesome 3.0.0-beta.8 → 3.0.0
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/dist/multi/173.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/174.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/252.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/282.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/29.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/416.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/527.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/600.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/605.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/638.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/672.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/686.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/725.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/741.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/755.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/894.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/91.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/943.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/980.app-9931797d1602fc52db5b.js +1 -0
- package/dist/multi/app-9931797d1602fc52db5b.js +2 -0
- package/dist/multi/app-9931797d1602fc52db5b.js.LICENSE.txt +10 -0
- package/dist/multi/manifest.json +25 -24
- package/dist/multi/styles-8fe37354d1c2270c691e.css +48 -0
- package/dist/single/app-6199dc1c2fd3bddc2526.js +2 -0
- package/dist/single/app-6199dc1c2fd3bddc2526.js.LICENSE.txt +10 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +30 -17
- package/src/assets/scss/day.scss +2 -0
- package/src/assets/scss/index.scss +1 -3
- package/src/assets/scss/night.scss +2 -0
- package/src/assets/scss/palette.scss +391 -391
- package/src/assets/scss/theme.scss +292 -79
- package/src/components/BaseLayout/index.tsx +10 -31
- package/src/components/BaseLayout/styles.scss +14 -4
- package/src/components/Charts/index.tsx +245 -0
- package/src/components/Charts/styles.scss +27 -0
- package/src/components/EnvironmentPicker/index.tsx +60 -0
- package/src/components/EnvironmentPicker/styles.scss +9 -0
- package/src/components/Footer/FooterLogo.tsx +1 -2
- package/src/components/Footer/FooterVersion.tsx +7 -3
- package/src/components/Footer/index.tsx +6 -2
- package/src/components/Header/CiInfo/index.tsx +67 -0
- package/src/components/Header/CiInfo/styles.scss +7 -0
- package/src/components/Header/index.tsx +21 -8
- package/src/components/Header/styles.scss +9 -1
- package/src/components/HeaderControls/index.tsx +20 -0
- package/src/components/MainReport/index.tsx +84 -6
- package/src/components/MainReport/styles.scss +20 -0
- package/src/components/Metadata/index.tsx +6 -4
- package/src/components/MetadataButton/index.tsx +14 -6
- package/src/components/MetadataButton/styles.scss +3 -0
- package/src/components/Modal/index.tsx +15 -167
- package/src/components/NavTabs/index.tsx +70 -0
- package/src/components/{TestResult/TestResultTabs → NavTabs}/styles.scss +0 -3
- package/src/components/Report/index.tsx +7 -0
- package/src/components/ReportBody/Filters.tsx +45 -66
- package/src/components/ReportBody/index.tsx +29 -17
- package/src/components/ReportBody/styles.scss +9 -3
- package/src/components/ReportGlobalAttachments/index.tsx +34 -0
- package/src/components/ReportGlobalAttachments/styles.scss +11 -0
- package/src/components/ReportGlobalErrors/index.tsx +30 -0
- package/src/components/ReportGlobalErrors/styles.scss +12 -0
- package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
- package/src/components/ReportHeader/ReportHeaderPie.tsx +1 -2
- package/src/components/ReportHeader/index.tsx +38 -12
- package/src/components/ReportHeader/styles.scss +9 -1
- package/src/components/ReportMetadata/MetadataSummary.tsx +57 -65
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +11 -13
- package/src/components/ReportMetadata/index.tsx +50 -3
- package/src/components/ReportMetadata/styles.scss +0 -2
- package/src/components/ReportQualityGateResults/index.tsx +42 -0
- package/src/components/ReportQualityGateResults/styles.scss +44 -0
- package/src/components/SectionPicker/index.tsx +55 -0
- package/src/components/SectionPicker/styles.scss +5 -0
- package/src/components/SectionSwitcher/index.tsx +16 -0
- package/src/components/SectionSwitcher/styles.scss +4 -0
- package/src/components/SectionTabs/index.tsx +0 -0
- package/src/components/SideBySide/index.tsx +52 -0
- package/src/components/SideBySide/styles.scss +64 -0
- package/src/components/SplitLayout/index.tsx +73 -0
- package/src/components/SplitLayout/styles.scss +84 -0
- package/src/components/Tabs/index.tsx +5 -0
- package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
- package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
- package/src/components/TestResult/TrAttachmentsView/index.tsx +29 -0
- package/src/components/TestResult/{TestResultDescription → TrDescription}/index.tsx +5 -5
- package/src/components/TestResult/{TestResultDropdown → TrDropdown}/index.tsx +7 -5
- package/src/components/TestResult/{TestResultEmpty → TrEmpty}/index.tsx +10 -9
- package/src/components/TestResult/TrEnvironmentItem/index.tsx +82 -0
- package/src/components/TestResult/TrEnvironmentItem/styles.scss +60 -0
- package/src/components/TestResult/TrEnvironmentsView/index.tsx +64 -0
- package/src/components/TestResult/TrEnvironmentsView/styles.scss +11 -0
- package/src/components/TestResult/TrError/TrDiff.tsx +121 -0
- package/src/components/TestResult/TrError/index.tsx +104 -0
- package/src/components/TestResult/TrError/styles.scss +223 -0
- package/src/components/TestResult/TrHeader/TrBreadcrumbs.tsx +44 -0
- package/src/components/TestResult/TrHeader/index.tsx +15 -0
- package/src/components/TestResult/{TestResultHeader → TrHeader}/styles.scss +7 -2
- package/src/components/TestResult/TrHistory/TrHistoryItem.tsx +94 -0
- package/src/components/TestResult/TrHistory/index.tsx +26 -0
- package/src/components/TestResult/{TestResultHistory → TrHistory}/styles.scss +2 -1
- package/src/components/TestResult/{TestResultInfo/TestResultInfoStatuses.tsx → TrInfo/TrInfoStatuses.tsx} +6 -4
- package/src/components/TestResult/TrInfo/index.tsx +99 -0
- package/src/components/TestResult/{TestResultInfo → TrInfo}/styles.scss +18 -0
- package/src/components/TestResult/{TestResultLinks → TrLinks}/index.tsx +8 -8
- package/src/components/TestResult/{TestResultMetadata → TrMetadata}/index.tsx +6 -6
- package/src/components/TestResult/{TestResultNavigation → TrNavigation}/index.tsx +7 -9
- package/src/components/TestResult/TrOverview.tsx +46 -0
- package/src/components/TestResult/{TestResultParameters → TrParameters}/index.tsx +4 -4
- package/src/components/TestResult/TrPrevStatuses/index.tsx +63 -0
- package/src/components/TestResult/TrPwTraces/PwTrace.tsx +34 -0
- package/src/components/TestResult/TrPwTraces/PwTraceButton.tsx +32 -0
- package/src/components/TestResult/TrPwTraces/index.tsx +32 -0
- package/src/components/TestResult/TrPwTraces/styles.scss +20 -0
- package/src/components/TestResult/TrRetriesView/TrRetriesItem.tsx +70 -0
- package/src/components/TestResult/TrRetriesView/index.tsx +29 -0
- package/src/components/TestResult/{TestResultSetup → TrSetup}/index.tsx +24 -15
- package/src/components/TestResult/{TestResultSeverity → TrSeverity}/index.tsx +2 -2
- package/src/components/TestResult/{TestResultStatus → TrStatus}/index.tsx +5 -5
- package/src/components/TestResult/TrSteps/TrAttachment.tsx +118 -0
- package/src/components/TestResult/{TestResultSteps/testResultAttachmentInfo.tsx → TrSteps/TrAttachmentInfo.tsx} +11 -11
- package/src/components/TestResult/TrSteps/TrStep.tsx +98 -0
- package/src/components/TestResult/TrSteps/TrStepInfo.tsx +90 -0
- package/src/components/TestResult/TrSteps/index.tsx +58 -0
- package/src/components/TestResult/{TestResultSteps → TrSteps}/styles.scss +49 -10
- package/src/components/TestResult/{TestResultSteps → TrSteps}/wrongAttachment.tsx +1 -1
- package/src/components/TestResult/TrTabs/index.tsx +42 -0
- package/src/components/TestResult/{TestResultTeardown → TrTeardown}/index.tsx +25 -15
- package/src/components/TestResult/index.tsx +54 -38
- package/src/components/TestResult/styles.scss +12 -0
- package/src/components/Timeline/index.tsx +100 -0
- package/src/components/Timeline/styles.scss +45 -0
- package/src/components/ToggleLayout/index.tsx +17 -0
- package/src/components/Tree/index.tsx +122 -16
- package/src/components/Tree/styles.scss +23 -5
- package/src/index.html +23 -6
- package/src/index.tsx +91 -20
- package/src/locales/az.json +376 -0
- package/src/locales/de.json +376 -0
- package/src/locales/en.json +376 -0
- package/src/locales/es.json +376 -0
- package/src/locales/fr.json +376 -0
- package/src/locales/he.json +376 -0
- package/src/locales/hy.json +376 -0
- package/src/locales/it.json +376 -0
- package/src/locales/ja.json +376 -0
- package/src/locales/ka.json +376 -0
- package/src/locales/kr.json +376 -0
- package/src/locales/nl.json +376 -0
- package/src/locales/pl.json +384 -0
- package/src/locales/pt.json +376 -0
- package/src/locales/ru.json +384 -0
- package/src/locales/sv.json +376 -0
- package/src/locales/tr.json +376 -0
- package/src/locales/ua.json +327 -0
- package/src/locales/zh.json +376 -0
- package/src/stores/chart.ts +41 -6
- package/src/stores/env.ts +88 -0
- package/src/stores/envInfo.ts +2 -2
- package/src/stores/globals.ts +28 -0
- package/src/stores/layout.ts +36 -0
- package/src/stores/locale.ts +77 -29
- package/src/stores/modal.ts +22 -0
- package/src/stores/qualityGate.ts +28 -0
- package/src/stores/router.ts +108 -0
- package/src/stores/sections.ts +63 -0
- package/src/stores/stats.ts +52 -7
- package/src/stores/testResults.ts +13 -9
- package/src/stores/theme.ts +15 -18
- package/src/stores/timeline.ts +39 -0
- package/src/stores/tree.ts +101 -31
- package/src/stores/variables.ts +40 -0
- package/src/styles.scss +66 -0
- package/src/utils/loadFromLocalStorage.ts +8 -0
- package/src/utils/time.ts +1 -0
- package/src/utils/tree.ts +23 -0
- package/src/utils/treeFilters.ts +27 -21
- package/test/components/Header/CiInfo.test.tsx +177 -0
- package/test/components/Header.test.tsx +122 -0
- package/test/utils/treeFilters.test.ts +44 -44
- package/tsconfig.json +7 -2
- package/tsconfig.node.json +8 -0
- package/types.d.ts +53 -21
- package/vitest.config.ts +15 -2
- package/vitest.setup.ts +1 -0
- package/webpack.config.js +37 -5
- package/dist/multi/141.app-4375537b.js +0 -1
- package/dist/multi/222.app-4375537b.js +0 -1
- package/dist/multi/335.app-4375537b.js +0 -1
- package/dist/multi/34.app-4375537b.js +0 -1
- package/dist/multi/349.app-4375537b.js +0 -1
- package/dist/multi/378.app-4375537b.js +0 -1
- package/dist/multi/406.app-4375537b.js +0 -1
- package/dist/multi/476.app-4375537b.js +0 -1
- package/dist/multi/53.app-4375537b.js +0 -1
- package/dist/multi/584.app-4375537b.js +0 -1
- package/dist/multi/690.app-4375537b.js +0 -1
- package/dist/multi/747.app-4375537b.js +0 -1
- package/dist/multi/767.app-4375537b.js +0 -1
- package/dist/multi/816.app-4375537b.js +0 -1
- package/dist/multi/83.app-4375537b.js +0 -1
- package/dist/multi/873.app-4375537b.js +0 -1
- package/dist/multi/920.app-4375537b.js +0 -1
- package/dist/multi/991.app-4375537b.js +0 -1
- package/dist/multi/app-4375537b.js +0 -2
- package/dist/multi/app-4375537b.js.LICENSE.txt +0 -16
- package/dist/multi/styles-4375537b.css +0 -283
- package/dist/single/app-f16f6693.js +0 -2
- package/dist/single/app-f16f6693.js.LICENSE.txt +0 -16
- package/src/assets/scss/code.scss +0 -71
- package/src/assets/scss/typography.scss +0 -218
- package/src/components/ArrowButton/index.tsx +0 -36
- package/src/components/ArrowButton/styles.scss +0 -35
- package/src/components/LanguagePicker/index.tsx +0 -40
- package/src/components/Modal/styles.scss +0 -126
- package/src/components/ReportLogo/index.tsx +0 -16
- package/src/components/ReportLogo/styles.scss +0 -20
- package/src/components/ReportLogoFull/index.tsx +0 -20
- package/src/components/ReportLogoFull/styles.scss +0 -7
- package/src/components/TestResult/TestResultAttachmentsView/index.tsx +0 -27
- package/src/components/TestResult/TestResultError/index.tsx +0 -59
- package/src/components/TestResult/TestResultError/styles.scss +0 -51
- package/src/components/TestResult/TestResultHeader/index.tsx +0 -55
- package/src/components/TestResult/TestResultHistory/TestResultHistoryItem.tsx +0 -67
- package/src/components/TestResult/TestResultHistory/index.tsx +0 -26
- package/src/components/TestResult/TestResultInfo/index.tsx +0 -79
- package/src/components/TestResult/TestResultOverview.tsx +0 -40
- package/src/components/TestResult/TestResultPrevStatuses/index.tsx +0 -49
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -52
- package/src/components/TestResult/TestResultRetriesView/index.tsx +0 -24
- package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +0 -12
- package/src/components/TestResult/TestResultSteps/attachment.tsx +0 -68
- package/src/components/TestResult/TestResultSteps/attachmentCode.tsx +0 -20
- package/src/components/TestResult/TestResultSteps/attachmentImage.tsx +0 -32
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +0 -15
- package/src/components/TestResult/TestResultSteps/index.tsx +0 -49
- package/src/components/TestResult/TestResultSteps/testResultAttachment.tsx +0 -77
- package/src/components/TestResult/TestResultSteps/testResultStep.tsx +0 -78
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -30
- package/src/components/TestResult/TestResultTabs/index.tsx +0 -59
- package/src/components/ThemeButton/ThemeButton.tsx +0 -20
- package/src/components/Tree/Tree.tsx +0 -68
- package/src/components/Tree/TreeHeader.tsx +0 -82
- package/src/components/Tree/TreeItem.tsx +0 -35
- package/src/components/Tree/TreeItemIcon.tsx +0 -32
- package/src/i18n/constants.ts +0 -124
- package/src/i18n/locales/am.json +0 -118
- package/src/i18n/locales/az.json +0 -118
- package/src/i18n/locales/de.json +0 -118
- package/src/i18n/locales/en.json +0 -119
- package/src/i18n/locales/es.json +0 -118
- package/src/i18n/locales/fr.json +0 -118
- package/src/i18n/locales/he.json +0 -118
- package/src/i18n/locales/it.json +0 -118
- package/src/i18n/locales/ja.json +0 -118
- package/src/i18n/locales/ka.json +0 -118
- package/src/i18n/locales/kr.json +0 -118
- package/src/i18n/locales/nl.json +0 -118
- package/src/i18n/locales/pl.json +0 -116
- package/src/i18n/locales/pt.json +0 -118
- package/src/i18n/locales/ru.json +0 -116
- package/src/i18n/locales/sv.json +0 -118
- package/src/i18n/locales/tr.json +0 -118
- package/src/i18n/locales/zh.json +0 -118
- package/src/utils/attachments.ts +0 -156
- package/src/utils/capitalize.ts +0 -6
- /package/dist/multi/{JetBrainsMono_vf-b9a9c326..woff → JetBrainsMono_vf.woff} +0 -0
- /package/dist/multi/{JetBrainsMono_vf-9e9649b6..woff2 → JetBrainsMono_vf.woff2} +0 -0
- /package/dist/multi/{pt-root-ui_vf-22fe60ca..woff → pt-root-ui_vf.woff} +0 -0
- /package/dist/multi/{pt-root-ui_vf-9d251e8b..woff2 → pt-root-ui_vf.woff2} +0 -0
- /package/src/components/TestResult/{TestResultAttachmentsView → TrAttachmentsView}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultDescription → TrDescription}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultDropdown → TrDropdown}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultEmpty → TrEmpty}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultLinks → TrLinks}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultMetadata → TrMetadata}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultNavigation → TrNavigation}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultParameters → TrParameters}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultPrevStatuses → TrPrevStatuses}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultRetriesView → TrRetriesView}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultSeverity → TrSeverity}/styles.scss +0 -0
- /package/src/components/TestResult/{TestResultStatus → TrStatus}/styles.scss +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { getReportOptions } from "@allurereport/web-commons";
|
|
2
|
+
import { cleanup, render, screen } from "@testing-library/preact";
|
|
3
|
+
import { Mock, beforeEach, describe, expect, it, vi } from "vitest";
|
|
4
|
+
import { Header } from "@/components/Header";
|
|
5
|
+
import { CiInfo } from "@/components/Header/CiInfo";
|
|
6
|
+
import { route } from "@/stores/router";
|
|
7
|
+
import { availableSections } from "@/stores/sections";
|
|
8
|
+
|
|
9
|
+
const fixtures = {
|
|
10
|
+
ci: {
|
|
11
|
+
type: "github",
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
vi.mock("@allurereport/web-commons", () => ({
|
|
16
|
+
getReportOptions: vi.fn().mockReturnValue({}),
|
|
17
|
+
}));
|
|
18
|
+
vi.mock("@/stores/router", async () => {
|
|
19
|
+
const { signal } = await import("@preact/signals");
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
route: signal({}),
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
vi.mock("@/stores/sections", async () => {
|
|
26
|
+
const { signal } = await import("@preact/signals");
|
|
27
|
+
|
|
28
|
+
return {
|
|
29
|
+
availableSections: signal([]),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
vi.mock("@/components/HeaderControls", () => ({
|
|
33
|
+
HeaderControls: () => <div data-testid="header-controls"></div>,
|
|
34
|
+
}));
|
|
35
|
+
vi.mock("@/components/SectionPicker", () => ({
|
|
36
|
+
SectionPicker: () => <div data-testid="section-picker"></div>,
|
|
37
|
+
}));
|
|
38
|
+
vi.mock("@/components/TestResult/TrHeader/TrBreadcrumbs", () => ({
|
|
39
|
+
TrBreadcrumbs: () => <div data-testid="breadcrumbs"></div>,
|
|
40
|
+
}));
|
|
41
|
+
vi.mock("@/components/Header/CiInfo", () => ({
|
|
42
|
+
// CiInfo: vi.fn().mockReturnValue(<div data-testid="ci-info"></div>),
|
|
43
|
+
CiInfo: vi.fn().mockImplementation(() => <div data-testid="ci-info"></div>),
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
beforeEach(() => {
|
|
47
|
+
vi.clearAllMocks();
|
|
48
|
+
cleanup();
|
|
49
|
+
route.value = {};
|
|
50
|
+
availableSections.value = [];
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe("components > Header", () => {
|
|
54
|
+
it("should render sections picker when there are sections available", () => {
|
|
55
|
+
availableSections.value = ["section1", "section2"];
|
|
56
|
+
|
|
57
|
+
render(<Header />);
|
|
58
|
+
|
|
59
|
+
expect(screen.getByTestId("section-picker")).toBeInTheDocument();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("shouldn't render sections picker when there are no sections available", () => {
|
|
63
|
+
render(<Header />);
|
|
64
|
+
|
|
65
|
+
expect(screen.queryByTestId("section-picker")).not.toBeInTheDocument();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("should render ci info only when testResultId route parameter doesn't exists and ci report option is available", () => {
|
|
69
|
+
route.value = {
|
|
70
|
+
params: {},
|
|
71
|
+
};
|
|
72
|
+
(getReportOptions as Mock).mockReturnValue({
|
|
73
|
+
ci: fixtures.ci,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
render(<Header />);
|
|
77
|
+
|
|
78
|
+
expect(CiInfo).toHaveBeenCalled();
|
|
79
|
+
expect(screen.getByTestId("ci-info")).toBeInTheDocument();
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it("shouldn't render ci info when testResultId route parameter exists", () => {
|
|
83
|
+
route.value = {
|
|
84
|
+
params: {
|
|
85
|
+
testResultId: "1",
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
(getReportOptions as Mock).mockReturnValue({
|
|
89
|
+
ci: fixtures.ci,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
render(<Header />);
|
|
93
|
+
|
|
94
|
+
expect(CiInfo).not.toHaveBeenCalled();
|
|
95
|
+
expect(screen.queryByTestId("ci-info")).not.toBeInTheDocument();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("should render breadcrumbs when testResultId route parameter exists", () => {
|
|
99
|
+
route.value = {
|
|
100
|
+
params: {
|
|
101
|
+
testResultId: "1",
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
(getReportOptions as Mock).mockReturnValue({
|
|
105
|
+
ci: fixtures.ci,
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
render(<Header />);
|
|
109
|
+
|
|
110
|
+
expect(screen.getByTestId("breadcrumbs")).toBeInTheDocument();
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it("shouldn't render breadcrumbs when testResultId route parameter doesn't exists", () => {
|
|
114
|
+
route.value = {
|
|
115
|
+
params: {},
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
render(<Header />);
|
|
119
|
+
|
|
120
|
+
expect(screen.queryByTestId("breadcrumbs")).not.toBeInTheDocument();
|
|
121
|
+
});
|
|
122
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import { createRecursiveTree, filterLeaves } from "../../src/utils/treeFilters.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { AwesomeTestResult } from "../../types.js";
|
|
4
4
|
|
|
5
5
|
describe("utils > treeFilters", () => {
|
|
6
6
|
describe("filterLeaves", () => {
|
|
@@ -11,15 +11,15 @@ describe("utils > treeFilters", () => {
|
|
|
11
11
|
a1: {
|
|
12
12
|
name: "a1",
|
|
13
13
|
start: baseDate,
|
|
14
|
-
} as
|
|
14
|
+
} as AwesomeTestResult,
|
|
15
15
|
b2: {
|
|
16
16
|
name: "b2",
|
|
17
17
|
start: baseDate + 1000,
|
|
18
|
-
} as
|
|
18
|
+
} as AwesomeTestResult,
|
|
19
19
|
c3: {
|
|
20
20
|
name: "c3",
|
|
21
21
|
start: baseDate + 2000,
|
|
22
|
-
} as
|
|
22
|
+
} as AwesomeTestResult,
|
|
23
23
|
};
|
|
24
24
|
const result = filterLeaves(leaves, leavesById, {
|
|
25
25
|
query: "",
|
|
@@ -48,17 +48,17 @@ describe("utils > treeFilters", () => {
|
|
|
48
48
|
name: "a1",
|
|
49
49
|
status: "passed",
|
|
50
50
|
start: baseDate,
|
|
51
|
-
} as
|
|
51
|
+
} as AwesomeTestResult,
|
|
52
52
|
b2: {
|
|
53
53
|
name: "b2",
|
|
54
54
|
status: "failed",
|
|
55
55
|
start: baseDate + 1000,
|
|
56
|
-
} as
|
|
56
|
+
} as AwesomeTestResult,
|
|
57
57
|
c3: {
|
|
58
58
|
name: "c3",
|
|
59
59
|
status: "passed",
|
|
60
60
|
start: baseDate + 2000,
|
|
61
|
-
} as
|
|
61
|
+
} as AwesomeTestResult,
|
|
62
62
|
};
|
|
63
63
|
const result = filterLeaves(leaves, leavesById, {
|
|
64
64
|
query: "",
|
|
@@ -83,17 +83,17 @@ describe("utils > treeFilters", () => {
|
|
|
83
83
|
name: "a1",
|
|
84
84
|
start: baseDate,
|
|
85
85
|
flaky: true,
|
|
86
|
-
} as
|
|
86
|
+
} as AwesomeTestResult,
|
|
87
87
|
b2: {
|
|
88
88
|
name: "b2",
|
|
89
89
|
start: baseDate + 1000,
|
|
90
90
|
flaky: false,
|
|
91
|
-
} as
|
|
91
|
+
} as AwesomeTestResult,
|
|
92
92
|
c3: {
|
|
93
93
|
name: "c3",
|
|
94
94
|
start: baseDate + 2000,
|
|
95
95
|
flaky: true,
|
|
96
|
-
} as
|
|
96
|
+
} as AwesomeTestResult,
|
|
97
97
|
};
|
|
98
98
|
const result = filterLeaves(leaves, leavesById, {
|
|
99
99
|
query: "",
|
|
@@ -118,17 +118,17 @@ describe("utils > treeFilters", () => {
|
|
|
118
118
|
name: "a1",
|
|
119
119
|
start: baseDate,
|
|
120
120
|
retry: true,
|
|
121
|
-
} as
|
|
121
|
+
} as AwesomeTestResult,
|
|
122
122
|
b2: {
|
|
123
123
|
name: "b2",
|
|
124
124
|
start: baseDate + 1000,
|
|
125
125
|
retry: false,
|
|
126
|
-
} as
|
|
126
|
+
} as AwesomeTestResult,
|
|
127
127
|
c3: {
|
|
128
128
|
name: "c3",
|
|
129
129
|
start: baseDate + 2000,
|
|
130
130
|
retry: false,
|
|
131
|
-
} as
|
|
131
|
+
} as AwesomeTestResult,
|
|
132
132
|
};
|
|
133
133
|
const result = filterLeaves(leaves, leavesById, {
|
|
134
134
|
filter: {
|
|
@@ -145,15 +145,15 @@ describe("utils > treeFilters", () => {
|
|
|
145
145
|
a1: {
|
|
146
146
|
name: "a1",
|
|
147
147
|
duration: 1000,
|
|
148
|
-
} as
|
|
148
|
+
} as AwesomeTestResult,
|
|
149
149
|
b2: {
|
|
150
150
|
name: "b2",
|
|
151
151
|
duration: 2000,
|
|
152
|
-
} as
|
|
152
|
+
} as AwesomeTestResult,
|
|
153
153
|
c3: {
|
|
154
154
|
name: "c3",
|
|
155
155
|
duration: 3000,
|
|
156
|
-
} as
|
|
156
|
+
} as AwesomeTestResult,
|
|
157
157
|
};
|
|
158
158
|
const result = filterLeaves(leaves, leavesById, {
|
|
159
159
|
direction: "asc",
|
|
@@ -173,15 +173,15 @@ describe("utils > treeFilters", () => {
|
|
|
173
173
|
a1: {
|
|
174
174
|
name: "a1",
|
|
175
175
|
duration: 1000,
|
|
176
|
-
} as
|
|
176
|
+
} as AwesomeTestResult,
|
|
177
177
|
b2: {
|
|
178
178
|
name: "b2",
|
|
179
179
|
duration: 2000,
|
|
180
|
-
} as
|
|
180
|
+
} as AwesomeTestResult,
|
|
181
181
|
c3: {
|
|
182
182
|
name: "c3",
|
|
183
183
|
duration: 3000,
|
|
184
|
-
} as
|
|
184
|
+
} as AwesomeTestResult,
|
|
185
185
|
};
|
|
186
186
|
const result = filterLeaves(leaves, leavesById, {
|
|
187
187
|
direction: "desc",
|
|
@@ -200,13 +200,13 @@ describe("utils > treeFilters", () => {
|
|
|
200
200
|
const leavesById = {
|
|
201
201
|
a1: {
|
|
202
202
|
name: "a1",
|
|
203
|
-
} as
|
|
203
|
+
} as AwesomeTestResult,
|
|
204
204
|
b2: {
|
|
205
205
|
name: "b2",
|
|
206
|
-
} as
|
|
206
|
+
} as AwesomeTestResult,
|
|
207
207
|
c3: {
|
|
208
208
|
name: "c3",
|
|
209
|
-
} as
|
|
209
|
+
} as AwesomeTestResult,
|
|
210
210
|
};
|
|
211
211
|
const result = filterLeaves(leaves, leavesById, {
|
|
212
212
|
direction: "asc",
|
|
@@ -225,13 +225,13 @@ describe("utils > treeFilters", () => {
|
|
|
225
225
|
const leavesById = {
|
|
226
226
|
a1: {
|
|
227
227
|
name: "a1",
|
|
228
|
-
} as
|
|
228
|
+
} as AwesomeTestResult,
|
|
229
229
|
b2: {
|
|
230
230
|
name: "b2",
|
|
231
|
-
} as
|
|
231
|
+
} as AwesomeTestResult,
|
|
232
232
|
c3: {
|
|
233
233
|
name: "c3",
|
|
234
|
-
} as
|
|
234
|
+
} as AwesomeTestResult,
|
|
235
235
|
};
|
|
236
236
|
const result = filterLeaves(leaves, leavesById, {
|
|
237
237
|
direction: "desc",
|
|
@@ -251,23 +251,23 @@ describe("utils > treeFilters", () => {
|
|
|
251
251
|
a1: {
|
|
252
252
|
name: "a1",
|
|
253
253
|
status: "passed",
|
|
254
|
-
} as
|
|
254
|
+
} as AwesomeTestResult,
|
|
255
255
|
b2: {
|
|
256
256
|
name: "b2",
|
|
257
257
|
status: "failed",
|
|
258
|
-
} as
|
|
258
|
+
} as AwesomeTestResult,
|
|
259
259
|
c3: {
|
|
260
260
|
name: "c3",
|
|
261
261
|
status: "broken",
|
|
262
|
-
} as
|
|
262
|
+
} as AwesomeTestResult,
|
|
263
263
|
d4: {
|
|
264
264
|
name: "d4",
|
|
265
265
|
status: "unknown",
|
|
266
|
-
} as
|
|
266
|
+
} as AwesomeTestResult,
|
|
267
267
|
e5: {
|
|
268
268
|
name: "e5",
|
|
269
269
|
status: "skipped",
|
|
270
|
-
} as
|
|
270
|
+
} as AwesomeTestResult,
|
|
271
271
|
};
|
|
272
272
|
const result = filterLeaves(leaves, leavesById, {
|
|
273
273
|
direction: "asc",
|
|
@@ -289,23 +289,23 @@ describe("utils > treeFilters", () => {
|
|
|
289
289
|
a1: {
|
|
290
290
|
name: "a1",
|
|
291
291
|
status: "passed",
|
|
292
|
-
} as
|
|
292
|
+
} as AwesomeTestResult,
|
|
293
293
|
b2: {
|
|
294
294
|
name: "b2",
|
|
295
295
|
status: "failed",
|
|
296
|
-
} as
|
|
296
|
+
} as AwesomeTestResult,
|
|
297
297
|
c3: {
|
|
298
298
|
name: "c3",
|
|
299
299
|
status: "broken",
|
|
300
|
-
} as
|
|
300
|
+
} as AwesomeTestResult,
|
|
301
301
|
d4: {
|
|
302
302
|
name: "d4",
|
|
303
303
|
status: "unknown",
|
|
304
|
-
} as
|
|
304
|
+
} as AwesomeTestResult,
|
|
305
305
|
e5: {
|
|
306
306
|
name: "e5",
|
|
307
307
|
status: "skipped",
|
|
308
|
-
} as
|
|
308
|
+
} as AwesomeTestResult,
|
|
309
309
|
};
|
|
310
310
|
const result = filterLeaves(leaves, leavesById, {
|
|
311
311
|
direction: "desc",
|
|
@@ -329,17 +329,17 @@ describe("utils > treeFilters", () => {
|
|
|
329
329
|
name: "a1",
|
|
330
330
|
start: baseDate + 2000,
|
|
331
331
|
groupOrder: 3,
|
|
332
|
-
} as
|
|
332
|
+
} as AwesomeTestResult,
|
|
333
333
|
b2: {
|
|
334
334
|
name: "b2",
|
|
335
335
|
start: baseDate + 1000,
|
|
336
336
|
groupOrder: 2,
|
|
337
|
-
} as
|
|
337
|
+
} as AwesomeTestResult,
|
|
338
338
|
c3: {
|
|
339
339
|
name: "c3",
|
|
340
340
|
start: baseDate,
|
|
341
341
|
groupOrder: 1,
|
|
342
|
-
} as
|
|
342
|
+
} as AwesomeTestResult,
|
|
343
343
|
};
|
|
344
344
|
const result = filterLeaves(leaves, leavesById, {
|
|
345
345
|
direction: "asc",
|
|
@@ -361,17 +361,17 @@ describe("utils > treeFilters", () => {
|
|
|
361
361
|
name: "a1",
|
|
362
362
|
start: baseDate + 2000,
|
|
363
363
|
groupOrder: 3,
|
|
364
|
-
} as
|
|
364
|
+
} as AwesomeTestResult,
|
|
365
365
|
b2: {
|
|
366
366
|
name: "b2",
|
|
367
367
|
start: baseDate + 1000,
|
|
368
368
|
groupOrder: 2,
|
|
369
|
-
} as
|
|
369
|
+
} as AwesomeTestResult,
|
|
370
370
|
c3: {
|
|
371
371
|
name: "c3",
|
|
372
372
|
start: baseDate,
|
|
373
373
|
groupOrder: 1,
|
|
374
|
-
} as
|
|
374
|
+
} as AwesomeTestResult,
|
|
375
375
|
};
|
|
376
376
|
const result = filterLeaves(leaves, leavesById, {
|
|
377
377
|
direction: "desc",
|
|
@@ -397,15 +397,15 @@ describe("utils > treeFilters", () => {
|
|
|
397
397
|
a1: {
|
|
398
398
|
name: "a1",
|
|
399
399
|
start: baseDate,
|
|
400
|
-
} as
|
|
400
|
+
} as AwesomeTestResult,
|
|
401
401
|
b2: {
|
|
402
402
|
name: "b2",
|
|
403
403
|
start: baseDate + 1000,
|
|
404
|
-
} as
|
|
404
|
+
} as AwesomeTestResult,
|
|
405
405
|
c3: {
|
|
406
406
|
name: "c3",
|
|
407
407
|
start: baseDate + 2000,
|
|
408
|
-
} as
|
|
408
|
+
} as AwesomeTestResult,
|
|
409
409
|
};
|
|
410
410
|
const groupsById = {
|
|
411
411
|
a1: {
|
package/tsconfig.json
CHANGED
|
@@ -17,11 +17,16 @@
|
|
|
17
17
|
"noImplicitAny": true,
|
|
18
18
|
"resolveJsonModule": true,
|
|
19
19
|
"esModuleInterop": true,
|
|
20
|
-
"lib": ["ES2019", "dom"],
|
|
20
|
+
"lib": ["ES2019", "dom", "dom.iterable"],
|
|
21
21
|
// node types should not be used in web-commons
|
|
22
22
|
"types": [],
|
|
23
23
|
"skipLibCheck": true
|
|
24
24
|
},
|
|
25
25
|
"include": ["src"],
|
|
26
|
-
"exclude": ["node_modules", "dist"]
|
|
26
|
+
"exclude": ["node_modules", "dist"],
|
|
27
|
+
"references": [
|
|
28
|
+
{
|
|
29
|
+
"path": "./tsconfig.node.json"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
27
32
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AttachmentTestStepResult,
|
|
3
|
+
CiDescriptor,
|
|
3
4
|
DefaultTreeGroup,
|
|
4
5
|
HistoryTestResult,
|
|
5
6
|
TestFixtureResult,
|
|
@@ -10,30 +11,48 @@ import type {
|
|
|
10
11
|
WithChildren,
|
|
11
12
|
} from "@allurereport/core-api";
|
|
12
13
|
|
|
13
|
-
export type
|
|
14
|
+
export type Layout = "base" | "split";
|
|
15
|
+
|
|
16
|
+
export type AwesomeReportOptions = {
|
|
17
|
+
allureVersion: string;
|
|
14
18
|
reportName?: string;
|
|
15
19
|
logo?: string;
|
|
16
|
-
theme?: "light" | "dark";
|
|
20
|
+
theme?: "light" | "dark" | "auto";
|
|
17
21
|
groupBy?: string[];
|
|
18
|
-
reportLanguage?: "en"
|
|
22
|
+
reportLanguage?: "en";
|
|
19
23
|
createdAt: number;
|
|
20
24
|
reportUuid: string;
|
|
25
|
+
layout?: Layout;
|
|
26
|
+
defaultSection?: string;
|
|
27
|
+
sections?: string[];
|
|
28
|
+
cacheKey: string;
|
|
29
|
+
ci?: CiDescriptor;
|
|
21
30
|
};
|
|
22
31
|
|
|
23
|
-
export type
|
|
32
|
+
export type AwesomeFixtureResult = Omit<
|
|
24
33
|
TestFixtureResult,
|
|
25
34
|
"testResultIds" | "start" | "stop" | "sourceMetadata" | "steps"
|
|
26
35
|
> & {
|
|
27
|
-
steps:
|
|
36
|
+
steps: AwesomeTestStepResult[];
|
|
28
37
|
};
|
|
29
38
|
|
|
30
|
-
export type
|
|
39
|
+
export type AwesomeStatus = TestStatus | "total";
|
|
40
|
+
|
|
41
|
+
export type AwesomeTestStepResult = TestStepResult;
|
|
31
42
|
|
|
32
|
-
|
|
43
|
+
type AwesomeBreadcrumbItem = string[] | string[][];
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
export interface AwesomeCategory {
|
|
46
|
+
name: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
descriptionHtml?: string;
|
|
49
|
+
messageRegex?: string;
|
|
50
|
+
traceRegex?: string;
|
|
51
|
+
matchedStatuses?: TestStatus[];
|
|
52
|
+
flaky?: boolean;
|
|
53
|
+
}
|
|
35
54
|
|
|
36
|
-
export type
|
|
55
|
+
export type AwesomeTestResult = Omit<
|
|
37
56
|
TestResult,
|
|
38
57
|
| "runSelector"
|
|
39
58
|
| "sourceMetadata"
|
|
@@ -42,33 +61,46 @@ export type AllureAwesomeTestResult = Omit<
|
|
|
42
61
|
| "precondition"
|
|
43
62
|
| "preconditionHtml"
|
|
44
63
|
| "steps"
|
|
64
|
+
| "environment"
|
|
45
65
|
> & {
|
|
46
|
-
setup:
|
|
47
|
-
teardown:
|
|
48
|
-
steps:
|
|
66
|
+
setup: AwesomeFixtureResult[];
|
|
67
|
+
teardown: AwesomeFixtureResult[];
|
|
68
|
+
steps: AwesomeTestStepResult[];
|
|
49
69
|
history: HistoryTestResult[];
|
|
50
70
|
retries?: TestResult[];
|
|
71
|
+
retriesCount?: number;
|
|
51
72
|
groupedLabels: Record<string, string[]>;
|
|
52
73
|
attachments?: AttachmentTestStepResult[];
|
|
53
|
-
breadcrumbs:
|
|
74
|
+
breadcrumbs: AwesomeBreadcrumbItem[];
|
|
54
75
|
order?: number;
|
|
55
76
|
groupOrder?: number;
|
|
56
77
|
retry: boolean;
|
|
78
|
+
categories?: AwesomeCategory[];
|
|
79
|
+
environment?: string | "default";
|
|
57
80
|
};
|
|
58
81
|
|
|
59
|
-
export type
|
|
60
|
-
|
|
82
|
+
export type AwesomeTreeLeaf = Pick<
|
|
83
|
+
AwesomeTestResult,
|
|
84
|
+
"duration" | "name" | "start" | "status" | "groupOrder" | "flaky" | "transition" | "retry" | "retriesCount"
|
|
85
|
+
> & {
|
|
86
|
+
nodeId: string;
|
|
87
|
+
transitionTooltip?: string;
|
|
61
88
|
};
|
|
62
89
|
|
|
63
|
-
export type
|
|
64
|
-
|
|
65
|
-
export type AllureAwesomeTree = TreeData<AllureAwesomeTreeLeaf, AllureAwesomeTreeGroup>;
|
|
90
|
+
export type AwesomeTreeGroup = WithChildren & DefaultTreeGroup & { nodeId: string };
|
|
66
91
|
|
|
92
|
+
export type AwesomeTree = TreeData<AwesomeTreeLeaf, AwesomeTreeGroup>;
|
|
67
93
|
/**
|
|
68
94
|
* Tree which contains tree leaves instead of their IDs and recursive trees structure instead of groups
|
|
69
95
|
*/
|
|
70
|
-
export type
|
|
96
|
+
export type AwesomeRecursiveTree = DefaultTreeGroup & {
|
|
71
97
|
nodeId: string;
|
|
72
|
-
leaves:
|
|
73
|
-
trees:
|
|
98
|
+
leaves: AwesomeTreeLeaf[];
|
|
99
|
+
trees: AwesomeRecursiveTree[];
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// TODO: maybe it should call `TestCase` instead of Group
|
|
103
|
+
// TODO: add worst status
|
|
104
|
+
export type AwesomeTestResultGroup = Pick<AwesomeTestResult, "name" | "fullName" | "groupOrder"> & {
|
|
105
|
+
testResults: AwesomeTestResult[];
|
|
74
106
|
};
|
package/vitest.config.ts
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { defineConfig } from "vitest/config";
|
|
3
|
+
import { resolve } from "path";
|
|
4
|
+
import { preact } from "@preact/preset-vite";
|
|
3
5
|
|
|
4
6
|
const require = createRequire(import.meta.url);
|
|
5
7
|
|
|
6
8
|
export default defineConfig({
|
|
9
|
+
plugins: [preact()],
|
|
10
|
+
resolve: {
|
|
11
|
+
alias: {
|
|
12
|
+
"@": resolve(__dirname, "./src"),
|
|
13
|
+
},
|
|
14
|
+
},
|
|
7
15
|
test: {
|
|
8
|
-
|
|
9
|
-
|
|
16
|
+
environment: "jsdom",
|
|
17
|
+
include: ["./test/**/*.test.{ts,tsx}"],
|
|
18
|
+
globals: true,
|
|
19
|
+
setupFiles: [
|
|
20
|
+
require.resolve("allure-vitest/setup"),
|
|
21
|
+
"./vitest.setup.ts",
|
|
22
|
+
],
|
|
10
23
|
reporters: [
|
|
11
24
|
"default",
|
|
12
25
|
[
|
package/vitest.setup.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "@testing-library/jest-dom/vitest";
|
package/webpack.config.js
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
|
+
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
1
2
|
import HtmlWebpackPlugin from "html-webpack-plugin";
|
|
2
3
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
|
3
4
|
import { dirname, join } from "node:path";
|
|
4
5
|
import { env } from "node:process";
|
|
5
6
|
import { fileURLToPath } from "node:url";
|
|
6
7
|
import SpriteLoaderPlugin from "svg-sprite-loader/plugin.js";
|
|
8
|
+
import TerserPlugin from "terser-webpack-plugin";
|
|
7
9
|
import webpack from "webpack";
|
|
8
10
|
import { WebpackManifestPlugin } from "webpack-manifest-plugin";
|
|
9
|
-
import ForkTsCheckerPlugin from "fork-ts-checker-webpack-plugin";
|
|
10
11
|
|
|
11
12
|
const { SINGLE_FILE_MODE } = env;
|
|
12
13
|
const baseDir = dirname(fileURLToPath(import.meta.url));
|
|
13
14
|
|
|
14
15
|
export default (env, argv) => {
|
|
15
16
|
const devMode = argv?.mode === "development";
|
|
17
|
+
/**
|
|
18
|
+
* @type {import("webpack").Configuration}
|
|
19
|
+
*/
|
|
16
20
|
const config = {
|
|
17
21
|
entry: "./src/index.tsx",
|
|
18
22
|
output: {
|
|
19
23
|
path: join(baseDir, SINGLE_FILE_MODE ? "dist/single" : "dist/multi"),
|
|
20
|
-
filename: devMode ? "app.js" : "app-[
|
|
21
|
-
assetModuleFilename:
|
|
24
|
+
filename: devMode ? "app.js" : "app-[fullhash].js",
|
|
25
|
+
assetModuleFilename: "[name][ext]",
|
|
26
|
+
},
|
|
27
|
+
devtool: devMode ? "eval-source-map" : false,
|
|
28
|
+
optimization: {
|
|
29
|
+
minimize: !devMode,
|
|
30
|
+
minimizer: [
|
|
31
|
+
new TerserPlugin({
|
|
32
|
+
terserOptions: {
|
|
33
|
+
compress: {
|
|
34
|
+
drop_console: false,
|
|
35
|
+
drop_debugger: false,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
],
|
|
22
40
|
},
|
|
23
|
-
devtool: devMode ? "inline-source-map" : false,
|
|
24
41
|
module: {
|
|
25
42
|
rules: [
|
|
26
43
|
{
|
|
@@ -74,7 +91,7 @@ export default (env, argv) => {
|
|
|
74
91
|
DEVELOPMENT: devMode,
|
|
75
92
|
}),
|
|
76
93
|
new MiniCssExtractPlugin({
|
|
77
|
-
filename: devMode ? "styles.css" : "styles-[
|
|
94
|
+
filename: devMode ? "styles.css" : "styles-[contenthash].css",
|
|
78
95
|
}),
|
|
79
96
|
new SpriteLoaderPlugin(),
|
|
80
97
|
new WebpackManifestPlugin({
|
|
@@ -86,10 +103,25 @@ export default (env, argv) => {
|
|
|
86
103
|
extensions: [".js", ".ts", ".tsx"],
|
|
87
104
|
alias: {
|
|
88
105
|
"@": join(baseDir, "src"),
|
|
106
|
+
"react": "@preact/compat",
|
|
107
|
+
"react-dom": "@preact/compat",
|
|
89
108
|
},
|
|
90
109
|
},
|
|
110
|
+
externals: {
|
|
111
|
+
// Some packages use crypto from node:crypto, but webpack doesn't support it
|
|
112
|
+
// I think this does not end up in a bundle, so it is safe to do this
|
|
113
|
+
"node:crypto": "crypto",
|
|
114
|
+
},
|
|
91
115
|
};
|
|
92
116
|
|
|
117
|
+
if (devMode) {
|
|
118
|
+
// Get and use source maps from dependencies
|
|
119
|
+
config.module.rules.push({
|
|
120
|
+
test: /\.js$/i,
|
|
121
|
+
extractSourceMap: true,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
93
125
|
if (SINGLE_FILE_MODE) {
|
|
94
126
|
config.plugins.push(
|
|
95
127
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_allurereport_web_awesome=self.webpackChunk_allurereport_web_awesome||[]).push([[141],{141:function(a){a.exports=JSON.parse('{"statuses":{"passed":"keçdi","failed":"uğursuz","broken":"sınıq","skipped":"keçildi","unknown":"naməlum","total":"cəmi","flakyTests":"etibarsız","newTests":"yeni","retryTests":"təkrar"},"testSummary":{"all":"Bütün testlər","flaky":"Etibarsız testlər","retry":"Təkrar testlər","new":"Yeni testlər"},"tabs":{"total":"Bütün"},"search":{"search":"Axtarış","search-placeholder":"Ad və ya ID"},"filters":{"more-filters":"Daha çox filtr","enable-filter":"\\"{filter}\\" filtrlərini aktiv edin","flaky":"Etibarsız","retry":"Təkrar","new":"Yeni"},"sort-by":{"sort-by-text":"Sıralamaq üzrə:","sort-by-category":"Sıralamaq üzrə","direction-category":"İstiqamət"},"sort-by.values":{"order":"Sıra","alphabet":"Əlifba","duration":"Müddət","status":"Status"},"sort-by.directions":{"order-desc":"Sonuncu – Birinci","order-asc":"Birinci – Sonuncu","order-asc-short":"Birinci","order-desc-short":"Sonuncu","alphabet-asc":"A – Z","alphabet-desc":"Z – A","alphabet-asc-short":"A – Z","alphabet-desc-short":"Z – A","duration-asc":"1 – 9","duration-desc":"9 – 1","duration-asc-short":"1 – 9","duration-desc-short":"9 – 1","status-asc":"Filtr siyahısına uyğun","status-desc":"Tərsinə çevrilmiş","status-asc-short":"Adi","status-desc-short":"Tərs"},"empty":{"no-results":"Nəticə tapılmadı","no-tests-found":"Nəticə tapılmadı","clear-filters":"Filtrləri təmizlə","no-attachments-results":"Əlavə məlumatı mövcud deyil","no-history-results":"Tarixçə məlumatı mövcud deyil","no-retries-results":"Təkrar məlumatı mövcud deyil"},"severity":{"blocker":"bloklayıcı","critical":"kritik","normal":"normal","minor":"kiçik","trivial":"əhəmiyyətsiz"},"execution":{"name":"İcra","body":"Test məzmunu","setup":"Hazırlıq","teardown":"Yekunlaşma"},"ui":{"labels":"Etiketlər","metadata":"Metaməlumat","parameters":"Parametrlər","description":"Təsvir","links":"Keçidlər","overview":"Ümumi baxış","history":"Tarixçə","attachments":"Əlavələr","retries":"Təkrarlar","error":"Səhv","goToStep":"Addıma keç","showLess":"Daha az göstər","showMore":"Daha çox göstər","copy":"Kopyala","at":"üçün"},"controls":{"newTabAttachment":"Yeni sekmede aç","nextTR":"Növbəti test nəticəsi","prevTR":"Əvvəlki test nəticəsi","downloadAttachment":"Əlavəni yüklə","backto":"Geri dön","clipboard":"Panoya kopyala","clipboardError":"Səhv. Görünür, bu xüsusiyyət brauzeriniz tərəfindən dəstəklənmir","clipboardSuccess":"Uğurla kopyalandı","collapse":"Daralt","expand":"Genişləndir","fullscreen":"Tam ekran","language":"Dili dəyiş","openInNewTab":"Yeni tabda aç"},"errors":{"missedAttachment":"Əlavə tapılmadı"}}')}}]);
|