@allurereport/web-awesome 3.0.0-beta.7 → 3.0.0-beta.8
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-4375537b.js +1 -0
- package/dist/multi/222.app-4375537b.js +1 -0
- package/dist/multi/335.app-4375537b.js +1 -0
- package/dist/multi/34.app-4375537b.js +1 -0
- package/dist/multi/349.app-4375537b.js +1 -0
- package/dist/multi/378.app-4375537b.js +1 -0
- package/dist/multi/406.app-4375537b.js +1 -0
- package/dist/multi/476.app-4375537b.js +1 -0
- package/dist/multi/53.app-4375537b.js +1 -0
- package/dist/multi/584.app-4375537b.js +1 -0
- package/dist/multi/690.app-4375537b.js +1 -0
- package/dist/multi/747.app-4375537b.js +1 -0
- package/dist/multi/767.app-4375537b.js +1 -0
- package/dist/multi/83.app-4375537b.js +1 -0
- package/dist/multi/873.app-4375537b.js +1 -0
- package/dist/multi/920.app-4375537b.js +1 -0
- package/dist/multi/991.app-4375537b.js +1 -0
- package/dist/multi/app-4375537b.js +2 -0
- package/dist/multi/manifest.json +20 -20
- package/dist/multi/styles-4375537b.css +283 -0
- package/dist/single/app-f16f6693.js +2 -0
- package/dist/single/manifest.json +1 -1
- package/package.json +6 -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 +17 -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 +7 -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 +2 -2
- 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 +1 -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 +5 -6
- 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/{app/TestResult → TestResult}/TestResultOverview.tsx +13 -13
- 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 +8 -9
- 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 +5 -5
- 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 +25 -18
- 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 +6 -6
- 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 +3 -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 +7 -7
- package/src/i18n/locales/en.json +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 +1 -1
- package/src/utils/isMac.ts +6 -5
- package/src/utils/treeFilters.ts +107 -58
- package/test/utils/treeFilters.test.ts +25 -1
- package/tsconfig.json +5 -3
- package/vitest.config.ts +7 -1
- package/webpack.config.js +2 -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/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/{816.app-4468f0e2.js → 816.app-4375537b.js} +0 -0
- /package/dist/multi/{app-4468f0e2.js.LICENSE.txt → app-4375537b.js.LICENSE.txt} +0 -0
- /package/dist/single/{app-33b3c367.js.LICENSE.txt → app-f16f6693.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,8 +1,8 @@
|
|
|
1
|
-
import { FunctionalComponent } from "preact";
|
|
1
|
+
import type { FunctionalComponent } from "preact";
|
|
2
2
|
import { useState } from "preact/hooks";
|
|
3
|
-
import { AllureAwesomeTestResult } from "types";
|
|
4
|
-
import { MetadataList } from "@/components/
|
|
5
|
-
import { MetadataButton } from "@/components/
|
|
3
|
+
import type { AllureAwesomeTestResult } from "types";
|
|
4
|
+
import { MetadataList } from "@/components/Metadata";
|
|
5
|
+
import { MetadataButton } from "@/components/MetadataButton";
|
|
6
6
|
import { useI18n } from "@/stores/locale";
|
|
7
7
|
import * as styles from "./styles.scss";
|
|
8
8
|
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
+
import { type HistoryTestResult } from "@allurereport/core-api";
|
|
2
|
+
import { SvgIcon, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
1
3
|
import type { FunctionalComponent } from "preact";
|
|
2
4
|
import type { AllureAwesomeTestResult } from "types";
|
|
3
|
-
import
|
|
4
|
-
import { useTestResultTabsContext } from "@/components/app/TestResult/TestResultTabs";
|
|
5
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
6
|
-
import { TooltipWrapper } from "@/components/commons/Tooltip";
|
|
7
|
-
import { Text } from "@/components/commons/Typography";
|
|
8
|
-
import { navigateTo, openInNewTab } from "@/index";
|
|
5
|
+
import { navigateTo } from "@/index";
|
|
9
6
|
import { useI18n } from "@/stores";
|
|
10
7
|
import { capitalize } from "@/utils/capitalize";
|
|
11
8
|
import { timestampToDate } from "@/utils/time";
|
|
12
9
|
import * as styles from "./styles.scss";
|
|
13
10
|
|
|
14
|
-
const TestResultPrevStatus = ({ item }) => {
|
|
11
|
+
const TestResultPrevStatus: FunctionalComponent<{ item: HistoryTestResult }> = ({ item }) => {
|
|
15
12
|
return (
|
|
16
13
|
<div className={styles["test-result-prev-status"]} onClick={() => navigateTo(`testresult/${item.id}`)}>
|
|
17
|
-
<SvgIcon id={
|
|
14
|
+
<SvgIcon id={allureIcons.lineShapesDotCircle} className={styles[`status-${item?.status}`]} />
|
|
18
15
|
</div>
|
|
19
16
|
);
|
|
20
17
|
};
|
|
21
|
-
const TestResultPrevStatusTooltip = ({ item }) => {
|
|
18
|
+
const TestResultPrevStatusTooltip: FunctionalComponent<{ item: HistoryTestResult }> = ({ item }) => {
|
|
22
19
|
const convertedStop = item.stop && timestampToDate(item.stop);
|
|
23
20
|
const { t } = useI18n("statuses");
|
|
24
21
|
const status = t(item.status);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { formatDuration } from "@allurereport/core-api";
|
|
2
|
+
import { IconButton, Text, allureIcons } from "@allurereport/web-components";
|
|
3
|
+
import type { FunctionalComponent } from "preact";
|
|
4
|
+
import { useState } from "preact/hooks";
|
|
5
|
+
import type { AllureAwesomeTestResult } from "types";
|
|
6
|
+
import { ArrowButton } from "@/components/ArrowButton";
|
|
7
|
+
import { TestResultError } from "@/components/TestResult/TestResultError";
|
|
8
|
+
import * as styles from "@/components/TestResult/TestResultRetriesView/styles.scss";
|
|
9
|
+
import TreeItemIcon from "@/components/Tree/TreeItemIcon";
|
|
10
|
+
import { navigateTo } from "@/index";
|
|
11
|
+
import { timestampToDate } from "@/utils/time";
|
|
12
|
+
|
|
13
|
+
export const TestResultRetriesItem: FunctionalComponent<{
|
|
14
|
+
testResultItem: AllureAwesomeTestResult;
|
|
15
|
+
}> = ({ testResultItem }) => {
|
|
16
|
+
const { id, status, error, stop, duration } = testResultItem;
|
|
17
|
+
const [isOpened, setIsOpen] = useState(false);
|
|
18
|
+
const convertedStop = timestampToDate(stop);
|
|
19
|
+
const formattedDuration = typeof duration === "number" ? formatDuration(duration as number) : undefined;
|
|
20
|
+
const navigateUrl = `/testresult/${id}`;
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<div className={styles["test-result-retries-item-header"]} onClick={() => setIsOpen(!isOpened)}>
|
|
25
|
+
{Boolean(error) && <ArrowButton isOpened={isOpened} icon={allureIcons.lineArrowsChevronDown} />}
|
|
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
|
+
{Boolean(formattedDuration) && (
|
|
31
|
+
<Text type="ui" size={"s"} className={styles["item-time"]}>
|
|
32
|
+
{formattedDuration}
|
|
33
|
+
</Text>
|
|
34
|
+
)}
|
|
35
|
+
<IconButton
|
|
36
|
+
icon={allureIcons.lineGeneralLinkExternal}
|
|
37
|
+
style={"ghost"}
|
|
38
|
+
size={"s"}
|
|
39
|
+
className={styles["test-result-retries-item-link"]}
|
|
40
|
+
onClick={() => navigateTo(navigateUrl)}
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
{isOpened && error && (
|
|
46
|
+
<div className={styles["test-result-retries-item-content"]}>
|
|
47
|
+
<TestResultError {...error} />
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { FunctionalComponent } from "preact";
|
|
2
|
+
import type { AllureAwesomeTestResult } from "types";
|
|
3
|
+
import * as styles from "@/components/TestResult/TestResultHistory/styles.scss";
|
|
4
|
+
import { TestResultRetriesItem } from "@/components/TestResult/TestResultRetriesView/TestResultRetriesItem";
|
|
5
|
+
import { useI18n } from "@/stores";
|
|
6
|
+
|
|
7
|
+
export const TestResultRetriesView: FunctionalComponent<{
|
|
8
|
+
testResult: AllureAwesomeTestResult;
|
|
9
|
+
}> = ({ testResult }) => {
|
|
10
|
+
const { retries } = testResult ?? {};
|
|
11
|
+
const { t } = useI18n("empty");
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className={styles["test-result-history"]}>
|
|
15
|
+
{retries.length ? (
|
|
16
|
+
retries?.map((item, key) => (
|
|
17
|
+
<TestResultRetriesItem testResultItem={item as unknown as AllureAwesomeTestResult} key={key} />
|
|
18
|
+
))
|
|
19
|
+
) : (
|
|
20
|
+
<div className={styles["test-result-empty"]}>{t("no-retries-results")}</div>
|
|
21
|
+
)}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FunctionalComponent } from "preact";
|
|
1
|
+
import { allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import type { FunctionalComponent } from "preact";
|
|
3
3
|
import { useState } from "preact/hooks";
|
|
4
|
-
import { AllureAwesomeTestResult } from "types";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { TestResultStep } from "@/components/app/TestResult/TestResultSteps/testResultStep";
|
|
4
|
+
import type { AllureAwesomeTestResult } from "types";
|
|
5
|
+
import { TestResultDropdown } from "@/components/TestResult/TestResultDropdown";
|
|
6
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
7
|
+
import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
|
|
8
|
+
import { TestResultStep } from "@/components/TestResult/TestResultSteps/testResultStep";
|
|
10
9
|
import { useI18n } from "@/stores/locale";
|
|
11
10
|
|
|
12
11
|
const typeMap = {
|
|
@@ -27,7 +26,7 @@ export const TestResultSetup: FunctionalComponent<TestResultSetupProps> = ({ set
|
|
|
27
26
|
return (
|
|
28
27
|
<div className={styles["test-result-steps"]}>
|
|
29
28
|
<TestResultDropdown
|
|
30
|
-
icon={
|
|
29
|
+
icon={allureIcons.lineTimeClockStopwatch}
|
|
31
30
|
isOpened={isOpened}
|
|
32
31
|
setIsOpen={setIsOpen}
|
|
33
32
|
counter={setup?.length}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useI18n } from "@/stores/locale";
|
|
4
|
+
import { capitalize } from "@/utils/capitalize";
|
|
5
|
+
import * as styles from "./styles.scss";
|
|
6
|
+
|
|
7
|
+
const icons: Record<string, string> = {
|
|
8
|
+
blocker: allureIcons.lineArrowsChevronUpDouble,
|
|
9
|
+
critical: allureIcons.lineArrowsChevronUp,
|
|
10
|
+
normal: allureIcons.lineGeneralEqual,
|
|
11
|
+
minor: allureIcons.lineArrowsChevronDown,
|
|
12
|
+
trivial: allureIcons.lineArrowsChevronDownDouble,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const TestResultSeverity = ({ severity = "normal" }: { severity?: string }) => {
|
|
16
|
+
const { t } = useI18n("severity");
|
|
17
|
+
const statusClass = clsx(styles[`severity-${severity}`]);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className={styles["test-result-severity"]}>
|
|
21
|
+
<SvgIcon className={statusClass} id={icons[severity]} />
|
|
22
|
+
<Text size={"s"} bold className={styles["test-result-severity-text"]}>
|
|
23
|
+
{capitalize(t(severity))}
|
|
24
|
+
</Text>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TestStatus } from "@allurereport/core-api";
|
|
2
|
+
import { Text } from "@allurereport/web-components";
|
|
2
3
|
import clsx from "clsx";
|
|
3
|
-
import TreeItemIcon from "@/components/
|
|
4
|
-
import { Text } from "@/components/commons/Typography";
|
|
4
|
+
import TreeItemIcon from "@/components/Tree/TreeItemIcon";
|
|
5
5
|
import { useI18n } from "@/stores";
|
|
6
6
|
import { capitalize } from "@/utils/capitalize";
|
|
7
7
|
import * as styles from "./styles.scss";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { Spinner } from "@allurereport/web-components";
|
|
2
3
|
import type { FunctionalComponent } from "preact";
|
|
3
4
|
import { useEffect, useState } from "preact/hooks";
|
|
4
|
-
import { modalData } from "@/components/
|
|
5
|
-
import { HtmlAttachmentPreview } from "@/components/
|
|
6
|
-
import { AttachmentCode } from "@/components/
|
|
7
|
-
import { AttachmentImage } from "@/components/
|
|
8
|
-
import { AttachmentVideo } from "@/components/
|
|
9
|
-
import { EmptyComponent } from "@/components/
|
|
10
|
-
import { Spinner } from "@/components/commons/Spinner";
|
|
5
|
+
import { modalData } from "@/components/Modal";
|
|
6
|
+
import { HtmlAttachmentPreview } from "@/components/TestResult/TestResultSteps/HtmlAttachmentPreview";
|
|
7
|
+
import { AttachmentCode } from "@/components/TestResult/TestResultSteps/attachmentCode";
|
|
8
|
+
import { AttachmentImage } from "@/components/TestResult/TestResultSteps/attachmentImage";
|
|
9
|
+
import { AttachmentVideo } from "@/components/TestResult/TestResultSteps/attachmentVideo";
|
|
10
|
+
import { EmptyComponent } from "@/components/TestResult/TestResultSteps/wrongAttachment";
|
|
11
11
|
import { type Attachments, attachmentType, fetchAttachment } from "@/utils/attachments";
|
|
12
12
|
import * as styles from "./styles.scss";
|
|
13
13
|
|
|
14
|
-
const componentsByAttachmentType = {
|
|
14
|
+
const componentsByAttachmentType: Record<string, any> = {
|
|
15
15
|
image: AttachmentImage,
|
|
16
16
|
svg: AttachmentImage,
|
|
17
17
|
json: AttachmentCode,
|
|
@@ -23,7 +23,7 @@ const componentsByAttachmentType = {
|
|
|
23
23
|
text: AttachmentCode,
|
|
24
24
|
video: AttachmentVideo,
|
|
25
25
|
};
|
|
26
|
-
const previewComponentsByAttachmentType = {
|
|
26
|
+
const previewComponentsByAttachmentType: Record<string, any> = {
|
|
27
27
|
html: HtmlAttachmentPreview,
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -49,7 +49,7 @@ export const Attachment: FunctionalComponent<AttachmentTestStepResultProps> = ({
|
|
|
49
49
|
setAttachment(result);
|
|
50
50
|
};
|
|
51
51
|
fetchData();
|
|
52
|
-
}, [
|
|
52
|
+
}, [contentType, id, ext]);
|
|
53
53
|
|
|
54
54
|
if (!loaded) {
|
|
55
55
|
return (
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { type AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { type FunctionalComponent } from "preact";
|
|
1
3
|
import { useEffect } from "preact/hooks";
|
|
2
4
|
import Prism from "prismjs";
|
|
3
|
-
import "@/assets/scss/code.
|
|
5
|
+
import "@/assets/scss/code.scss";
|
|
4
6
|
|
|
5
|
-
export const AttachmentCode
|
|
7
|
+
export const AttachmentCode: FunctionalComponent<{
|
|
8
|
+
item: AttachmentTestStepResult;
|
|
9
|
+
attachment: { text?: string };
|
|
10
|
+
}> = ({ attachment, item }) => {
|
|
6
11
|
useEffect(() => {
|
|
7
12
|
Prism.highlightAll();
|
|
8
13
|
}, [attachment]);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { type FunctionalComponent } from "preact";
|
|
1
2
|
import { useEffect, useState } from "preact/hooks";
|
|
2
|
-
import * as styles from "@/components/
|
|
3
|
-
import { EmptyComponent } from "@/components/
|
|
3
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
4
|
+
import { EmptyComponent } from "@/components/TestResult/TestResultSteps/wrongAttachment";
|
|
4
5
|
|
|
5
|
-
export const AttachmentImage
|
|
6
|
+
export const AttachmentImage: FunctionalComponent<{
|
|
7
|
+
attachment: { img: string; originalFileName: string };
|
|
8
|
+
}> = ({ attachment }) => {
|
|
6
9
|
const [isValidImage, setIsValidImage] = useState(true);
|
|
7
10
|
|
|
8
11
|
useEffect(() => {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Spinner } from "@allurereport/web-components";
|
|
2
|
+
import { type FunctionalComponent } from "preact";
|
|
3
|
+
|
|
4
|
+
export const AttachmentVideo: FunctionalComponent<{
|
|
5
|
+
attachment: { src: string; contentType?: string };
|
|
6
|
+
}> = ({ attachment }) => {
|
|
7
|
+
if (!attachment) {
|
|
8
|
+
return <Spinner />;
|
|
9
|
+
}
|
|
10
|
+
return (
|
|
11
|
+
<video controls loop muted>
|
|
12
|
+
<source src={attachment?.src} type={attachment?.contentType} />
|
|
13
|
+
</video>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { allureIcons } from "@allurereport/web-components";
|
|
1
2
|
import type { FunctionalComponent } from "preact";
|
|
2
3
|
import { useState } from "preact/hooks";
|
|
3
4
|
import type { AllureAwesomeTestResult, AllureAwesomeTestStepResult } from "types";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TestResultStep } from "@/components/app/TestResult/TestResultSteps/testResultStep";
|
|
5
|
+
import { TestResultDropdown } from "@/components/TestResult/TestResultDropdown";
|
|
6
|
+
import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
|
|
7
|
+
import { TestResultStep } from "@/components/TestResult/TestResultSteps/testResultStep";
|
|
8
8
|
import { useI18n } from "@/stores/locale";
|
|
9
9
|
import * as styles from "./styles.scss";
|
|
10
10
|
|
|
@@ -29,7 +29,7 @@ export const TestResultSteps: FunctionalComponent<TestResultStepsProps> = ({ ste
|
|
|
29
29
|
return (
|
|
30
30
|
<div className={styles["test-result-steps"]}>
|
|
31
31
|
<TestResultDropdown
|
|
32
|
-
icon={
|
|
32
|
+
icon={allureIcons.lineHelpersPlayCircle}
|
|
33
33
|
isOpened={isOpened}
|
|
34
34
|
setIsOpen={setIsOpen}
|
|
35
35
|
counter={steps?.length}
|
package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachment.tsx
RENAMED
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { Code, SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
2
3
|
import type { FunctionComponent } from "preact";
|
|
3
4
|
import { useState } from "preact/hooks";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { Attachment } from "@/components/app/TestResult/TestResultSteps/attachment";
|
|
9
|
-
import * as styles from "@/components/app/TestResult/TestResultSteps/styles.scss";
|
|
10
|
-
import { TestResultAttachmentInfo } from "@/components/app/TestResult/TestResultSteps/testResultAttachmentInfo";
|
|
11
|
-
import { SvgIcon } from "@/components/commons/SvgIcon";
|
|
12
|
-
import { Code, Text } from "@/components/commons/Typography";
|
|
5
|
+
import { ArrowButton } from "@/components/ArrowButton";
|
|
6
|
+
import { Attachment } from "@/components/TestResult/TestResultSteps/attachment";
|
|
7
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
8
|
+
import { TestResultAttachmentInfo } from "@/components/TestResult/TestResultSteps/testResultAttachmentInfo";
|
|
13
9
|
import { attachmentType } from "@/utils/attachments";
|
|
14
10
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"text/
|
|
19
|
-
"
|
|
20
|
-
"text/
|
|
21
|
-
"text/
|
|
22
|
-
"text/
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"video/
|
|
30
|
-
"
|
|
11
|
+
const { lineImagesImage, lineFilesFileAttachment2 } = allureIcons;
|
|
12
|
+
|
|
13
|
+
const iconMap: Record<string, string> = {
|
|
14
|
+
"text/plain": lineFilesFileAttachment2,
|
|
15
|
+
"application/xml": lineFilesFileAttachment2,
|
|
16
|
+
"text/html": lineFilesFileAttachment2,
|
|
17
|
+
"text/csv": lineFilesFileAttachment2,
|
|
18
|
+
"text/tab-separated-values": lineFilesFileAttachment2,
|
|
19
|
+
"text/css": lineFilesFileAttachment2,
|
|
20
|
+
"text/uri-list": lineFilesFileAttachment2,
|
|
21
|
+
"image/svg+xml": lineImagesImage,
|
|
22
|
+
"image/png": lineImagesImage,
|
|
23
|
+
"application/json": lineFilesFileAttachment2,
|
|
24
|
+
"application/zip": lineFilesFileAttachment2,
|
|
25
|
+
"video/webm": lineImagesImage,
|
|
26
|
+
"image/jpeg": lineImagesImage,
|
|
27
|
+
"video/mp4": lineImagesImage,
|
|
28
|
+
"application/vnd.allure.image.diff": lineImagesImage,
|
|
31
29
|
};
|
|
32
30
|
|
|
33
31
|
export const TestResultAttachment: FunctionComponent<{
|
|
@@ -50,9 +48,9 @@ export const TestResultAttachment: FunctionComponent<{
|
|
|
50
48
|
setIsOpen((prev) => !prev);
|
|
51
49
|
}}
|
|
52
50
|
>
|
|
53
|
-
<ArrowButton isOpened={isOpened}
|
|
51
|
+
<ArrowButton isOpened={isOpened} />
|
|
54
52
|
<div className={styles["test-result-attachment-icon"]}>
|
|
55
|
-
<SvgIcon size="s" id={iconMap[link.contentType]
|
|
53
|
+
<SvgIcon size="s" id={iconMap[link.contentType] ?? lineFilesFileAttachment2} />
|
|
56
54
|
</div>
|
|
57
55
|
|
|
58
56
|
<Code size="s" className={styles["test-result-step-number"]}>
|
package/src/components/{app/TestResult → TestResult}/TestResultSteps/testResultAttachmentInfo.tsx
RENAMED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { AttachmentTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { IconButton, Text, TooltipWrapper, allureIcons } from "@allurereport/web-components";
|
|
2
3
|
import { filesize } from "filesize";
|
|
3
4
|
import type { FunctionalComponent } from "preact";
|
|
4
5
|
import { useEffect } from "preact/hooks";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Attachment } from "@/components/app/TestResult/TestResultSteps/attachment";
|
|
9
|
-
import * as styles from "@/components/app/TestResult/TestResultSteps/styles.scss";
|
|
10
|
-
import { IconButton } from "@/components/commons/Button";
|
|
11
|
-
import { TooltipWrapper } from "@/components/commons/Tooltip";
|
|
12
|
-
import { Text } from "@/components/commons/Typography";
|
|
6
|
+
import { isModalOpen, openModal } from "@/components/Modal";
|
|
7
|
+
import { Attachment } from "@/components/TestResult/TestResultSteps/attachment";
|
|
8
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
13
9
|
import { useI18n } from "@/stores";
|
|
14
10
|
import { downloadAttachment } from "@/utils/attachments";
|
|
15
11
|
|
|
@@ -26,7 +22,7 @@ export const TestResultAttachmentInfo: FunctionalComponent<TestResultAttachmentI
|
|
|
26
22
|
const { t: tooltip } = useI18n("controls");
|
|
27
23
|
const contentLength = item.link.missed === false ? item.link.contentLength : undefined;
|
|
28
24
|
const contentSize = contentLength
|
|
29
|
-
? filesize(contentLength
|
|
25
|
+
? filesize(contentLength, {
|
|
30
26
|
base: 2,
|
|
31
27
|
round: 1,
|
|
32
28
|
})
|
|
@@ -47,7 +43,7 @@ export const TestResultAttachmentInfo: FunctionalComponent<TestResultAttachmentI
|
|
|
47
43
|
component: <Attachment item={item} />,
|
|
48
44
|
});
|
|
49
45
|
}
|
|
50
|
-
}, []);
|
|
46
|
+
}, [item]);
|
|
51
47
|
|
|
52
48
|
const downloadData = async (e: MouseEvent) => {
|
|
53
49
|
e.stopPropagation();
|
|
@@ -66,7 +62,7 @@ export const TestResultAttachmentInfo: FunctionalComponent<TestResultAttachmentI
|
|
|
66
62
|
style={"ghost"}
|
|
67
63
|
size={"s"}
|
|
68
64
|
iconSize={"s"}
|
|
69
|
-
icon={
|
|
65
|
+
icon={allureIcons.lineArrowsExpand3}
|
|
70
66
|
onClick={expandAttachment}
|
|
71
67
|
/>
|
|
72
68
|
</TooltipWrapper>
|
|
@@ -77,7 +73,7 @@ export const TestResultAttachmentInfo: FunctionalComponent<TestResultAttachmentI
|
|
|
77
73
|
size={"s"}
|
|
78
74
|
iconSize={"s"}
|
|
79
75
|
className={styles["item-button"]}
|
|
80
|
-
icon={
|
|
76
|
+
icon={allureIcons.lineGeneralDownloadCloud}
|
|
81
77
|
onClick={(e: MouseEvent) => downloadData(e)}
|
|
82
78
|
/>
|
|
83
79
|
</TooltipWrapper>
|
|
@@ -1,35 +1,42 @@
|
|
|
1
1
|
import type { DefaultTestStepResult } from "@allurereport/core-api";
|
|
2
|
+
import { Code, Text, allureIcons } from "@allurereport/web-components";
|
|
2
3
|
import type { FunctionComponent } from "preact";
|
|
3
4
|
import { useState } from "preact/hooks";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import * as styles from "@/components/
|
|
8
|
-
import { TestResultAttachment } from "@/components/
|
|
9
|
-
import { TestResultStepInfo } from "@/components/
|
|
10
|
-
import TreeItemIcon from "@/components/
|
|
11
|
-
|
|
5
|
+
import { ArrowButton } from "@/components/ArrowButton";
|
|
6
|
+
import { MetadataList } from "@/components/Metadata";
|
|
7
|
+
import { type MetadataItem } from "@/components/ReportMetadata";
|
|
8
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
9
|
+
import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
|
|
10
|
+
import { TestResultStepInfo } from "@/components/TestResult/TestResultSteps/testResultStepInfo";
|
|
11
|
+
import TreeItemIcon from "@/components/Tree/TreeItemIcon";
|
|
12
|
+
|
|
13
|
+
export const TestResultStepParameters = (props: { parameters: DefaultTestStepResult["parameters"] }) => {
|
|
14
|
+
const { parameters } = props;
|
|
12
15
|
|
|
13
|
-
export const TestResultStepParameters = ({ parameters }) => {
|
|
14
16
|
return (
|
|
15
17
|
<div className={styles["test-result-parameters"]}>
|
|
16
|
-
<MetadataList size={"s"} envInfo={parameters} columns={1} />
|
|
18
|
+
<MetadataList size={"s"} envInfo={parameters as unknown as MetadataItem[]} columns={1} />
|
|
17
19
|
</div>
|
|
18
20
|
);
|
|
19
21
|
};
|
|
20
|
-
export const TestResultStepsContent = ({ item }) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
attachment: TestResultAttachment,
|
|
24
|
-
};
|
|
22
|
+
export const TestResultStepsContent = (props: { item: DefaultTestStepResult }) => {
|
|
23
|
+
const { item } = props;
|
|
24
|
+
|
|
25
25
|
return (
|
|
26
26
|
<div className={styles["test-result-step-content"]}>
|
|
27
27
|
{Boolean(item?.parameters?.length) && <TestResultStepParameters parameters={item.parameters} />}
|
|
28
28
|
{Boolean(item?.steps?.length) && (
|
|
29
29
|
<>
|
|
30
30
|
{item.steps?.map((subItem, key) => {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
if (subItem.type === "step") {
|
|
32
|
+
return <TestResultStep stepIndex={key + 1} key={key} item={subItem} />;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (subItem.type === "attachment") {
|
|
36
|
+
return <TestResultAttachment stepIndex={key + 1} key={key} item={subItem} />;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return null;
|
|
33
40
|
})}
|
|
34
41
|
</>
|
|
35
42
|
)}
|
|
@@ -53,7 +60,7 @@ export const TestResultStep: FunctionComponent<{
|
|
|
53
60
|
) : (
|
|
54
61
|
<ArrowButton
|
|
55
62
|
isOpened={isOpened}
|
|
56
|
-
icon={arrowsChevronDown
|
|
63
|
+
icon={allureIcons.arrowsChevronDown}
|
|
57
64
|
iconSize={"xs"}
|
|
58
65
|
className={!hasContent ? styles["test-result-visibility-hidden"] : ""}
|
|
59
66
|
/>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type DefaultTestStepResult, formatDuration } from "@allurereport/core-api";
|
|
2
|
+
import { SvgIcon, Text, allureIcons } from "@allurereport/web-components";
|
|
3
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
4
|
+
|
|
5
|
+
export const TestResultStepInfo = (props: { item: DefaultTestStepResult }) => {
|
|
6
|
+
const { item } = props;
|
|
7
|
+
const formattedDuration = formatDuration(item?.duration as number);
|
|
8
|
+
const stepLength = item.steps?.length;
|
|
9
|
+
const attachmentLength = item.steps?.filter((step) => step.type === "attachment")?.length;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<div className={styles["item-info"]}>
|
|
13
|
+
{Boolean(stepLength) && (
|
|
14
|
+
<div className={styles["item-info-step"]}>
|
|
15
|
+
<SvgIcon id={allureIcons.lineArrowsCornerDownRight} className={styles["item-info-step-icon"]} />
|
|
16
|
+
<Text size={"s"}>{stepLength}</Text>
|
|
17
|
+
</div>
|
|
18
|
+
)}
|
|
19
|
+
{Boolean(attachmentLength) && (
|
|
20
|
+
<div className={styles["item-info-step"]}>
|
|
21
|
+
<SvgIcon id={allureIcons.lineFilesFileAttachment2} className={styles["item-info-step-icon"]} />
|
|
22
|
+
<Text size={"s"}>{attachmentLength}</Text>
|
|
23
|
+
</div>
|
|
24
|
+
)}
|
|
25
|
+
<Text type="ui" size={"s"} className={styles["item-time"]}>
|
|
26
|
+
{formattedDuration}
|
|
27
|
+
</Text>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Text } from "@allurereport/web-components";
|
|
1
2
|
import { type ComponentChildren, createContext } from "preact";
|
|
2
3
|
import { useContext, useState } from "preact/hooks";
|
|
3
|
-
import { Text } from "@/components/commons/Typography";
|
|
4
4
|
import * as styles from "./styles.scss";
|
|
5
5
|
|
|
6
6
|
type TestResultTabsContextT = {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { allureIcons } from "@allurereport/web-components";
|
|
1
2
|
import type { FunctionalComponent } from "preact";
|
|
2
3
|
import { useState } from "preact/hooks";
|
|
3
4
|
import type { AllureAwesomeTestResult } from "types";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { TestResultStep } from "@/components/app/TestResult/TestResultSteps/testResultStep";
|
|
5
|
+
import { TestResultDropdown } from "@/components/TestResult/TestResultDropdown";
|
|
6
|
+
import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
|
|
7
|
+
import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
|
|
8
|
+
import { TestResultStep } from "@/components/TestResult/TestResultSteps/testResultStep";
|
|
9
9
|
import { useI18n } from "@/stores/locale";
|
|
10
10
|
|
|
11
11
|
const typeMap = {
|
|
@@ -26,7 +26,7 @@ export const TestResultTeardown: FunctionalComponent<TestResultTeardownProps> =
|
|
|
26
26
|
return (
|
|
27
27
|
<div className={styles["test-result-steps"]}>
|
|
28
28
|
<TestResultDropdown
|
|
29
|
-
icon={lineHelpersFlag
|
|
29
|
+
icon={allureIcons.lineHelpersFlag}
|
|
30
30
|
isOpened={isOpened}
|
|
31
31
|
setIsOpen={setIsOpen}
|
|
32
32
|
counter={teardown?.length}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { FunctionComponent, FunctionalComponent } from "preact";
|
|
2
2
|
import type { AllureAwesomeTestResult } from "types";
|
|
3
|
-
import * as styles from "@/components/
|
|
4
|
-
import { TestResultAttachmentView } from "@/components/
|
|
5
|
-
import TestResultEmpty from "@/components/
|
|
6
|
-
import { TestResultHeader } from "@/components/
|
|
7
|
-
import TestResultHistoryView from "@/components/
|
|
8
|
-
import { TestResultInfo } from "@/components/
|
|
9
|
-
import { TestResultOverview } from "@/components/
|
|
10
|
-
import { TestResultRetriesView } from "@/components/
|
|
11
|
-
import { TestResultTabs, useTestResultTabsContext } from "@/components/
|
|
3
|
+
import * as styles from "@/components/BaseLayout/styles.scss";
|
|
4
|
+
import { TestResultAttachmentView } from "@/components/TestResult/TestResultAttachmentsView";
|
|
5
|
+
import TestResultEmpty from "@/components/TestResult/TestResultEmpty";
|
|
6
|
+
import { TestResultHeader } from "@/components/TestResult/TestResultHeader";
|
|
7
|
+
import TestResultHistoryView from "@/components/TestResult/TestResultHistory";
|
|
8
|
+
import { TestResultInfo } from "@/components/TestResult/TestResultInfo";
|
|
9
|
+
import { TestResultOverview } from "@/components/TestResult/TestResultOverview";
|
|
10
|
+
import { TestResultRetriesView } from "@/components/TestResult/TestResultRetriesView";
|
|
11
|
+
import { TestResultTabs, useTestResultTabsContext } from "@/components/TestResult/TestResultTabs";
|
|
12
12
|
|
|
13
13
|
export type TestResultViewProps = {
|
|
14
14
|
testResult?: AllureAwesomeTestResult;
|
|
@@ -16,7 +16,7 @@ export type TestResultViewProps = {
|
|
|
16
16
|
|
|
17
17
|
const TestResultView: FunctionalComponent<TestResultViewProps> = ({ testResult }) => {
|
|
18
18
|
const { currentTab } = useTestResultTabsContext();
|
|
19
|
-
const viewMap = {
|
|
19
|
+
const viewMap: Record<string, any> = {
|
|
20
20
|
overview: TestResultOverview,
|
|
21
21
|
history: TestResultHistoryView,
|
|
22
22
|
attachments: TestResultAttachmentView,
|