@allurereport/web-awesome 3.0.0-beta.11 → 3.0.0-beta.13

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.
Files changed (86) hide show
  1. package/dist/multi/173.app-01ff983b.js +1 -0
  2. package/dist/multi/174.app-01ff983b.js +1 -0
  3. package/dist/multi/252.app-01ff983b.js +1 -0
  4. package/dist/multi/282.app-01ff983b.js +1 -0
  5. package/dist/multi/29.app-01ff983b.js +1 -0
  6. package/dist/multi/{747.app-f4b5d260.js → 416.app-01ff983b.js} +1 -1
  7. package/dist/multi/527.app-01ff983b.js +1 -0
  8. package/dist/multi/600.app-01ff983b.js +1 -0
  9. package/dist/multi/605.app-01ff983b.js +1 -0
  10. package/dist/multi/638.app-01ff983b.js +1 -0
  11. package/dist/multi/672.app-01ff983b.js +1 -0
  12. package/dist/multi/686.app-01ff983b.js +1 -0
  13. package/dist/multi/725.app-01ff983b.js +1 -0
  14. package/dist/multi/741.app-01ff983b.js +1 -0
  15. package/dist/multi/755.app-01ff983b.js +1 -0
  16. package/dist/multi/{873.app-f4b5d260.js → 894.app-01ff983b.js} +1 -1
  17. package/dist/multi/943.app-01ff983b.js +1 -0
  18. package/dist/multi/980.app-01ff983b.js +1 -0
  19. package/dist/multi/app-01ff983b.js +2 -0
  20. package/dist/multi/app-01ff983b.js.LICENSE.txt +23 -0
  21. package/dist/multi/manifest.json +20 -20
  22. package/dist/multi/{styles-f4b5d260.css → styles-01ff983b.css} +3 -3
  23. package/dist/single/app-607f21f7.js +2 -0
  24. package/dist/single/app-607f21f7.js.LICENSE.txt +23 -0
  25. package/dist/single/manifest.json +1 -1
  26. package/package.json +4 -4
  27. package/src/components/Header/index.tsx +2 -10
  28. package/src/components/HeaderControls/index.tsx +20 -0
  29. package/src/components/ReportBody/Filters.tsx +2 -2
  30. package/src/components/ReportMetadata/MetadataSummary.tsx +11 -8
  31. package/src/components/ReportMetadata/MetadataWithIcon.tsx +2 -2
  32. package/src/components/TestResult/TrEnvironmentItem/index.tsx +2 -1
  33. package/src/components/TestResult/TrEnvironmentsView/index.tsx +2 -2
  34. package/src/components/TestResult/TrHeader/index.tsx +2 -10
  35. package/src/components/TestResult/TrInfo/index.tsx +16 -12
  36. package/src/components/TestResult/TrSteps/TrAttachment.tsx +3 -2
  37. package/src/components/TestResult/TrSteps/TrStep.tsx +9 -4
  38. package/src/components/TestResult/TrSteps/styles.scss +0 -4
  39. package/src/components/TestResult/TrTabs/index.tsx +11 -3
  40. package/src/components/TestResult/TrTabs/styles.scss +0 -3
  41. package/src/components/Tree/index.tsx +5 -1
  42. package/src/index.tsx +1 -0
  43. package/src/{i18n/locales → locales}/az.json +2 -2
  44. package/src/{i18n/locales → locales}/de.json +2 -2
  45. package/src/{i18n/locales → locales}/en.json +4 -4
  46. package/src/{i18n/locales → locales}/es.json +2 -2
  47. package/src/{i18n/locales → locales}/fr.json +2 -2
  48. package/src/{i18n/locales → locales}/he.json +2 -2
  49. package/src/{i18n/locales → locales}/hy.json +2 -2
  50. package/src/{i18n/locales → locales}/it.json +2 -2
  51. package/src/{i18n/locales → locales}/ja.json +2 -2
  52. package/src/{i18n/locales → locales}/ka.json +5 -5
  53. package/src/{i18n/locales → locales}/kr.json +4 -4
  54. package/src/{i18n/locales → locales}/nl.json +2 -2
  55. package/src/{i18n/locales → locales}/pl.json +3 -3
  56. package/src/{i18n/locales → locales}/pt.json +2 -2
  57. package/src/{i18n/locales → locales}/ru.json +3 -3
  58. package/src/{i18n/locales → locales}/sv.json +2 -2
  59. package/src/{i18n/locales → locales}/tr.json +2 -2
  60. package/src/{i18n/locales → locales}/zh.json +2 -2
  61. package/src/stores/locale.ts +2 -3
  62. package/src/utils/time.ts +1 -0
  63. package/types.d.ts +2 -1
  64. package/dist/multi/141.app-f4b5d260.js +0 -1
  65. package/dist/multi/222.app-f4b5d260.js +0 -1
  66. package/dist/multi/335.app-f4b5d260.js +0 -1
  67. package/dist/multi/34.app-f4b5d260.js +0 -1
  68. package/dist/multi/349.app-f4b5d260.js +0 -1
  69. package/dist/multi/378.app-f4b5d260.js +0 -1
  70. package/dist/multi/406.app-f4b5d260.js +0 -1
  71. package/dist/multi/457.app-f4b5d260.js +0 -1
  72. package/dist/multi/53.app-f4b5d260.js +0 -1
  73. package/dist/multi/584.app-f4b5d260.js +0 -1
  74. package/dist/multi/690.app-f4b5d260.js +0 -1
  75. package/dist/multi/767.app-f4b5d260.js +0 -1
  76. package/dist/multi/816.app-f4b5d260.js +0 -1
  77. package/dist/multi/83.app-f4b5d260.js +0 -1
  78. package/dist/multi/920.app-f4b5d260.js +0 -1
  79. package/dist/multi/991.app-f4b5d260.js +0 -1
  80. package/dist/multi/app-f4b5d260.js +0 -2
  81. package/dist/multi/app-f4b5d260.js.LICENSE.txt +0 -8
  82. package/dist/single/app-b182550e.js +0 -2
  83. package/dist/single/app-b182550e.js.LICENSE.txt +0 -8
  84. package/src/components/LanguagePicker/index.tsx +0 -40
  85. package/src/components/ThemeButton/ThemeButton.tsx +0 -20
  86. package/src/i18n/constants.ts +0 -124
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Prism: Lightweight, robust, elegant syntax highlighting
3
+ *
4
+ * @license MIT <https://opensource.org/licenses/MIT>
5
+ * @author Lea Verou <https://lea.verou.me>
6
+ * @namespace
7
+ * @public
8
+ */
9
+
10
+ /**
11
+ * filesize
12
+ *
13
+ * @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
14
+ * @license BSD-3-Clause
15
+ * @version 10.1.6
16
+ */
17
+
18
+ /**!
19
+ * Sortable 1.15.6
20
+ * @author RubaXa <trash@rubaxa.org>
21
+ * @author owenm <owen23355@gmail.com>
22
+ * @license MIT
23
+ */
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-b182550e.js"
2
+ "main.js": "app-607f21f7.js"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/web-awesome",
3
- "version": "3.0.0-beta.11",
3
+ "version": "3.0.0-beta.13",
4
4
  "description": "The static files for Allure Awesome Report",
5
5
  "keywords": [
6
6
  "allure",
@@ -31,9 +31,9 @@
31
31
  "IE 11"
32
32
  ],
33
33
  "dependencies": {
34
- "@allurereport/core-api": "3.0.0-beta.11",
35
- "@allurereport/web-commons": "3.0.0-beta.11",
36
- "@allurereport/web-components": "3.0.0-beta.11",
34
+ "@allurereport/core-api": "3.0.0-beta.13",
35
+ "@allurereport/web-commons": "3.0.0-beta.13",
36
+ "@allurereport/web-components": "3.0.0-beta.13",
37
37
  "@preact/signals": "^1.3.0",
38
38
  "clsx": "^2.1.1",
39
39
  "d3-shape": "^3.2.0",
@@ -1,10 +1,7 @@
1
1
  import type { ClassValue } from "clsx";
2
2
  import clsx from "clsx";
3
- import { EnvironmentPicker } from "@/components/EnvironmentPicker";
4
- import { LanguagePicker } from "@/components/LanguagePicker";
3
+ import { HeaderControls } from "@/components/HeaderControls";
5
4
  import { TrBreadcrumbs } from "@/components/TestResult/TrHeader/TrBreadcrumbs";
6
- import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
7
- import ToggleLayout from "@/components/ToggleLayout";
8
5
  import { route } from "@/stores/router";
9
6
  import { testResultStore } from "@/stores/testResults";
10
7
  import * as styles from "./styles.scss";
@@ -19,12 +16,7 @@ export const Header = ({ className }: HeaderProps) => {
19
16
  return (
20
17
  <div className={clsx(styles.above, className)}>
21
18
  {id && <TrBreadcrumbs testResult={testResultStore.value?.data?.[id]} />}
22
- <div className={styles.right}>
23
- <EnvironmentPicker />
24
- <LanguagePicker />
25
- <ToggleLayout />
26
- <ThemeButton />
27
- </div>
19
+ <HeaderControls className={styles.right} />
28
20
  </div>
29
21
  );
30
22
  };
@@ -0,0 +1,20 @@
1
+ import { LanguagePicker, ThemeButton } from "@allurereport/web-components";
2
+ import { EnvironmentPicker } from "@/components/EnvironmentPicker";
3
+ import ToggleLayout from "@/components/ToggleLayout";
4
+ import { currentLocale, setLocale } from "@/stores/locale";
5
+ import { getTheme, themeStore, toggleTheme } from "@/stores/theme";
6
+
7
+ interface HeaderControlsProps {
8
+ className?: string;
9
+ }
10
+
11
+ export const HeaderControls = ({ className }: HeaderControlsProps) => {
12
+ return (
13
+ <div className={className}>
14
+ <EnvironmentPicker />
15
+ <LanguagePicker locale={currentLocale.value} setLocale={setLocale} />
16
+ <ToggleLayout />
17
+ <ThemeButton theme={themeStore.value} toggleTheme={toggleTheme} getTheme={getTheme} />
18
+ </div>
19
+ );
20
+ };
@@ -24,14 +24,14 @@ export const Filters = () => {
24
24
  </div>
25
25
  )}
26
26
  >
27
- <Menu.Section>
27
+ <Menu.Section data-testid="filters-menu">
28
28
  <Menu.Item
29
29
  closeMenuOnClick={false}
30
30
  ariaLabel={t("enable-filter", { filter: t("flaky") })}
31
31
  onClick={() => {
32
32
  setTreeFilter("flaky", !flaky);
33
33
  }}
34
- leadingIcon={allureIcons.lineGeneralZap}
34
+ leadingIcon={allureIcons.lineIconBomb2}
35
35
  rightSlot={
36
36
  <div className={styles.filterToggle}>
37
37
  <Toggle
@@ -12,26 +12,29 @@ export interface MetadataSummaryProps {
12
12
  stats: Statistic;
13
13
  }
14
14
 
15
+ const metadataTestsTypes = ["flaky", "retries"] as const as (keyof Statistic)[];
16
+
15
17
  export const MetadataSummary: FunctionalComponent<MetadataSummaryProps> = ({ stats }) => {
16
18
  const { t } = useI18n("statuses");
17
19
  const { t: testSummary } = useI18n("testSummary");
20
+
18
21
  const allTest = computed(() => ({
19
- title: capitalize(t("total")),
22
+ title: testSummary("total"),
20
23
  type: "all",
21
24
  count: stats.total,
22
25
  }));
23
- const metaDataTests = ["flaky", "retry"]
24
- .map((key) => {
25
- if (!stats[key as keyof Statistic]) {
26
+
27
+ const metaDataTests = metadataTestsTypes
28
+ .map((type) => {
29
+ if (!stats[type]) {
26
30
  return;
27
31
  }
28
32
 
29
- const title = testSummary(key);
30
- const props = { title, count: stats[key as keyof Statistic] || 0, type: key };
33
+ const props = { title: testSummary(type), count: stats[type] || 0, type: type };
31
34
 
32
35
  return (
33
- <div key={key}>
34
- <MetadataItem key={key} props={props} renderComponent={MetadataWithIcon} />
36
+ <div key={type}>
37
+ <MetadataItem data-testid={`metadata-item-${type}`} props={props} renderComponent={MetadataWithIcon} />
35
38
  </div>
36
39
  );
37
40
  })
@@ -4,8 +4,8 @@ import type { MetadataProps } from "@/components/ReportMetadata/MetadataItem";
4
4
  import * as styles from "./styles.scss";
5
5
 
6
6
  const icons: Record<string, string> = {
7
- flaky: allureIcons.lineGeneralZap,
8
- retry: allureIcons.lineArrowsRefreshCcw1,
7
+ flaky: allureIcons.lineIconBomb2,
8
+ retries: allureIcons.lineArrowsRefreshCcw1,
9
9
  new: allureIcons.lineAlertsNotificationBox,
10
10
  };
11
11
 
@@ -19,7 +19,7 @@ export const TrEnvironmentItem: FunctionalComponent<{
19
19
  const { status, error, stop, duration, id } = testResult;
20
20
  const [isOpened, setIsOpen] = useState(false);
21
21
  const hasEmptyError = !error || !Object.keys(error).length;
22
- const convertedStop = timestampToDate(stop);
22
+ const convertedStop = stop ? timestampToDate(stop) : "";
23
23
  const formattedDuration = formatDuration(duration as number);
24
24
  const { t } = useI18n("controls");
25
25
  const navigateUrl = id;
@@ -36,6 +36,7 @@ export const TrEnvironmentItem: FunctionalComponent<{
36
36
  className={cx(styles["test-result-environment-item-wrap"], {
37
37
  [styles.current]: current,
38
38
  })}
39
+ role={current ? undefined : "button"}
39
40
  onClick={(e) => {
40
41
  if (current) {
41
42
  return;
@@ -1,4 +1,4 @@
1
- import type { TestEnvGroup } from "@allurereport/core-api";
1
+ import { type TestEnvGroup, getRealEnvsCount } from "@allurereport/core-api";
2
2
  import { Loadable } from "@allurereport/web-components";
3
3
  import type { FunctionalComponent } from "preact";
4
4
  import { useEffect } from "preact/hooks";
@@ -39,7 +39,7 @@ export const TrEnvironmentsView: FunctionalComponent<{
39
39
  <Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
40
40
  source={testEnvGroupsStore}
41
41
  renderData={(group) => {
42
- if (!group) {
42
+ if (!getRealEnvsCount(group)) {
43
43
  return <div className={styles["test-result-empty"]}>{t("no-environments-results")}</div>;
44
44
  }
45
45
 
@@ -1,10 +1,7 @@
1
1
  import type { FunctionalComponent } from "preact";
2
- import { EnvironmentPicker } from "@/components/EnvironmentPicker";
3
- import { LanguagePicker } from "@/components/LanguagePicker";
2
+ import { HeaderControls } from "@/components/HeaderControls";
4
3
  import type { TrProps } from "@/components/TestResult";
5
4
  import { TrBreadcrumbs } from "@/components/TestResult/TrHeader/TrBreadcrumbs";
6
- import { ThemeButton } from "@/components/ThemeButton/ThemeButton";
7
- import ToggleLayout from "@/components/ToggleLayout";
8
5
  import { isSplitMode } from "@/stores/layout";
9
6
  import * as styles from "./styles.scss";
10
7
 
@@ -12,12 +9,7 @@ export const TrHeader: FunctionalComponent<TrProps> = ({ testResult }) => {
12
9
  return (
13
10
  <div className={styles.above}>
14
11
  {!isSplitMode.value ? <TrBreadcrumbs testResult={testResult} /> : ""}
15
- <div className={styles.right}>
16
- <EnvironmentPicker />
17
- <LanguagePicker />
18
- <ToggleLayout />
19
- <ThemeButton />
20
- </div>
12
+ <HeaderControls className={styles.right} />
21
13
  </div>
22
14
  );
23
15
  };
@@ -1,4 +1,4 @@
1
- import type { TestEnvGroup } from "@allurereport/core-api";
1
+ import { type TestEnvGroup, getRealEnvsCount } from "@allurereport/core-api";
2
2
  import { formatDuration } from "@allurereport/core-api";
3
3
  import { Counter, Heading, Loadable, Text, TooltipWrapper } from "@allurereport/web-components";
4
4
  import clsx from "clsx";
@@ -50,19 +50,19 @@ export const TrInfo: FunctionalComponent<TrInfoProps> = ({ testResult }) => {
50
50
  <div className={styles["test-result-tabs"]}>
51
51
  <TrTabsList>
52
52
  <TrTab id="overview">{t("overview")}</TrTab>
53
- <TrTab id="history" disabled={!history?.length}>
53
+ <TrTab id="history">
54
54
  <div className={styles["test-result-tab"]}>
55
55
  {t("history")}
56
56
  {Boolean(history?.length) && <Counter size={"s"} count={history?.length} />}
57
57
  </div>
58
58
  </TrTab>
59
- <TrTab id="retries" disabled={!retries?.length}>
59
+ <TrTab id="retries">
60
60
  <div className={styles["test-result-tab"]}>
61
61
  {t("retries")}
62
62
  {Boolean(retries?.length) && <Counter size={"s"} count={retries?.length} />}
63
63
  </div>
64
64
  </TrTab>
65
- <TrTab id="attachments" disabled={!attachments?.length}>
65
+ <TrTab id="attachments">
66
66
  <div className={styles["test-result-tab"]}>
67
67
  {t("attachments")}
68
68
  {Boolean(attachments?.length) && <Counter size={"s"} count={attachments?.length} />}
@@ -71,14 +71,18 @@ export const TrInfo: FunctionalComponent<TrInfoProps> = ({ testResult }) => {
71
71
  <Loadable<Record<string, TestEnvGroup>, TestEnvGroup | undefined>
72
72
  source={testEnvGroupsStore}
73
73
  transformData={(groups) => groups[testResult.testCase.id]}
74
- renderData={(group) => (
75
- <TrTab id="environments" disabled={!group}>
76
- <div className={styles["test-result-tab"]}>
77
- {t("environments")}
78
- {Boolean(group) && <Counter size={"s"} count={Object.keys(group.testResultsByEnv).length} />}
79
- </div>
80
- </TrTab>
81
- )}
74
+ renderData={(group) => {
75
+ const envsCount = getRealEnvsCount(group);
76
+
77
+ return (
78
+ <TrTab id="environments">
79
+ <div className={styles["test-result-tab"]}>
80
+ {t("environments")}
81
+ {!!envsCount && <Counter size={"s"} count={envsCount} />}
82
+ </div>
83
+ </TrTab>
84
+ );
85
+ }}
82
86
  />
83
87
  </TrTabsList>
84
88
  </div>
@@ -41,8 +41,9 @@ export const TrAttachment: FunctionComponent<{
41
41
  const isValidComponentType = !["archive", null].includes(componentType.type as string);
42
42
 
43
43
  return (
44
- <div className={styles["test-result-step"]}>
44
+ <div data-testid={"test-result-attachment"} className={styles["test-result-step"]}>
45
45
  <div
46
+ data-testid={"test-result-attachment-header"}
46
47
  className={styles["test-result-attachment-header"]}
47
48
  onClick={(e) => {
48
49
  e.stopPropagation();
@@ -59,7 +60,7 @@ export const TrAttachment: FunctionComponent<{
59
60
  </Code>
60
61
  <Text className={styles["test-result-attachment-text"]}>{link.name || link.originalFileName}</Text>
61
62
  {missed && (
62
- <Text size={"s"} className={styles["test-result-attachment-missed"]}>
63
+ <Text size={"s"} className={styles["test-result-attachment-missed"]} data-testid={"test-result-attachment-missed"}>
63
64
  missed
64
65
  </Text>
65
66
  )}
@@ -5,6 +5,7 @@ import { useState } from "preact/hooks";
5
5
  import { ArrowButton } from "@/components/ArrowButton";
6
6
  import { MetadataList } from "@/components/Metadata";
7
7
  import { type MetadataItem } from "@/components/ReportMetadata";
8
+ import { TrError } from "@/components/TestResult/TrError";
8
9
  import { TrAttachment } from "@/components/TestResult/TrSteps/TrAttachment";
9
10
  import { TrStepInfo } from "@/components/TestResult/TrSteps/TrStepInfo";
10
11
  import * as styles from "@/components/TestResult/TrSteps/styles.scss";
@@ -23,8 +24,9 @@ export const TrStepsContent = (props: { item: DefaultTestStepResult }) => {
23
24
  const { item } = props;
24
25
 
25
26
  return (
26
- <div className={styles["test-result-step-content"]}>
27
+ <div data-testid={"test-result-step-content"} className={styles["test-result-step-content"]}>
27
28
  {Boolean(item?.parameters?.length) && <TrStepParameters parameters={item.parameters} />}
29
+ {Boolean(item?.message && item?.trace) && <TrError {...item} />}
28
30
  {Boolean(item?.steps?.length) && (
29
31
  <>
30
32
  {item.steps?.map((subItem, key) => {
@@ -60,7 +62,7 @@ export const TrStep: FunctionComponent<{
60
62
  const haveFailedSteps = hasFailedStep(item);
61
63
  const isEarlyOpened = collapsedTrees.value.has(item.stepId) ? false : Boolean(haveFailedSteps);
62
64
  const [isOpened, setIsOpen] = useState(isEarlyOpened || false);
63
- const hasContent = Boolean(item?.steps?.length || item?.parameters?.length);
65
+ const hasContent = Boolean(item?.steps?.length || item?.parameters?.length || item?.message || item?.trace);
64
66
 
65
67
  const handleClick = () => {
66
68
  setIsOpen(!isOpened);
@@ -68,7 +70,7 @@ export const TrStep: FunctionComponent<{
68
70
  };
69
71
 
70
72
  return (
71
- <div className={styles["test-result-step"]}>
73
+ <div data-testid={"test-result-step"} className={styles["test-result-step"]}>
72
74
  <div className={styles["test-result-step-header"]} onClick={handleClick}>
73
75
  {!hasContent ? (
74
76
  <div className={styles["test-result-strut"]} />
@@ -78,13 +80,16 @@ export const TrStep: FunctionComponent<{
78
80
  icon={allureIcons.arrowsChevronDown}
79
81
  iconSize={"xs"}
80
82
  className={!hasContent ? styles["test-result-visibility-hidden"] : ""}
83
+ data-testid={"test-result-step-arrow-button"}
81
84
  />
82
85
  )}
83
86
  <TreeItemIcon status={item.status} />
84
87
  <Code size={"s"} className={styles["test-result-step-number"]}>
85
88
  {stepIndex}
86
89
  </Code>
87
- <Text className={styles["test-result-header-text"]}>{item.name}</Text>
90
+ <Text data-testid={"test-result-step-title"} className={styles["test-result-header-text"]}>
91
+ {item.name}
92
+ </Text>
88
93
  <TrStepInfo item={item} />
89
94
  </div>
90
95
  {hasContent && isOpened && <TrStepsContent item={item} />}
@@ -23,16 +23,12 @@
23
23
  }
24
24
 
25
25
  .test-result-attachment-content {
26
- max-height: 450px;
27
- overflow-y: auto;
28
26
  border-top: 1px solid var(--on-border-muted);
29
27
  }
30
28
 
31
29
  .test-result-attachment-content-wrapper {
32
30
  padding-left: 16px;
33
31
  margin-left: 11px;
34
- max-height: 450px;
35
- overflow-y: auto;
36
32
  }
37
33
 
38
34
  .test-result-step-root {
@@ -38,7 +38,7 @@ export const TrTabsList = (props: { children: ComponentChildren }) => {
38
38
  return <div className={styles.tabsList}>{props.children}</div>;
39
39
  };
40
40
 
41
- export const TrTab = (props: { id: string; children: ComponentChildren; disabled?: boolean }) => {
41
+ export const TrTab = (props: { id: string; children: ComponentChildren }) => {
42
42
  const { currentTab, setCurrentTab } = useTestResultTabsContext();
43
43
  const { id, children } = props;
44
44
  const isActiveFromUrl = activeTab.value === id;
@@ -55,11 +55,19 @@ export const TrTab = (props: { id: string; children: ComponentChildren; disabled
55
55
  return;
56
56
  }
57
57
  setCurrentTab(id);
58
- navigateTo({ ...route.value, params: { ...route.value.params, tabName: id !== "overview" ? id : "" } });
58
+ navigateTo({
59
+ ...route.value,
60
+ params: { ...route.value.params, tabName: id !== "overview" ? id : "" },
61
+ });
59
62
  };
60
63
 
61
64
  return (
62
- <button className={styles.tab} onClick={handleTabClick} aria-current={isCurrentTab ? true : undefined}>
65
+ <button
66
+ className={styles.tab}
67
+ onClick={handleTabClick}
68
+ data-testid={`test-result-tab-${id}`}
69
+ aria-current={isCurrentTab ? true : undefined}
70
+ >
63
71
  <Text type="paragraph" size="m">
64
72
  {children}
65
73
  </Text>
@@ -37,9 +37,6 @@
37
37
  border-bottom: 2px solid transparent;
38
38
  }
39
39
 
40
- &[disabled] {
41
- opacity: 0.5;
42
- }
43
40
  &[aria-current] {
44
41
  background-color: var(--bg-base-primary);
45
42
  cursor: default;
@@ -5,7 +5,7 @@ import { useTabsContext } from "@/components/Tabs";
5
5
  import { reportStatsStore, statsByEnvStore } from "@/stores";
6
6
  import { collapsedEnvironments, currentEnvironment, environmentsStore } from "@/stores/env";
7
7
  import { useI18n } from "@/stores/locale";
8
- import { navigateTo } from "@/stores/router";
8
+ import { navigateTo, route } from "@/stores/router";
9
9
  import {
10
10
  clearTreeFilters,
11
11
  collapsedTrees,
@@ -21,6 +21,7 @@ export const TreeList = () => {
21
21
  const { t } = useI18n("empty");
22
22
  const { t: tEnvironments } = useI18n("environments");
23
23
  const { currentTab } = useTabsContext();
24
+ const { id: routeId } = route.value;
24
25
 
25
26
  return (
26
27
  <Loadable
@@ -70,6 +71,7 @@ export const TreeList = () => {
70
71
  navigateTo={navigateTo}
71
72
  tree={filteredTree.value.default}
72
73
  statusFilter={currentTab as AwesomeStatus}
74
+ routeId={routeId}
73
75
  root
74
76
  />
75
77
  </div>
@@ -89,6 +91,7 @@ export const TreeList = () => {
89
91
  navigateTo={navigateTo}
90
92
  tree={currentTree}
91
93
  statusFilter={currentTab as AwesomeStatus}
94
+ routeId={routeId}
92
95
  root
93
96
  />
94
97
  </div>
@@ -139,6 +142,7 @@ export const TreeList = () => {
139
142
  statusFilter={currentTab}
140
143
  navigateTo={navigateTo}
141
144
  tree={value}
145
+ routeId={routeId}
142
146
  root
143
147
  />
144
148
  </div>
package/src/index.tsx CHANGED
@@ -3,6 +3,7 @@ import { Spinner, SvgIcon, allureIcons } from "@allurereport/web-components";
3
3
  import "@allurereport/web-components/index.css";
4
4
  import clsx from "clsx";
5
5
  import { render } from "preact";
6
+ import "preact/debug";
6
7
  import { useEffect, useState } from "preact/hooks";
7
8
  import "@/assets/scss/index.scss";
8
9
  import { BaseLayout } from "@/components/BaseLayout";
@@ -11,9 +11,9 @@
11
11
  "retryTests": "təkrar"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Bütün testlər",
14
+ "total": "Cəmi",
15
15
  "flaky": "Etibarsız testlər",
16
- "retry": "Təkrar testlər",
16
+ "retries": "Təkrar testlər",
17
17
  "new": "Yeni testlər"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "wiederholen"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Alle Tests",
14
+ "total": "Gesamt",
15
15
  "flaky": "Instabile Tests",
16
- "retry": "Wiederholte Tests",
16
+ "retries": "Wiederholte Tests",
17
17
  "new": "Neue Tests"
18
18
  },
19
19
  "tabs": {
@@ -11,10 +11,10 @@
11
11
  "retryTests": "retry"
12
12
  },
13
13
  "testSummary": {
14
- "all": "All Test",
15
- "flaky": "Flaky test",
16
- "retry": "Retry test",
17
- "new": "New test"
14
+ "total": "Total",
15
+ "flaky": "Flaky tests",
16
+ "retries": "Retried tests",
17
+ "new": "New tests"
18
18
  },
19
19
  "tabs": {
20
20
  "total": "All"
@@ -11,9 +11,9 @@
11
11
  "retryTests": "reintento"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Todas las pruebas",
14
+ "total": "Total",
15
15
  "flaky": "Pruebas inestables",
16
- "retry": "Pruebas reintentadas",
16
+ "retries": "Pruebas repetidas",
17
17
  "new": "Pruebas nuevas"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "réessais"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Tous les tests",
14
+ "total": "Total",
15
15
  "flaky": "Tests instables",
16
- "retry": "Tests réessayés",
16
+ "retries": "Tests répétés",
17
17
  "new": "Nouveaux tests"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "ניסיון חוזר"
12
12
  },
13
13
  "testSummary": {
14
- "all": "כל הבדיקות",
14
+ "total": "סה\"כ",
15
15
  "flaky": "בדיקות לא יציבות",
16
- "retry": "בדיקות חוזרות",
16
+ "retries": "בדיקות חוזרות",
17
17
  "new": "בדיקות חדשות"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "կրկնություն"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Բոլոր թեստերը",
14
+ "total": "Ընդհանուր",
15
15
  "flaky": "Անհուսալի թեստեր",
16
- "retry": "Կրկնված թեստեր",
16
+ "retries": "Կրկնված թեստեր",
17
17
  "new": "Նոր թեստեր"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "ritentati"
12
12
  },
13
13
  "testSummary": {
14
- "all": "Tutti i test",
14
+ "total": "Totale",
15
15
  "flaky": "Test instabili",
16
- "retry": "Test ritentati",
16
+ "retries": "Test ripetuti",
17
17
  "new": "Nuovi test"
18
18
  },
19
19
  "tabs": {
@@ -11,9 +11,9 @@
11
11
  "retryTests": "再試行"
12
12
  },
13
13
  "testSummary": {
14
- "all": "すべてのテスト",
14
+ "total": "合計",
15
15
  "flaky": "不安定なテスト",
16
- "retry": "再試行されたテスト",
16
+ "retries": "再実行テスト",
17
17
  "new": "新しいテスト"
18
18
  },
19
19
  "tabs": {
@@ -11,10 +11,10 @@
11
11
  "retryTests": "ხელახალი ცდა"
12
12
  },
13
13
  "testSummary": {
14
- "all": "ყველა ტესტი",
15
- "flaky": "არასტაბილური ტესტი",
16
- "retry": "ხელახალი ტესტი",
17
- "new": "ახალი ტესტი"
14
+ "total": "ჯამი",
15
+ "flaky": "არასტაბილური ტესტები",
16
+ "retries": "ხელახალი ტესტები",
17
+ "new": "ახალი ტესტები"
18
18
  },
19
19
  "tabs": {
20
20
  "total": "ყველა"
@@ -65,7 +65,7 @@
65
65
  "clear-filters": "ფილტრების გასუფთავება",
66
66
  "no-attachments-results": "დანართების ინფორმაცია არ არის ხელმისაწვდომი",
67
67
  "no-history-results": "ისტორიის ინფორმაცია არ არის ხელმისაწვდომი",
68
- "no-retries-results": "ხელახალი ცდების ინფორმ���ცია არ არის ხელმისაწვდომი",
68
+ "no-retries-results": "ხელახალი ცდების ინფორმაცია არ არის ხელმისაწვდომი",
69
69
  "no-test-steps-results": "ტესტის ნაბიჯების ინფორმაცია ხელმისაწვდომი არ არის",
70
70
  "no-test-case-results": "ტესტის შემთხვევის შედეგები არ არის",
71
71
  "no-environments-results": "გარემობის ინფორმაცია არ არის ხელმისაწვდომი"
@@ -11,10 +11,10 @@
11
11
  "retryTests": "재시도"
12
12
  },
13
13
  "testSummary": {
14
- "all": "모든 테스트",
15
- "flaky": "불안정한 테스트",
16
- "retry": "재시도 테스트",
17
- "new": "새로운 테스트"
14
+ "total": "총계",
15
+ "flaky": "불안정한 테스트들",
16
+ "retries": "재시도 테스트",
17
+ "new": "새로운 테스트들"
18
18
  },
19
19
  "tabs": {
20
20
  "total": "전체"