@allurereport/web-awesome 3.0.0-beta.7 → 3.0.0-beta.9
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/.eslintrc.cjs +4 -1
- package/dist/multi/141.app-f32e4213.js +1 -0
- package/dist/multi/222.app-f32e4213.js +1 -0
- package/dist/multi/335.app-f32e4213.js +1 -0
- package/dist/multi/34.app-f32e4213.js +1 -0
- package/dist/multi/349.app-f32e4213.js +1 -0
- package/dist/multi/378.app-f32e4213.js +1 -0
- package/dist/multi/406.app-f32e4213.js +1 -0
- package/dist/multi/476.app-f32e4213.js +1 -0
- package/dist/multi/53.app-f32e4213.js +1 -0
- package/dist/multi/584.app-f32e4213.js +1 -0
- package/dist/multi/690.app-f32e4213.js +1 -0
- package/dist/multi/747.app-f32e4213.js +1 -0
- package/dist/multi/767.app-f32e4213.js +1 -0
- package/dist/multi/{816.app-4468f0e2.js → 816.app-f32e4213.js} +1 -1
- package/dist/multi/83.app-f32e4213.js +1 -0
- package/dist/multi/873.app-f32e4213.js +1 -0
- package/dist/multi/920.app-f32e4213.js +1 -0
- package/dist/multi/991.app-f32e4213.js +1 -0
- package/dist/multi/app-f32e4213.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/styles-f32e4213.css +284 -0
- package/dist/single/app-7fa8e43f.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +7 -4
- package/src/assets/scss/fonts.scss +2 -20
- package/src/components/{app/ArrowButton → ArrowButton}/index.tsx +3 -4
- package/src/components/{app/BaseLayout → BaseLayout}/index.tsx +18 -16
- package/src/components/{app/Footer → Footer}/FooterLogo.tsx +2 -2
- package/src/components/Footer/FooterVersion.tsx +33 -0
- package/src/components/Footer/index.tsx +13 -0
- package/src/components/Header/index.tsx +14 -0
- package/src/components/{app/LanguagePicker → LanguagePicker}/index.tsx +2 -3
- package/src/components/MainReport/index.tsx +19 -0
- package/src/components/{app/Metadata → Metadata}/index.tsx +23 -16
- package/src/components/{app/Metadata → Metadata}/styles.scss +1 -1
- package/src/components/{app/MetadataButton → MetadataButton}/index.tsx +3 -4
- package/src/components/{app/Modal → Modal}/index.tsx +9 -19
- package/src/components/{app/ReportBody → ReportBody}/Filters.tsx +5 -11
- package/src/components/{app/ReportBody → ReportBody}/HeaderActions.tsx +1 -1
- package/src/components/{app/ReportBody → ReportBody}/SortBy.tsx +12 -14
- package/src/components/{app/ReportBody → ReportBody}/index.tsx +4 -3
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLabelList.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderLogo.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/ReportHeaderPie.tsx +2 -2
- package/src/components/{app/ReportHeader → ReportHeader}/index.tsx +5 -5
- package/src/components/{app/ReportLogo → ReportLogo}/index.tsx +3 -4
- package/src/components/{app/ReportLogoFull → ReportLogoFull}/index.tsx +3 -4
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataItem.tsx +2 -2
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataSummary.tsx +8 -10
- package/src/components/{app/ReportMetadata → ReportMetadata}/MetadataTestType.tsx +5 -5
- package/src/components/ReportMetadata/MetadataWithIcon.tsx +21 -0
- package/src/components/{app/ReportMetadata → ReportMetadata}/index.tsx +5 -5
- package/src/components/{app/ReportMetadata → ReportMetadata}/styles.scss +1 -1
- package/src/components/{app/Tabs → Tabs}/index.tsx +6 -1
- package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultDescription/index.tsx +4 -4
- package/src/components/TestResult/TestResultDropdown/index.tsx +23 -0
- package/src/components/{app/TestResult → TestResult}/TestResultEmpty/index.tsx +7 -7
- package/src/components/TestResult/TestResultError/index.tsx +59 -0
- package/src/components/{app/TestResult → TestResult}/TestResultHeader/index.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/TestResultHistoryItem.tsx +16 -17
- package/src/components/{app/TestResult → TestResult}/TestResultHistory/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/TestResultInfoStatuses.tsx +8 -9
- package/src/components/{app/TestResult → TestResult}/TestResultInfo/index.tsx +8 -10
- package/src/components/{app/TestResult → TestResult}/TestResultLinks/index.tsx +12 -16
- package/src/components/{app/TestResult → TestResult}/TestResultMetadata/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultNavigation/index.tsx +7 -9
- package/src/components/TestResult/TestResultOverview.tsx +43 -0
- package/src/components/{app/TestResult → TestResult}/TestResultParameters/index.tsx +4 -4
- package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/index.tsx +6 -9
- package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +52 -0
- package/src/components/TestResult/TestResultRetriesView/index.tsx +24 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSetup/index.tsx +20 -12
- package/src/components/TestResult/TestResultSeverity/index.tsx +27 -0
- package/src/components/{app/TestResult → TestResult}/TestResultStatus/index.tsx +2 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachment.tsx +10 -10
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentCode.tsx +7 -2
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/attachmentImage.tsx +6 -3
- package/src/components/TestResult/TestResultSteps/attachmentVideo.tsx +15 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/index.tsx +17 -8
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx +25 -27
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx +8 -12
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultStep.tsx +34 -20
- package/src/components/TestResult/TestResultSteps/testResultStepInfo.tsx +30 -0
- package/src/components/{app/TestResult → TestResult}/TestResultSteps/wrongAttachment.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTabs/index.tsx +1 -1
- package/src/components/{app/TestResult → TestResult}/TestResultTeardown/index.tsx +19 -9
- package/src/components/TestResult/TestStepsEmpty/index.tsx +23 -0
- package/src/components/TestResult/TestStepsEmpty/styles.scss +25 -0
- package/src/components/{app/TestResult → TestResult}/index.tsx +10 -10
- package/src/components/{app/ThemeButton → ThemeButton}/ThemeButton.tsx +2 -4
- package/src/components/{app/Tree → Tree}/Tree.tsx +10 -10
- package/src/components/{app/Tree → Tree}/TreeHeader.tsx +3 -3
- package/src/components/{app/Tree → Tree}/TreeItem.tsx +2 -2
- package/src/components/Tree/TreeItemIcon.tsx +32 -0
- package/src/components/{app/Tree → Tree}/index.tsx +5 -13
- package/src/i18n/locales/am.json +3 -1
- package/src/i18n/locales/az.json +3 -1
- package/src/i18n/locales/de.json +3 -1
- package/src/i18n/locales/en.json +4 -1
- package/src/i18n/locales/es.json +3 -1
- package/src/i18n/locales/fr.json +3 -1
- package/src/i18n/locales/he.json +3 -1
- package/src/i18n/locales/it.json +3 -1
- package/src/i18n/locales/ja.json +3 -1
- package/src/i18n/locales/ka.json +3 -1
- package/src/i18n/locales/kr.json +3 -1
- package/src/i18n/locales/nl.json +3 -1
- package/src/i18n/locales/pl.json +3 -1
- package/src/i18n/locales/pt.json +3 -1
- package/src/i18n/locales/ru.json +3 -1
- package/src/i18n/locales/sv.json +3 -1
- package/src/i18n/locales/tr.json +3 -1
- package/src/i18n/locales/zh.json +3 -1
- package/src/index.html +1 -0
- package/src/index.tsx +2 -2
- package/src/stores/index.ts +1 -1
- package/src/stores/testResults.ts +6 -2
- package/src/stores/tree.ts +43 -12
- package/src/utils/isMac.ts +6 -5
- package/src/utils/loadFromLocalStorage.ts +8 -0
- package/src/utils/treeFilters.ts +107 -58
- package/test/utils/treeFilters.test.ts +25 -1
- package/tsconfig.json +5 -3
- package/types.d.ts +15 -2
- package/vitest.config.ts +7 -1
- package/webpack.config.js +4 -0
- package/dist/multi/141.app-4468f0e2.js +0 -1
- package/dist/multi/222.app-4468f0e2.js +0 -1
- package/dist/multi/335.app-4468f0e2.js +0 -1
- package/dist/multi/34.app-4468f0e2.js +0 -1
- package/dist/multi/349.app-4468f0e2.js +0 -1
- package/dist/multi/378.app-4468f0e2.js +0 -1
- package/dist/multi/406.app-4468f0e2.js +0 -1
- package/dist/multi/476.app-4468f0e2.js +0 -1
- package/dist/multi/53.app-4468f0e2.js +0 -1
- package/dist/multi/584.app-4468f0e2.js +0 -1
- package/dist/multi/690.app-4468f0e2.js +0 -1
- package/dist/multi/747.app-4468f0e2.js +0 -1
- package/dist/multi/767.app-4468f0e2.js +0 -1
- package/dist/multi/83.app-4468f0e2.js +0 -1
- package/dist/multi/873.app-4468f0e2.js +0 -1
- package/dist/multi/920.app-4468f0e2.js +0 -1
- package/dist/multi/991.app-4468f0e2.js +0 -1
- package/dist/multi/app-4468f0e2.js +0 -2
- package/dist/multi/styles-4468f0e2.css +0 -363
- package/dist/single/app-33b3c367.js +0 -2
- package/src/assets/fonts/JetBrainsMono_vf.woff +0 -0
- package/src/assets/fonts/JetBrainsMono_vf.woff2 +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff +0 -0
- package/src/assets/fonts/pt-root-ui_vf.woff2 +0 -0
- package/src/assets/scss/mixins.scss +0 -26
- package/src/assets/svg/arrows-chevron-down.svg +0 -5
- package/src/assets/svg/github.svg +0 -5
- package/src/assets/svg/line-alerts-notification-box.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-down.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-right.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up-double.svg +0 -3
- package/src/assets/svg/line-arrows-chevron-up.svg +0 -3
- package/src/assets/svg/line-arrows-corner-down-right.svg +0 -3
- package/src/assets/svg/line-arrows-expand-3.svg +0 -3
- package/src/assets/svg/line-arrows-refresh-ccw-1.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-asc.svg +0 -3
- package/src/assets/svg/line-arrows-sort-line-desc.svg +0 -3
- package/src/assets/svg/line-arrows-switch-vertical-1.svg +0 -3
- package/src/assets/svg/line-dev-bug-2.svg +0 -3
- package/src/assets/svg/line-dev-code-square.svg +0 -3
- package/src/assets/svg/line-files-file-attachment-2.svg +0 -3
- package/src/assets/svg/line-general-check.svg +0 -3
- package/src/assets/svg/line-general-checklist3.svg +0 -3
- package/src/assets/svg/line-general-copy-3.svg +0 -3
- package/src/assets/svg/line-general-download-cloud.svg +0 -3
- package/src/assets/svg/line-general-equal.svg +0 -3
- package/src/assets/svg/line-general-home-line.svg +0 -3
- package/src/assets/svg/line-general-link-1.svg +0 -3
- package/src/assets/svg/line-general-link-external.svg +0 -3
- package/src/assets/svg/line-general-search-md.svg +0 -3
- package/src/assets/svg/line-general-settings-1.svg +0 -3
- package/src/assets/svg/line-general-x-close.svg +0 -3
- package/src/assets/svg/line-general-zap.svg +0 -3
- package/src/assets/svg/line-helpers-flag.svg +0 -4
- package/src/assets/svg/line-helpers-play-circle.svg +0 -4
- package/src/assets/svg/line-images-image.svg +0 -3
- package/src/assets/svg/line-security-key.svg +0 -3
- package/src/assets/svg/line-shapes-dot-circle.svg +0 -3
- package/src/assets/svg/line-shapes-moon.svg +0 -3
- package/src/assets/svg/line-shapes-sun.svg +0 -3
- package/src/assets/svg/line-time-clock-stopwatch.svg +0 -3
- package/src/assets/svg/report-logo.svg +0 -64
- package/src/assets/svg/solid-alert-circle.svg +0 -3
- package/src/assets/svg/solid-check-circle.svg +0 -3
- package/src/assets/svg/solid-help-circle.svg +0 -3
- package/src/assets/svg/solid-minus-circle.svg +0 -3
- package/src/assets/svg/solid-x-circle.svg +0 -3
- package/src/assets/svg/spinner.svg +0 -18
- package/src/assets/svg/view-off.svg +0 -12
- package/src/assets/svg/view.svg +0 -11
- package/src/components/app/Footer/FooterVersion.tsx +0 -27
- package/src/components/app/Footer/index.tsx +0 -13
- package/src/components/app/Header/index.tsx +0 -17
- package/src/components/app/MainReport/index.tsx +0 -19
- package/src/components/app/ReportMetadata/MetadataWithIcon.tsx +0 -25
- package/src/components/app/TestResult/TestResultDropdown/index.tsx +0 -19
- package/src/components/app/TestResult/TestResultError/index.tsx +0 -53
- package/src/components/app/TestResult/TestResultOverview.tsx +0 -40
- package/src/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +0 -50
- package/src/components/app/TestResult/TestResultRetriesView/index.tsx +0 -24
- package/src/components/app/TestResult/TestResultSeverity/index.tsx +0 -34
- package/src/components/app/TestResult/TestResultSteps/attachmentVideo.tsx +0 -12
- package/src/components/app/TestResult/TestResultSteps/testResultStepInfo.tsx +0 -33
- package/src/components/app/Tree/TreeItemIcon.tsx +0 -35
- package/src/components/commons/Button/index.tsx +0 -176
- package/src/components/commons/Button/styles.scss +0 -560
- package/src/components/commons/Counter/index.tsx +0 -29
- package/src/components/commons/Counter/styles.scss +0 -21
- package/src/components/commons/Label/index.tsx +0 -11
- package/src/components/commons/Label/styles.scss +0 -7
- package/src/components/commons/Link/index.tsx +0 -20
- package/src/components/commons/Link/styles.scss +0 -46
- package/src/components/commons/Loadable/index.tsx +0 -32
- package/src/components/commons/Menu/index.tsx +0 -198
- package/src/components/commons/Menu/styles.scss +0 -94
- package/src/components/commons/PageLoader/index.tsx +0 -10
- package/src/components/commons/PageLoader/styles.scss +0 -29
- package/src/components/commons/SearchBox/index.tsx +0 -64
- package/src/components/commons/SearchBox/styles.scss +0 -58
- package/src/components/commons/Spinner/index.tsx +0 -8
- package/src/components/commons/SuccessRatePieChart/index.tsx +0 -52
- package/src/components/commons/SuccessRatePieChart/styles.scss +0 -11
- package/src/components/commons/SvgIcon/index.tsx +0 -46
- package/src/components/commons/SvgIcon/styles.scss +0 -26
- package/src/components/commons/Toggle/index.tsx +0 -30
- package/src/components/commons/Toggle/styles.scss +0 -48
- package/src/components/commons/Tooltip/index.tsx +0 -123
- package/src/components/commons/Tooltip/styles.scss +0 -38
- package/src/components/commons/Typography/index.tsx +0 -99
- package/src/hooks/useDebouncedCallback.ts +0 -31
- /package/dist/multi/{app-4468f0e2.js.LICENSE.txt → app-f32e4213.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-33b3c367.js.LICENSE.txt → app-7fa8e43f.js.LICENSE.txt} +0 -0
- /package/src/assets/scss/{code.css → code.scss} +0 -0
- /package/src/components/{app/ArrowButton → ArrowButton}/styles.scss +0 -0
- /package/src/components/{app/BaseLayout → BaseLayout}/styles.scss +0 -0
- /package/src/components/{app/Footer → Footer}/styles.scss +0 -0
- /package/src/components/{app/Header → Header}/styles.scss +0 -0
- /package/src/components/{app/MetadataButton → MetadataButton}/styles.scss +0 -0
- /package/src/components/{app/Modal → Modal}/styles.scss +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/context.tsx +0 -0
- /package/src/components/{app/ReportBody → ReportBody}/styles.scss +0 -0
- /package/src/components/{app/ReportHeader → ReportHeader}/styles.scss +0 -0
- /package/src/components/{app/ReportLogo → ReportLogo}/styles.scss +0 -0
- /package/src/components/{app/ReportLogoFull → ReportLogoFull}/styles.scss +0 -0
- /package/src/components/{app/Tabs → Tabs}/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultAttachmentsView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDescription/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultDropdown/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultEmpty/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultError/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHeader/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultHistory/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultInfo/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultLinks/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultMetadata/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultNavigation/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultParameters/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultPrevStatuses/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultRetriesView/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSeverity/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultStatus/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/HtmlAttachmentPreview.tsx +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultSteps/styles.scss +0 -0
- /package/src/components/{app/TestResult → TestResult}/TestResultTabs/styles.scss +0 -0
- /package/src/components/{app/Tree → Tree}/styles.scss +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { FunctionalComponent } from "preact";
|
|
2
|
-
import * as styles from "@/components/app/BaseLayout/styles.scss";
|
|
3
|
-
import { TestResultDescription } from "@/components/app/TestResult/TestResultDescription";
|
|
4
|
-
import { TestResultError } from "@/components/app/TestResult/TestResultError";
|
|
5
|
-
import { TestResultLinks } from "@/components/app/TestResult/TestResultLinks";
|
|
6
|
-
import { TestResultMetadata } from "@/components/app/TestResult/TestResultMetadata";
|
|
7
|
-
import { TestResultParameters } from "@/components/app/TestResult/TestResultParameters";
|
|
8
|
-
import { TestResultSetup } from "@/components/app/TestResult/TestResultSetup";
|
|
9
|
-
import { TestResultSteps } from "@/components/app/TestResult/TestResultSteps";
|
|
10
|
-
import { TestResultTeardown } from "@/components/app/TestResult/TestResultTeardown";
|
|
11
|
-
import type { AllureAwesomeTestResult } from "../../../../types.js";
|
|
12
|
-
|
|
13
|
-
export type TestResultOverviewProps = {
|
|
14
|
-
testResult?: AllureAwesomeTestResult;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export const TestResultOverview: FunctionalComponent<TestResultOverviewProps> = ({ testResult }) => {
|
|
18
|
-
const { message, trace, parameters, groupedLabels, links, description, setup, steps, teardown } = testResult || {};
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<>
|
|
22
|
-
{Boolean(message) && (
|
|
23
|
-
<div className={styles["test-result-errors"]}>
|
|
24
|
-
<TestResultError message={message} trace={trace} />
|
|
25
|
-
</div>
|
|
26
|
-
)}
|
|
27
|
-
{Boolean(parameters?.length) && <TestResultParameters parameters={parameters} />}
|
|
28
|
-
{Boolean(groupedLabels && Object.keys(groupedLabels || {})?.length) && (
|
|
29
|
-
<TestResultMetadata testResult={testResult} />
|
|
30
|
-
)}
|
|
31
|
-
{Boolean(links?.length) && <TestResultLinks links={links} />}
|
|
32
|
-
{Boolean(description) && <TestResultDescription description={description} />}
|
|
33
|
-
<div className={styles["test-results"]}>
|
|
34
|
-
{Boolean(setup?.length) && <TestResultSetup setup={setup} />}
|
|
35
|
-
{Boolean(steps?.length) && <TestResultSteps steps={steps} />}
|
|
36
|
-
{Boolean(teardown?.length) && <TestResultTeardown teardown={teardown} />}
|
|
37
|
-
</div>
|
|
38
|
-
</>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { formatDuration } from "@allurereport/core-api";
|
|
2
|
-
import { clsx } from "clsx";
|
|
3
|
-
import { useState } from "preact/hooks";
|
|
4
|
-
import arrowsChevronDown from "@/assets/svg/arrows-chevron-down.svg";
|
|
5
|
-
import LineGeneralLinkExternal from "@/assets/svg/line-general-link-external.svg";
|
|
6
|
-
import { ArrowButton } from "@/components/app/ArrowButton";
|
|
7
|
-
import { TestResultError } from "@/components/app/TestResult/TestResultError";
|
|
8
|
-
import * as styles from "@/components/app/TestResult/TestResultRetriesView/styles.scss";
|
|
9
|
-
import TreeItemIcon from "@/components/app/Tree/TreeItemIcon";
|
|
10
|
-
import { IconButton } from "@/components/commons/Button";
|
|
11
|
-
import { Text } from "@/components/commons/Typography";
|
|
12
|
-
import { navigateTo } from "@/index";
|
|
13
|
-
import { timestampToDate } from "@/utils/time";
|
|
14
|
-
|
|
15
|
-
export const TestResultRetriesItem = ({ testResultItem }) => {
|
|
16
|
-
const { id, status, message, trace, stop, duration } = testResultItem;
|
|
17
|
-
const [isOpened, setIsOpen] = useState(false);
|
|
18
|
-
const convertedStop = timestampToDate(stop);
|
|
19
|
-
const formattedDuration = formatDuration(duration);
|
|
20
|
-
const navigateUrl = `/testresult/${id}`;
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div>
|
|
24
|
-
<div className={styles["test-result-retries-item-header"]} onClick={() => setIsOpen(!isOpened)}>
|
|
25
|
-
{Boolean(message) && <ArrowButton isOpened={isOpened} icon={arrowsChevronDown.id} />}
|
|
26
|
-
<div className={styles["test-result-retries-item-wrap"]}>
|
|
27
|
-
<TreeItemIcon status={status} className={styles["test-result-retries-item-status"]} />
|
|
28
|
-
<Text className={styles["test-result-retries-item-text"]}>{convertedStop}</Text>
|
|
29
|
-
<div className={styles["test-result-retries-item-info"]}>
|
|
30
|
-
<Text type="ui" size={"s"} className={styles["item-time"]}>
|
|
31
|
-
{formattedDuration}
|
|
32
|
-
</Text>
|
|
33
|
-
<IconButton
|
|
34
|
-
icon={LineGeneralLinkExternal.id}
|
|
35
|
-
style={"ghost"}
|
|
36
|
-
size={"s"}
|
|
37
|
-
className={styles["test-result-retries-item-link"]}
|
|
38
|
-
onClick={() => navigateTo(navigateUrl)}
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
{isOpened && message && (
|
|
44
|
-
<div className={styles["test-result-retries-item-content"]}>
|
|
45
|
-
<TestResultError message={message} trace={trace} />
|
|
46
|
-
</div>
|
|
47
|
-
)}
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { FunctionalComponent } from "preact";
|
|
2
|
-
import type { AllureAwesomeTestResult } from "types";
|
|
3
|
-
import * as styles from "@/components/app/TestResult/TestResultHistory/styles.scss";
|
|
4
|
-
import { TestResultRetriesItem } from "@/components/app/TestResult/TestResultRetriesView/TestResultRetriesItem";
|
|
5
|
-
import { useI18n } from "@/stores";
|
|
6
|
-
|
|
7
|
-
export type TestResultRetriesViewProps = {
|
|
8
|
-
testResult?: AllureAwesomeTestResult;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const TestResultRetriesView: FunctionalComponent<TestResultRetriesViewProps> = ({ testResult }) => {
|
|
12
|
-
const { retries } = testResult ?? {};
|
|
13
|
-
const { t } = useI18n("empty");
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<div className={styles["test-result-history"]}>
|
|
17
|
-
{retries.length ? (
|
|
18
|
-
retries?.map((item, key) => <TestResultRetriesItem testResultItem={item} key={key} />)
|
|
19
|
-
) : (
|
|
20
|
-
<div className={styles["test-result-empty"]}>{t("no-retries-results")}</div>
|
|
21
|
-
)}
|
|
22
|
-
</div>
|
|
23
|
-
);
|
|
24
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import i18n from "i18next";
|
|
3
|
-
import ChevronDownDouble from "@/assets/svg/line-arrows-chevron-down-double.svg";
|
|
4
|
-
import ChevronDown from "@/assets/svg/line-arrows-chevron-down.svg";
|
|
5
|
-
import ChevronUpDouble from "@/assets/svg/line-arrows-chevron-up-double.svg";
|
|
6
|
-
import ChevronUp from "@/assets/svg/line-arrows-chevron-up.svg";
|
|
7
|
-
import EqualIcon from "@/assets/svg/line-general-equal.svg";
|
|
8
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
9
|
-
import { Text } from "@/components/commons/Typography";
|
|
10
|
-
import { useI18n } from "@/stores/locale";
|
|
11
|
-
import { capitalize } from "@/utils/capitalize";
|
|
12
|
-
import * as styles from "./styles.scss";
|
|
13
|
-
|
|
14
|
-
const icons = {
|
|
15
|
-
blocker: ChevronUpDouble.id,
|
|
16
|
-
critical: ChevronUp.id,
|
|
17
|
-
normal: EqualIcon.id,
|
|
18
|
-
minor: ChevronDown.id,
|
|
19
|
-
trivial: ChevronDownDouble.id,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const TestResultSeverity = ({ severity = "normal" }: { severity?: string }) => {
|
|
23
|
-
const { t } = useI18n("severity");
|
|
24
|
-
const statusClass = clsx(styles[`severity-${severity}`]);
|
|
25
|
-
|
|
26
|
-
return (
|
|
27
|
-
<div className={styles["test-result-severity"]}>
|
|
28
|
-
<SvgIcon className={statusClass} id={icons[severity]}></SvgIcon>
|
|
29
|
-
<Text size={"s"} bold className={styles["test-result-severity-text"]}>
|
|
30
|
-
{capitalize(t(severity))}
|
|
31
|
-
</Text>
|
|
32
|
-
</div>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Spinner } from "@/components/commons/Spinner";
|
|
2
|
-
|
|
3
|
-
export const AttachmentVideo = ({ attachment }) => {
|
|
4
|
-
if (!attachment) {
|
|
5
|
-
return <Spinner />;
|
|
6
|
-
}
|
|
7
|
-
return (
|
|
8
|
-
<video controls loop muted>
|
|
9
|
-
<source src={attachment?.src} type={attachment?.contentType} />
|
|
10
|
-
</video>
|
|
11
|
-
);
|
|
12
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { formatDuration } from "@allurereport/core-api";
|
|
2
|
-
import LineArrowsCornerDownRight from "@/assets/svg/line-arrows-corner-down-right.svg";
|
|
3
|
-
import LineFilesFileAttachment from "@/assets/svg/line-files-file-attachment-2.svg";
|
|
4
|
-
import * as styles from "@/components/app/TestResult/TestResultSteps/styles.scss";
|
|
5
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
6
|
-
import { Text } from "@/components/commons/Typography";
|
|
7
|
-
|
|
8
|
-
export const TestResultStepInfo = ({ item }) => {
|
|
9
|
-
const { steps } = item;
|
|
10
|
-
const formattedDuration = formatDuration(item?.duration as number);
|
|
11
|
-
const stepLength = steps?.length;
|
|
12
|
-
const attachmentLength = steps?.filter((step) => step.type === "attachment")?.length;
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<div className={styles["item-info"]}>
|
|
16
|
-
{Boolean(stepLength) && (
|
|
17
|
-
<div className={styles["item-info-step"]}>
|
|
18
|
-
<SvgIcon id={LineArrowsCornerDownRight.id} className={styles["item-info-step-icon"]} />
|
|
19
|
-
<Text size={"s"}>{stepLength}</Text>
|
|
20
|
-
</div>
|
|
21
|
-
)}
|
|
22
|
-
{Boolean(attachmentLength) && (
|
|
23
|
-
<div className={styles["item-info-step"]}>
|
|
24
|
-
<SvgIcon id={LineFilesFileAttachment.id} className={styles["item-info-step-icon"]} />
|
|
25
|
-
<Text size={"s"}>{attachmentLength}</Text>
|
|
26
|
-
</div>
|
|
27
|
-
)}
|
|
28
|
-
<Text type="ui" size={"s"} className={styles["item-time"]}>
|
|
29
|
-
{formattedDuration}
|
|
30
|
-
</Text>
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { clsx } from "clsx";
|
|
2
|
-
import { FunctionalComponent } from "preact";
|
|
3
|
-
import AlertCircle from "@/assets/svg/solid-alert-circle.svg";
|
|
4
|
-
import CheckCircle from "@/assets/svg/solid-check-circle.svg";
|
|
5
|
-
import HelpCircle from "@/assets/svg/solid-help-circle.svg";
|
|
6
|
-
import MinusCircle from "@/assets/svg/solid-minus-circle.svg";
|
|
7
|
-
import XCircle from "@/assets/svg/solid-x-circle.svg";
|
|
8
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
9
|
-
import * as styles from "./styles.scss";
|
|
10
|
-
|
|
11
|
-
interface TestStatusIconProps {
|
|
12
|
-
status?: "failed" | "broken" | "passed" | "skipped" | "unknown";
|
|
13
|
-
className?: string;
|
|
14
|
-
classNameIcon?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const icons = {
|
|
18
|
-
failed: XCircle.id,
|
|
19
|
-
broken: AlertCircle.id,
|
|
20
|
-
passed: CheckCircle.id,
|
|
21
|
-
skipped: MinusCircle.id,
|
|
22
|
-
unknown: HelpCircle.id,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const TreeItemIcon: FunctionalComponent<TestStatusIconProps> = ({ status = "unknown", className, classNameIcon }) => {
|
|
26
|
-
const statusClass = clsx(styles[`status-${status}`], classNameIcon);
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div data-testid={`tree-leaf-status-${status}`} className={clsx(styles["tree-item-icon"], className)}>
|
|
30
|
-
<SvgIcon className={statusClass} id={icons[status]}></SvgIcon>
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default TreeItemIcon;
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { clsx } from "clsx";
|
|
2
|
-
import lineChevronDownIcon from "@/assets/svg/line-arrows-chevron-down.svg";
|
|
3
|
-
import { Spinner } from "../Spinner";
|
|
4
|
-
import { SvgIcon } from "../SvgIcon";
|
|
5
|
-
import { Text } from "../Typography";
|
|
6
|
-
import * as styles from "./styles.scss";
|
|
7
|
-
|
|
8
|
-
type BaseBtnProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Text to be displayed on the button
|
|
11
|
-
* Should not contain any JSX, only plain text
|
|
12
|
-
*/
|
|
13
|
-
text?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Indicates if the button is in a pending state
|
|
16
|
-
*/
|
|
17
|
-
isPending?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Size of the button
|
|
20
|
-
*
|
|
21
|
-
* @default m
|
|
22
|
-
*
|
|
23
|
-
* - `s` - Small button
|
|
24
|
-
* - `m` - Medium button
|
|
25
|
-
* - `l` - Large button
|
|
26
|
-
*/
|
|
27
|
-
size?: "s" | "m" | "l";
|
|
28
|
-
/**
|
|
29
|
-
* Style of the button
|
|
30
|
-
*
|
|
31
|
-
* @default primary
|
|
32
|
-
*
|
|
33
|
-
* - `primary` - Primary button
|
|
34
|
-
* - `outline` - Outline button
|
|
35
|
-
* - `ghost` - Ghost button
|
|
36
|
-
* - `flat` - Flat button
|
|
37
|
-
* - `raised` - Raised button
|
|
38
|
-
*/
|
|
39
|
-
style?: "primary" | "outline" | "ghost" | "flat" | "raised";
|
|
40
|
-
/**
|
|
41
|
-
* - `danger` - Indicates if the button is a danger button
|
|
42
|
-
* - `positive` - Indicates if the button is a positive button
|
|
43
|
-
*
|
|
44
|
-
* @default "default"
|
|
45
|
-
*/
|
|
46
|
-
action?: "default" | "danger" | "positive";
|
|
47
|
-
/**
|
|
48
|
-
* Icon to be displayed on the button
|
|
49
|
-
*/
|
|
50
|
-
icon?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Custom icon size on the button
|
|
53
|
-
*/
|
|
54
|
-
iconSize?: "xs" | "s" | "m";
|
|
55
|
-
/**
|
|
56
|
-
* Indicates if the button should take the full width of its container
|
|
57
|
-
*/
|
|
58
|
-
fullWidth?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Indicates if the button is an icon button
|
|
61
|
-
*/
|
|
62
|
-
isIconButton?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Indicates if the button is a dropdown button
|
|
65
|
-
*/
|
|
66
|
-
isDropdownButton?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Callback to be called when the button is pressed
|
|
69
|
-
*/
|
|
70
|
-
onClick?: (e: MouseEvent) => void;
|
|
71
|
-
/**
|
|
72
|
-
* Type of the button
|
|
73
|
-
* same as HTML Button type
|
|
74
|
-
*/
|
|
75
|
-
type?: HTMLButtonElement["type"];
|
|
76
|
-
/**
|
|
77
|
-
* Indicates if the button is disabled or not
|
|
78
|
-
* this tells screen readers to ignore the button
|
|
79
|
-
* But the button is still focusable in order to show the tooltip
|
|
80
|
-
*/
|
|
81
|
-
isDisabled?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* For visual "active" state
|
|
84
|
-
*
|
|
85
|
-
* Used for dropdown buttons mainly
|
|
86
|
-
*/
|
|
87
|
-
isActive?: boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Indicates if the button is focusable
|
|
90
|
-
*
|
|
91
|
-
* @default true
|
|
92
|
-
*/
|
|
93
|
-
focusable?: boolean;
|
|
94
|
-
className?: string;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const BaseBtn = (props: BaseBtnProps) => {
|
|
98
|
-
const {
|
|
99
|
-
text,
|
|
100
|
-
type = "button",
|
|
101
|
-
icon,
|
|
102
|
-
iconSize = "m",
|
|
103
|
-
onClick,
|
|
104
|
-
isPending = false,
|
|
105
|
-
size = "m",
|
|
106
|
-
style = "primary",
|
|
107
|
-
action = "default",
|
|
108
|
-
fullWidth = false,
|
|
109
|
-
isDisabled = false,
|
|
110
|
-
isIconButton = false,
|
|
111
|
-
isDropdownButton = false,
|
|
112
|
-
isActive = false,
|
|
113
|
-
focusable = true,
|
|
114
|
-
className,
|
|
115
|
-
...rest
|
|
116
|
-
} = props;
|
|
117
|
-
|
|
118
|
-
const isButtonDisabled = isDisabled || isPending;
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
<button
|
|
122
|
-
{...rest}
|
|
123
|
-
tabIndex={focusable ? 0 : -1}
|
|
124
|
-
className={clsx(
|
|
125
|
-
styles.button,
|
|
126
|
-
isIconButton && styles.buttonIcon,
|
|
127
|
-
styles[`size_${size}`],
|
|
128
|
-
styles[`icon_size_${iconSize}`],
|
|
129
|
-
styles[`style_${style}`],
|
|
130
|
-
action === "danger" && styles.danger,
|
|
131
|
-
action === "positive" && styles.positive,
|
|
132
|
-
isPending && styles.pending,
|
|
133
|
-
fullWidth && styles.fullWidth,
|
|
134
|
-
!isButtonDisabled && isActive && styles.active,
|
|
135
|
-
className,
|
|
136
|
-
)}
|
|
137
|
-
disabled={isButtonDisabled}
|
|
138
|
-
onClick={onClick}
|
|
139
|
-
type={type}
|
|
140
|
-
>
|
|
141
|
-
<Text type="ui" size={size === "s" ? "s" : "m"} bold className={styles.content}>
|
|
142
|
-
{icon && <SvgIcon size="s" className={isIconButton ? styles.contentIcon : styles.leadingIcon} id={icon} />}
|
|
143
|
-
{!isIconButton && <span className={styles.text}>{text}</span>}
|
|
144
|
-
{isDropdownButton && <SvgIcon id={lineChevronDownIcon.id} size="s" className={styles.dropdownIcon} />}
|
|
145
|
-
<span className={styles.spinner} aria-hidden={!isPending}>
|
|
146
|
-
<Spinner />
|
|
147
|
-
</span>
|
|
148
|
-
</Text>
|
|
149
|
-
</button>
|
|
150
|
-
);
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
export type ButtonProps = Omit<BaseBtnProps, "text" | "isIconButton" | "isDropdownButton"> &
|
|
154
|
-
Pick<Required<BaseBtnProps>, "text">;
|
|
155
|
-
|
|
156
|
-
export const Button = (props: ButtonProps) => <BaseBtn {...props} />;
|
|
157
|
-
|
|
158
|
-
export type IconButtonProps = Omit<
|
|
159
|
-
BaseBtnProps,
|
|
160
|
-
"text" | "icon" | "autoFocus" | "fullWidth" | "isIconButton" | "isDropdownButton"
|
|
161
|
-
> &
|
|
162
|
-
Pick<Required<BaseBtnProps>, "icon">;
|
|
163
|
-
|
|
164
|
-
export const IconButton = (props: IconButtonProps) => <BaseBtn {...props} isIconButton />;
|
|
165
|
-
|
|
166
|
-
type DropdownButtonProps = Omit<
|
|
167
|
-
BaseBtnProps,
|
|
168
|
-
"type" | "autoFocus" | "isDropdownButton" | "isIconButton" | "text" | "icon" | "isActive"
|
|
169
|
-
> &
|
|
170
|
-
Pick<Required<BaseBtnProps>, "text"> & {
|
|
171
|
-
isExpanded?: boolean;
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
export const DropdownButton = (props: DropdownButtonProps) => (
|
|
175
|
-
<BaseBtn {...props} isDropdownButton isActive={props.isExpanded} />
|
|
176
|
-
);
|