@allurereport/web-classic 3.0.0-beta.9 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/dist/multi/10.app-81fc0bb26fd1b73b22f9.js +1 -0
  3. package/dist/multi/222.app-81fc0bb26fd1b73b22f9.js +1 -0
  4. package/dist/multi/26.app-81fc0bb26fd1b73b22f9.js +1 -0
  5. package/dist/multi/302.app-81fc0bb26fd1b73b22f9.js +1 -0
  6. package/dist/multi/304.app-81fc0bb26fd1b73b22f9.js +1 -0
  7. package/dist/multi/369.app-81fc0bb26fd1b73b22f9.js +1 -0
  8. package/dist/multi/389.app-81fc0bb26fd1b73b22f9.js +1 -0
  9. package/dist/multi/498.app-81fc0bb26fd1b73b22f9.js +1 -0
  10. package/dist/multi/60.app-81fc0bb26fd1b73b22f9.js +1 -0
  11. package/dist/multi/643.app-81fc0bb26fd1b73b22f9.js +1 -0
  12. package/dist/multi/671.app-81fc0bb26fd1b73b22f9.js +1 -0
  13. package/dist/multi/725.app-81fc0bb26fd1b73b22f9.js +1 -0
  14. package/dist/multi/770.app-81fc0bb26fd1b73b22f9.js +1 -0
  15. package/dist/multi/848.app-81fc0bb26fd1b73b22f9.js +1 -0
  16. package/dist/multi/853.app-81fc0bb26fd1b73b22f9.js +1 -0
  17. package/dist/multi/872.app-81fc0bb26fd1b73b22f9.js +1 -0
  18. package/dist/multi/895.app-81fc0bb26fd1b73b22f9.js +1 -0
  19. package/dist/multi/920.app-81fc0bb26fd1b73b22f9.js +1 -0
  20. package/dist/multi/979.app-81fc0bb26fd1b73b22f9.js +1 -0
  21. package/dist/multi/991.app-81fc0bb26fd1b73b22f9.js +1 -0
  22. package/dist/multi/app-81fc0bb26fd1b73b22f9.js +2 -0
  23. package/dist/multi/{app-e5caa85e.js.LICENSE.txt → app-81fc0bb26fd1b73b22f9.js.LICENSE.txt} +9 -0
  24. package/dist/multi/manifest.json +26 -26
  25. package/dist/multi/styles-02faf4bb6ebabe212265.css +284 -0
  26. package/dist/single/app-997b57d6b8885a4f88c7.js +2 -0
  27. package/dist/single/{app-006b2a35.js.LICENSE.txt → app-997b57d6b8885a4f88c7.js.LICENSE.txt} +9 -0
  28. package/dist/single/manifest.json +1 -1
  29. package/package.json +19 -18
  30. package/src/assets/scss/palette.scss +391 -391
  31. package/src/assets/scss/theme.scss +288 -79
  32. package/src/components/Behaviors/BehaviorsList.tsx +3 -3
  33. package/src/components/Categories/CategoriesList.tsx +3 -3
  34. package/src/components/Footer/FooterLogo.tsx +1 -2
  35. package/src/components/Footer/FooterVersion.tsx +2 -2
  36. package/src/components/HeaderActions/HeaderActions.tsx +1 -2
  37. package/src/components/Modal/index.tsx +2 -2
  38. package/src/components/Overview/Overview.module.scss +29 -0
  39. package/src/components/Overview/index.tsx +101 -5
  40. package/src/components/Packages/PackagesList.tsx +3 -3
  41. package/src/components/ReportBody/index.tsx +2 -4
  42. package/src/components/ReportHeader/ReportHeaderLogo.tsx +6 -2
  43. package/src/components/ReportHeader/index.tsx +2 -2
  44. package/src/components/ReportMetadata/MetadataSummary.tsx +1 -2
  45. package/src/components/TestResult/TestResultAttachmentsView/index.tsx +2 -2
  46. package/src/components/TestResult/TestResultDescription/index.tsx +2 -2
  47. package/src/components/TestResult/TestResultEmpty/index.tsx +2 -9
  48. package/src/components/TestResult/TestResultHeader/index.tsx +3 -5
  49. package/src/components/TestResult/TestResultHistory/index.tsx +2 -2
  50. package/src/components/TestResult/TestResultInfo/TestResultInfoStatuses.tsx +1 -1
  51. package/src/components/TestResult/TestResultInfo/index.tsx +2 -2
  52. package/src/components/TestResult/TestResultLinks/index.tsx +2 -2
  53. package/src/components/TestResult/TestResultMetadata/index.tsx +2 -2
  54. package/src/components/TestResult/TestResultNavigation/index.tsx +2 -2
  55. package/src/components/TestResult/TestResultOverview.tsx +2 -2
  56. package/src/components/TestResult/TestResultParameters/index.tsx +2 -2
  57. package/src/components/TestResult/TestResultPrevStatuses/index.tsx +7 -7
  58. package/src/components/TestResult/TestResultRetriesView/TestResultRetriesItem.tsx +24 -8
  59. package/src/components/TestResult/TestResultRetriesView/index.tsx +10 -3
  60. package/src/components/TestResult/TestResultSetup/index.tsx +2 -2
  61. package/src/components/TestResult/TestResultSeverity/index.tsx +1 -1
  62. package/src/components/TestResult/TestResultStatus/index.tsx +1 -1
  63. package/src/components/TestResult/TestResultSteps/HtmlAttachmentPreview.tsx +28 -2
  64. package/src/components/TestResult/TestResultSteps/index.tsx +4 -4
  65. package/src/components/TestResult/TestResultSteps/styles.scss +1 -5
  66. package/src/components/TestResult/TestResultTeardown/index.tsx +2 -2
  67. package/src/components/TestResult/index.tsx +4 -4
  68. package/src/components/Tree/Tree.tsx +3 -3
  69. package/src/components/Tree/TreeHeader.tsx +1 -1
  70. package/src/components/Tree/index.tsx +3 -3
  71. package/src/index.tsx +1 -5
  72. package/src/stores/behaviors.ts +6 -6
  73. package/src/stores/categories.ts +6 -6
  74. package/src/stores/chart.ts +1 -1
  75. package/src/stores/charts.ts +22 -0
  76. package/src/stores/envInfo.ts +1 -1
  77. package/src/stores/locale.ts +3 -2
  78. package/src/stores/packages.ts +6 -6
  79. package/src/stores/router.ts +0 -2
  80. package/src/stores/stats.ts +1 -1
  81. package/src/stores/testResults.ts +4 -4
  82. package/src/stores/theme.ts +15 -18
  83. package/src/stores/tree.ts +6 -6
  84. package/src/stores/trend.ts +36 -0
  85. package/src/translations/am.json +2 -1
  86. package/src/translations/az.json +2 -1
  87. package/src/translations/de.json +2 -2
  88. package/src/translations/en.json +10 -1
  89. package/src/translations/es.json +2 -1
  90. package/src/translations/fr.json +2 -1
  91. package/src/translations/he.json +2 -1
  92. package/src/translations/it.json +2 -1
  93. package/src/translations/ja.json +2 -1
  94. package/src/translations/ka.json +2 -1
  95. package/src/translations/kr.json +2 -1
  96. package/src/translations/nl.json +2 -1
  97. package/src/translations/pl.json +2 -1
  98. package/src/translations/pt.json +2 -1
  99. package/src/translations/ru.json +2 -1
  100. package/src/translations/sv.json +2 -1
  101. package/src/translations/tr.json +2 -1
  102. package/src/translations/zh.json +2 -1
  103. package/src/utils/treeFilters.ts +13 -18
  104. package/test/dummy.test.ts +7 -0
  105. package/test/utils/treeFilters.test.ts +44 -44
  106. package/types.d.ts +22 -20
  107. package/webpack.config.js +8 -3
  108. package/.babelrc--old.cjs +0 -18
  109. package/.eslintrc--old.cjs +0 -125
  110. package/dist/multi/10.app-e5caa85e.js +0 -1
  111. package/dist/multi/222.app-e5caa85e.js +0 -1
  112. package/dist/multi/26.app-e5caa85e.js +0 -1
  113. package/dist/multi/302.app-e5caa85e.js +0 -1
  114. package/dist/multi/304.app-e5caa85e.js +0 -1
  115. package/dist/multi/369.app-e5caa85e.js +0 -1
  116. package/dist/multi/389.app-e5caa85e.js +0 -1
  117. package/dist/multi/498.app-e5caa85e.js +0 -1
  118. package/dist/multi/60.app-e5caa85e.js +0 -1
  119. package/dist/multi/643.app-e5caa85e.js +0 -1
  120. package/dist/multi/671.app-e5caa85e.js +0 -1
  121. package/dist/multi/725.app-e5caa85e.js +0 -1
  122. package/dist/multi/770.app-e5caa85e.js +0 -1
  123. package/dist/multi/848.app-e5caa85e.js +0 -1
  124. package/dist/multi/853.app-e5caa85e.js +0 -1
  125. package/dist/multi/872.app-e5caa85e.js +0 -1
  126. package/dist/multi/895.app-e5caa85e.js +0 -1
  127. package/dist/multi/920.app-e5caa85e.js +0 -1
  128. package/dist/multi/979.app-e5caa85e.js +0 -1
  129. package/dist/multi/991.app-e5caa85e.js +0 -1
  130. package/dist/multi/app-e5caa85e.js +0 -2
  131. package/dist/multi/styles-e5caa85e.css +0 -283
  132. package/dist/single/app-006b2a35.js +0 -2
  133. package/package--old.json +0 -106
  134. package/src/components/ReportLogo/index.tsx +0 -16
  135. package/src/components/ReportLogo/styles.scss +0 -20
  136. package/src/components/ReportLogoFull/index.tsx +0 -20
  137. package/src/components/ReportLogoFull/styles.scss +0 -7
  138. package/src/utils/capitalize.ts +0 -6
  139. package/webpack.config--old.js +0 -127
  140. /package/dist/multi/{JetBrainsMono_vf-b9a9c326..woff → JetBrainsMono_vf.woff} +0 -0
  141. /package/dist/multi/{JetBrainsMono_vf-9e9649b6..woff2 → JetBrainsMono_vf.woff2} +0 -0
  142. /package/dist/multi/{pt-root-ui_vf-22fe60ca..woff → pt-root-ui_vf.woff} +0 -0
  143. /package/dist/multi/{pt-root-ui_vf-9d251e8b..woff2 → pt-root-ui_vf.woff2} +0 -0
@@ -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 {
@@ -222,4 +218,4 @@
222
218
 
223
219
  .html-attachment-preview {
224
220
  padding: 0 16px;
225
- }
221
+ }
@@ -1,7 +1,7 @@
1
1
  import { allureIcons } from "@allurereport/web-components";
2
2
  import type { FunctionalComponent } from "preact";
3
3
  import { useState } from "preact/hooks";
4
- import type { AllureAwesomeTestResult } from "types";
4
+ import type { ClassicTestResult } from "types";
5
5
  import { TestResultDropdown } from "@/components/TestResult/TestResultDropdown";
6
6
  import * as styles from "@/components/TestResult/TestResultSteps/styles.scss";
7
7
  import { TestResultAttachment } from "@/components/TestResult/TestResultSteps/testResultAttachment";
@@ -16,7 +16,7 @@ const typeMap = {
16
16
  };
17
17
 
18
18
  export type TestResultTeardownProps = {
19
- teardown: AllureAwesomeTestResult["teardown"];
19
+ teardown: ClassicTestResult["teardown"];
20
20
  };
21
21
 
22
22
  export const TestResultTeardown: FunctionalComponent<TestResultTeardownProps> = ({ teardown }) => {
@@ -1,5 +1,5 @@
1
1
  import type { FunctionComponent, FunctionalComponent } from "preact";
2
- import type { AllureAwesomeTestResult } from "types";
2
+ import type { ClassicTestResult } from "types";
3
3
  import * as styles from "@/components/BaseLayout/styles.scss";
4
4
  import { TestResultAttachmentView } from "@/components/TestResult/TestResultAttachmentsView";
5
5
  import TestResultEmpty from "@/components/TestResult/TestResultEmpty";
@@ -10,7 +10,7 @@ import { TestResultRetriesView } from "@/components/TestResult/TestResultRetries
10
10
  import { TestResultTabs, useTestResultTabsContext } from "@/components/TestResult/TestResultTabs";
11
11
 
12
12
  export type TestResultViewProps = {
13
- testResult?: AllureAwesomeTestResult;
13
+ testResult?: ClassicTestResult;
14
14
  };
15
15
 
16
16
  const TestResultView: FunctionalComponent<TestResultViewProps> = ({ testResult }) => {
@@ -27,7 +27,7 @@ const TestResultView: FunctionalComponent<TestResultViewProps> = ({ testResult }
27
27
  };
28
28
 
29
29
  export type TestResultContentProps = {
30
- testResult?: AllureAwesomeTestResult;
30
+ testResult?: ClassicTestResult;
31
31
  };
32
32
 
33
33
  const TestResultContent: FunctionalComponent<TestResultContentProps> = ({ testResult }) => {
@@ -40,7 +40,7 @@ const TestResultContent: FunctionalComponent<TestResultContentProps> = ({ testRe
40
40
  };
41
41
 
42
42
  export type TestResultProps = {
43
- testResult?: AllureAwesomeTestResult;
43
+ testResult?: ClassicTestResult;
44
44
  };
45
45
 
46
46
  const TestResult: FunctionComponent<TestResultProps> = ({ testResult }) => (
@@ -2,7 +2,7 @@ import type { Statistic } from "@allurereport/core-api";
2
2
  import cx from "clsx";
3
3
  import type { FunctionComponent } from "preact";
4
4
  import { useState } from "preact/hooks";
5
- import type { AllureAwesomeRecursiveTree, AllureAwesomeStatus } from "types";
5
+ import type { ClassicRecursiveTree, ClassicStatus } from "types";
6
6
  import TreeItem from "@/components/Tree/TreeItem";
7
7
  import { route } from "@/stores/router";
8
8
  import TreeHeader from "./TreeHeader";
@@ -10,10 +10,10 @@ import * as styles from "./styles.scss";
10
10
 
11
11
  interface TreeProps {
12
12
  statistic?: Statistic;
13
- tree: AllureAwesomeRecursiveTree;
13
+ tree: ClassicRecursiveTree;
14
14
  name?: string;
15
15
  root?: boolean;
16
- statusFilter?: AllureAwesomeStatus;
16
+ statusFilter?: ClassicStatus;
17
17
  }
18
18
 
19
19
  const Tree: FunctionComponent<TreeProps> = ({ tree, statusFilter, root, name, statistic }) => {
@@ -39,7 +39,7 @@ const TreeHeader: FunctionComponent<TreeHeaderProps> = ({
39
39
  return (
40
40
  <Loadable
41
41
  source={statsStore}
42
- renderData={(stats) => {
42
+ renderData={(stats: Statistic) => {
43
43
  const width = Math.floor(progress(statistic.total, stats.total) * (maxWidthTab - minWidthTab) + minWidthTab);
44
44
 
45
45
  const treeHeaderBar = statistic
@@ -1,6 +1,6 @@
1
1
  import { Button, Loadable, PageLoader, Text } from "@allurereport/web-components";
2
2
  import { useEffect } from "preact/hooks";
3
- import type { AllureAwesomeStatus } from "types";
3
+ import type { ClassicStatus } from "types";
4
4
  import Tree from "@/components/Tree/Tree";
5
5
  import { useI18n } from "@/stores/locale";
6
6
  import { currentTab } from "@/stores/tabs";
@@ -11,7 +11,7 @@ export const TreeList = () => {
11
11
  const { t } = useI18n("empty");
12
12
 
13
13
  useEffect(() => {
14
- setTreeStatus(currentTab.value as AllureAwesomeStatus);
14
+ setTreeStatus(currentTab.value as ClassicStatus);
15
15
  }, [currentTab.value]);
16
16
 
17
17
  return (
@@ -51,7 +51,7 @@ export const TreeList = () => {
51
51
 
52
52
  return (
53
53
  <div className={styles["tree-list"]}>
54
- <Tree tree={filteredTree.value} statusFilter={currentTab.value as AllureAwesomeStatus} root />
54
+ <Tree tree={filteredTree.value} statusFilter={currentTab.value as ClassicStatus} root />
55
55
  </div>
56
56
  );
57
57
  }}
package/src/index.tsx CHANGED
@@ -41,11 +41,7 @@ const App = () => {
41
41
  };
42
42
  }, []);
43
43
 
44
- console.log(route.value.tabName);
45
- const ActiveComponent = useMemo(
46
- () => tabComponents[route.value.tabName] || (() => <div>nav</div>),
47
- [route.value.tabName],
48
- );
44
+ const ActiveComponent = useMemo(() => tabComponents[route.value.tabName] || (() => null), [route.value.tabName]);
49
45
 
50
46
  if (!currentLocale.value) {
51
47
  return <PageLoader />;
@@ -1,6 +1,6 @@
1
1
  import { fetchReportJsonData } from "@allurereport/web-commons";
2
2
  import { computed, signal } from "@preact/signals";
3
- import type { AllureAwesomeStatus, AllureAwesomeTree, AllureAwesomeTreeGroup } from "types";
3
+ import type { ClassicStatus, ClassicTree, ClassicTreeGroup } from "types";
4
4
  import type { StoreSignalState } from "@/stores/types";
5
5
  import { createRecursiveTree, isRecursiveTreeEmpty } from "@/utils/treeFilters";
6
6
 
@@ -9,13 +9,13 @@ export type TreeDirection = "asc" | "desc";
9
9
  export type TreeFilters = "flaky" | "retry" | "new";
10
10
  export type TreeFiltersState = {
11
11
  query: string;
12
- status: AllureAwesomeStatus;
12
+ status: ClassicStatus;
13
13
  filter: Record<TreeFilters, boolean>;
14
14
  sortBy: TreeSortBy;
15
15
  direction: TreeDirection;
16
16
  };
17
17
 
18
- export const behaviorsStore = signal<StoreSignalState<AllureAwesomeTree>>({
18
+ export const behaviorsStore = signal<StoreSignalState<ClassicTree>>({
19
19
  loading: true,
20
20
  error: undefined,
21
21
  data: undefined,
@@ -39,7 +39,7 @@ export const filteredBehaviors = computed(() => {
39
39
  const { root, leavesById, groupsById } = behaviorsStore.value.data;
40
40
 
41
41
  return createRecursiveTree({
42
- group: root as AllureAwesomeTreeGroup,
42
+ group: root as ClassicTreeGroup,
43
43
  leavesById,
44
44
  groupsById,
45
45
  filterOptions: behaviorsFiltersStore.value,
@@ -71,7 +71,7 @@ export const setBehaviorsQuery = (query: string) => {
71
71
  };
72
72
  };
73
73
 
74
- export const setBehaviorsStatus = (status: AllureAwesomeStatus) => {
74
+ export const setBehaviorsStatus = (status: ClassicStatus) => {
75
75
  behaviorsFiltersStore.value = {
76
76
  ...behaviorsFiltersStore.value,
77
77
  status,
@@ -110,7 +110,7 @@ export const fetchBehaviorsData = async () => {
110
110
  };
111
111
 
112
112
  try {
113
- const res = await fetchReportJsonData<AllureAwesomeTree>("widgets/behaviors.json");
113
+ const res = await fetchReportJsonData<ClassicTree>("widgets/behaviors.json", { bustCache: true });
114
114
 
115
115
  behaviorsStore.value = {
116
116
  data: res,
@@ -1,6 +1,6 @@
1
1
  import { fetchReportJsonData } from "@allurereport/web-commons";
2
2
  import { computed, signal } from "@preact/signals";
3
- import type { AllureAwesomeStatus, AllureAwesomeTree, AllureAwesomeTreeGroup } from "types";
3
+ import type { ClassicStatus, ClassicTree, ClassicTreeGroup } from "types";
4
4
  import type { StoreSignalState } from "@/stores/types";
5
5
  import { createRecursiveTree, isRecursiveTreeEmpty } from "@/utils/treeFilters";
6
6
 
@@ -9,13 +9,13 @@ export type TreeDirection = "asc" | "desc";
9
9
  export type TreeFilters = "flaky" | "retry" | "new";
10
10
  export type TreeFiltersState = {
11
11
  query: string;
12
- status: AllureAwesomeStatus;
12
+ status: ClassicStatus;
13
13
  filter: Record<TreeFilters, boolean>;
14
14
  sortBy: TreeSortBy;
15
15
  direction: TreeDirection;
16
16
  };
17
17
 
18
- export const categoriesStore = signal<StoreSignalState<AllureAwesomeTree>>({
18
+ export const categoriesStore = signal<StoreSignalState<ClassicTree>>({
19
19
  loading: true,
20
20
  error: undefined,
21
21
  data: undefined,
@@ -39,7 +39,7 @@ export const filteredCategories = computed(() => {
39
39
  const { root, leavesById, groupsById } = categoriesStore.value.data;
40
40
 
41
41
  return createRecursiveTree({
42
- group: root as AllureAwesomeTreeGroup,
42
+ group: root as ClassicTreeGroup,
43
43
  leavesById,
44
44
  groupsById,
45
45
  filterOptions: categoriesFiltersStore.value,
@@ -71,7 +71,7 @@ export const setCategoriesQuery = (query: string) => {
71
71
  };
72
72
  };
73
73
 
74
- export const setCategoriesStatus = (status: AllureAwesomeStatus) => {
74
+ export const setCategoriesStatus = (status: ClassicStatus) => {
75
75
  categoriesFiltersStore.value = {
76
76
  ...categoriesFiltersStore.value,
77
77
  status,
@@ -110,7 +110,7 @@ export const fetchCategoriesData = async () => {
110
110
  };
111
111
 
112
112
  try {
113
- const res = await fetchReportJsonData<AllureAwesomeTree>("widgets/categories.json");
113
+ const res = await fetchReportJsonData<ClassicTree>("widgets/categories.json", { bustCache: true });
114
114
 
115
115
  categoriesStore.value = {
116
116
  data: res,
@@ -16,7 +16,7 @@ export const fetchPieChartData = async () => {
16
16
  };
17
17
 
18
18
  try {
19
- const res = await fetchReportJsonData("widgets/allure_pie_chart.json");
19
+ const res = await fetchReportJsonData("widgets/allure_pie_chart.json", { bustCache: true });
20
20
 
21
21
  pieChartStore.value = {
22
22
  data: res,
@@ -0,0 +1,22 @@
1
+ import { computed } from "@preact/signals";
2
+ import { fetchPieChartData, pieChartStore } from "@/stores/chart";
3
+ import { fetchTrendData, trendStore } from "@/stores/trend";
4
+
5
+ export const chartsStore = computed(() => {
6
+ const pieChartValue = pieChartStore.value;
7
+ const trendValue = trendStore.value;
8
+
9
+ return {
10
+ error: pieChartValue.error || trendValue.error,
11
+ loading: pieChartValue.loading || trendValue.loading,
12
+ data: {
13
+ pie: pieChartValue.data,
14
+ trends: trendValue.data,
15
+ },
16
+ };
17
+ });
18
+
19
+ export const fetchChartsData = () => {
20
+ fetchTrendData();
21
+ fetchPieChartData();
22
+ };
@@ -17,7 +17,7 @@ export const fetchEnvInfo = async () => {
17
17
  };
18
18
 
19
19
  try {
20
- const res = await fetchReportJsonData<EnvironmentItem[]>("widgets/allure_environment.json");
20
+ const res = await fetchReportJsonData<EnvironmentItem[]>("widgets/allure_environment.json", { bustCache: true });
21
21
 
22
22
  envInfoStore.value = {
23
23
  data: res,
@@ -2,9 +2,9 @@ import { getReportOptions } from "@allurereport/web-commons";
2
2
  import { computed, signal } from "@preact/signals";
3
3
  import i18next, { type TOptions } from "i18next";
4
4
  import { DEFAULT_LOCALE, LANG_LOCALE, type LangLocale } from "@/translations/constants";
5
- import type { AllureAwesomeReportOptions } from "../../types.js";
5
+ import type { ClassicReportOptions } from "../../types.js";
6
6
 
7
- const { reportLanguage } = getReportOptions<AllureAwesomeReportOptions>() ?? {};
7
+ const { reportLanguage } = getReportOptions<ClassicReportOptions>() ?? {};
8
8
 
9
9
  const namespaces = [
10
10
  "empty",
@@ -23,6 +23,7 @@ const namespaces = [
23
23
  "controls",
24
24
  "errors",
25
25
  "nav",
26
+ "charts",
26
27
  ];
27
28
 
28
29
  export const currentLocale = signal<LangLocale>("" as LangLocale);
@@ -1,6 +1,6 @@
1
1
  import { fetchReportJsonData } from "@allurereport/web-commons";
2
2
  import { computed, signal } from "@preact/signals";
3
- import type { AllureAwesomeStatus, AllureAwesomeTree, AllureAwesomeTreeGroup } from "types";
3
+ import type { ClassicStatus, ClassicTree, ClassicTreeGroup } from "types";
4
4
  import type { StoreSignalState } from "@/stores/types";
5
5
  import { createRecursiveTree, isRecursiveTreeEmpty } from "@/utils/treeFilters";
6
6
 
@@ -9,13 +9,13 @@ export type TreeDirection = "asc" | "desc";
9
9
  export type TreeFilters = "flaky" | "retry" | "new";
10
10
  export type TreeFiltersState = {
11
11
  query: string;
12
- status: AllureAwesomeStatus;
12
+ status: ClassicStatus;
13
13
  filter: Record<TreeFilters, boolean>;
14
14
  sortBy: TreeSortBy;
15
15
  direction: TreeDirection;
16
16
  };
17
17
 
18
- export const packagesStore = signal<StoreSignalState<AllureAwesomeTree>>({
18
+ export const packagesStore = signal<StoreSignalState<ClassicTree>>({
19
19
  loading: true,
20
20
  error: undefined,
21
21
  data: undefined,
@@ -39,7 +39,7 @@ export const filteredPackages = computed(() => {
39
39
  const { root, leavesById, groupsById } = packagesStore.value.data;
40
40
 
41
41
  return createRecursiveTree({
42
- group: root as AllureAwesomeTreeGroup,
42
+ group: root as ClassicTreeGroup,
43
43
  leavesById,
44
44
  groupsById,
45
45
  filterOptions: packagesFiltersStore.value,
@@ -71,7 +71,7 @@ export const setPackagesQuery = (query: string) => {
71
71
  };
72
72
  };
73
73
 
74
- export const setPackagesStatus = (status: AllureAwesomeStatus) => {
74
+ export const setPackagesStatus = (status: ClassicStatus) => {
75
75
  packagesFiltersStore.value = {
76
76
  ...packagesFiltersStore.value,
77
77
  status,
@@ -110,7 +110,7 @@ export const fetchPackagesData = async () => {
110
110
  };
111
111
 
112
112
  try {
113
- const res = await fetchReportJsonData<AllureAwesomeTree>("widgets/packages.json");
113
+ const res = await fetchReportJsonData<ClassicTree>("widgets/packages.json", { bustCache: true });
114
114
 
115
115
  packagesStore.value = {
116
116
  data: res,
@@ -43,8 +43,6 @@ export const navigateTo = (path: NavigateToString | NavigateToObject) => {
43
43
  newHash = `${tabName}/${id || ""}/${testResultId || ""}`;
44
44
  }
45
45
 
46
- console.log("Navigating to:", newHash);
47
-
48
46
  history.pushState(null, "", `#${newHash}`);
49
47
 
50
48
  handleHashChange();
@@ -19,7 +19,7 @@ export const fetchStats = async () => {
19
19
  };
20
20
 
21
21
  try {
22
- const res = await fetchReportJsonData<Statistic>("widgets/allure_statistic.json");
22
+ const res = await fetchReportJsonData<Statistic>("widgets/allure_statistic.json", { bustCache: true });
23
23
 
24
24
  statsStore.value = {
25
25
  data: res,
@@ -1,9 +1,9 @@
1
1
  import { fetchReportJsonData } from "@allurereport/web-commons";
2
2
  import { signal } from "@preact/signals";
3
- import { type AllureAwesomeTestResult } from "types";
3
+ import { type ClassicTestResult } from "types";
4
4
  import { type StoreSignalState } from "./types";
5
5
 
6
- export type TestResultsStoreState = Record<string, AllureAwesomeTestResult>;
6
+ export type TestResultsStoreState = Record<string, ClassicTestResult>;
7
7
 
8
8
  export type TestResultNavStoreState = string[];
9
9
 
@@ -21,7 +21,7 @@ export const testResultNavStore = signal<StoreSignalState<TestResultNavStoreStat
21
21
 
22
22
  export const fetchTestResultNav = async () => {
23
23
  try {
24
- const data = await fetchReportJsonData<string[]>("widgets/nav.json");
24
+ const data = await fetchReportJsonData<string[]>("widgets/nav.json", { bustCache: true });
25
25
 
26
26
  testResultNavStore.value = {
27
27
  data,
@@ -49,7 +49,7 @@ export const fetchTestResult = async (testResultId: string) => {
49
49
  };
50
50
 
51
51
  try {
52
- const data = await fetchReportJsonData<AllureAwesomeTestResult>(`data/test-results/${testResultId}.json`);
52
+ const data = await fetchReportJsonData<ClassicTestResult>(`data/test-results/${testResultId}.json`);
53
53
 
54
54
  testResultStore.value = {
55
55
  data: { ...testResultStore.value.data, [testResultId]: data },
@@ -1,33 +1,30 @@
1
1
  import { getReportOptions } from "@allurereport/web-commons";
2
+ import type { Theme } from "@allurereport/web-components";
2
3
  import { signal } from "@preact/signals";
3
- import type { AllureAwesomeReportOptions } from "../../types.js";
4
+ import type { ClassicReportOptions } from "../../types.js";
4
5
 
5
- type Theme = "light" | "dark";
6
+ export const themeStore = signal<Theme>("auto");
6
7
 
7
- const { theme } = getReportOptions<AllureAwesomeReportOptions>() ?? {};
8
+ export const setTheme = (mode: "light" | "dark" | "auto") => {
9
+ themeStore.value = mode;
8
10
 
9
- export const themeStore = signal<Theme>("light");
11
+ try {
12
+ window.localStorage.setItem("theme", mode);
13
+ } catch {}
10
14
 
11
- export const setTheme = (newTheme: Theme): void => {
12
- themeStore.value = newTheme;
13
- document.documentElement.setAttribute("data-theme", newTheme);
14
- window.localStorage.setItem("theme", newTheme);
15
+ document.documentElement.setAttribute("data-theme", mode);
15
16
  };
16
17
 
17
18
  export const toggleTheme = () => {
18
- setTheme(themeStore.value === "light" ? "dark" : "light");
19
+ const order = ["light", "dark", "auto"];
20
+ const current = themeStore.value;
21
+ const next = order[(order.indexOf(current) + 1) % order.length] as Theme;
22
+ setTheme(next);
19
23
  };
20
24
 
21
25
  export const getTheme = () => {
26
+ const { theme } = getReportOptions<ClassicReportOptions>() ?? {};
22
27
  const themeFromLS = (window.localStorage.getItem("theme") as Theme | null) || (theme as Theme);
23
28
 
24
- if (themeFromLS) {
25
- setTheme(themeFromLS);
26
- return;
27
- }
28
-
29
- const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
30
- const initialTheme = prefersDarkScheme ? "dark" : "light";
31
-
32
- setTheme(initialTheme);
29
+ setTheme(themeFromLS);
33
30
  };
@@ -1,6 +1,6 @@
1
1
  import { fetchReportJsonData } from "@allurereport/web-commons";
2
2
  import { computed, signal } from "@preact/signals";
3
- import type { AllureAwesomeStatus, AllureAwesomeTree, AllureAwesomeTreeGroup } from "types";
3
+ import type { ClassicStatus, ClassicTree, ClassicTreeGroup } from "types";
4
4
  import type { StoreSignalState } from "@/stores/types";
5
5
  import { createRecursiveTree, isRecursiveTreeEmpty } from "@/utils/treeFilters";
6
6
 
@@ -9,13 +9,13 @@ export type TreeDirection = "asc" | "desc";
9
9
  export type TreeFilters = "flaky" | "retry" | "new";
10
10
  export type TreeFiltersState = {
11
11
  query: string;
12
- status: AllureAwesomeStatus;
12
+ status: ClassicStatus;
13
13
  filter: Record<TreeFilters, boolean>;
14
14
  sortBy: TreeSortBy;
15
15
  direction: TreeDirection;
16
16
  };
17
17
 
18
- export const treeStore = signal<StoreSignalState<AllureAwesomeTree>>({
18
+ export const treeStore = signal<StoreSignalState<ClassicTree>>({
19
19
  loading: true,
20
20
  error: undefined,
21
21
  data: undefined,
@@ -39,7 +39,7 @@ export const filteredTree = computed(() => {
39
39
  const { root, leavesById, groupsById } = treeStore.value.data;
40
40
 
41
41
  return createRecursiveTree({
42
- group: root as AllureAwesomeTreeGroup,
42
+ group: root as ClassicTreeGroup,
43
43
  leavesById,
44
44
  groupsById,
45
45
  filterOptions: treeFiltersStore.value,
@@ -71,7 +71,7 @@ export const setTreeQuery = (query: string) => {
71
71
  };
72
72
  };
73
73
 
74
- export const setTreeStatus = (status: AllureAwesomeStatus) => {
74
+ export const setTreeStatus = (status: ClassicStatus) => {
75
75
  treeFiltersStore.value = {
76
76
  ...treeFiltersStore.value,
77
77
  status,
@@ -110,7 +110,7 @@ export const fetchTreeData = async () => {
110
110
  };
111
111
 
112
112
  try {
113
- const res = await fetchReportJsonData<AllureAwesomeTree>("widgets/tree.json");
113
+ const res = await fetchReportJsonData<ClassicTree>("widgets/tree.json", { bustCache: true });
114
114
 
115
115
  treeStore.value = {
116
116
  data: res,
@@ -0,0 +1,36 @@
1
+ import { createCharts, fetchReportJsonData } from "@allurereport/web-commons";
2
+ import type { ChartsData, ChartsResponse, UIChartsData } from "@allurereport/web-commons";
3
+ import { signal } from "@preact/signals";
4
+ import type { StoreSignalState } from "@/stores/types";
5
+
6
+ export const trendStore = signal<StoreSignalState<UIChartsData>>({
7
+ loading: true,
8
+ error: undefined,
9
+ data: undefined,
10
+ });
11
+
12
+ export const fetchTrendData = async () => {
13
+ trendStore.value = {
14
+ ...trendStore.value,
15
+ loading: true,
16
+ error: undefined,
17
+ };
18
+
19
+ try {
20
+ const res = await fetchReportJsonData<ChartsResponse>("widgets/charts.json", { bustCache: true });
21
+
22
+ const data = "general" in res && "byEnv" in res ? res.general : res;
23
+
24
+ trendStore.value = {
25
+ data: createCharts(data as ChartsData),
26
+ error: undefined,
27
+ loading: false,
28
+ };
29
+ } catch (err) {
30
+ trendStore.value = {
31
+ data: undefined,
32
+ error: err.message,
33
+ loading: false,
34
+ };
35
+ }
36
+ };
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "filters": {
27
27
  "more-filters": "Լրացուցիչ ֆիլտրեր",
28
- "enable-filter": "Միացնել \"{filter}\" ֆիլտրը",
28
+ "enable-filter": "Միացնել \"{{filter}}\" ֆիլտրը",
29
29
  "flaky": "Անհուսալի",
30
30
  "retry": "Կրկնություն",
31
31
  "new": "Նոր"
@@ -95,6 +95,7 @@
95
95
  "showLess": "Ցուցադրել պակաս",
96
96
  "showMore": "Ցուցադրել ավելին",
97
97
  "copy": "Պատճենել",
98
+ "attempt": "Փորձ {{attempt}}-ից {{total}}-ը",
98
99
  "at": "է"
99
100
  },
100
101
  "controls": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "filters": {
27
27
  "more-filters": "Daha çox filtr",
28
- "enable-filter": "\"{filter}\" filtrlərini aktiv edin",
28
+ "enable-filter": "\"{{filter}}\" filtrlərini aktiv edin",
29
29
  "flaky": "Etibarsız",
30
30
  "retry": "Təkrar",
31
31
  "new": "Yeni"
@@ -95,6 +95,7 @@
95
95
  "showLess": "Daha az göstər",
96
96
  "showMore": "Daha çox göstər",
97
97
  "copy": "Kopyala",
98
+ "attempt": "Cəhd {{attempt}} / {{total}}",
98
99
  "at": "üçün"
99
100
  },
100
101
  "controls": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "filters": {
27
27
  "more-filters": "Weitere Filter",
28
- "enable-filter": "Filter für \"{filter}\" aktivieren",
28
+ "enable-filter": "Filter für \"{{filter}}\" aktivieren",
29
29
  "flaky": "Instabil",
30
30
  "retry": "Wiederholen",
31
31
  "new": "Neu"
@@ -95,6 +95,7 @@
95
95
  "showLess": "Weniger anzeigen",
96
96
  "showMore": "Mehr anzeigen",
97
97
  "copy": "Kopieren",
98
+ "attempt": "Versuch {{attempt}} von {{total}}",
98
99
  "at": "bei"
99
100
  },
100
101
  "controls": {
@@ -124,5 +125,4 @@
124
125
  "suites": "Suiten",
125
126
  "timeline": "Zeitleiste"
126
127
  }
127
-
128
128
  }
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "filters": {
27
27
  "more-filters": "More filters",
28
- "enable-filter": "params('Enable \"{filter}\" filter')",
28
+ "enable-filter": "Enable \"{{filter}}\" filter",
29
29
  "flaky": "Flaky",
30
30
  "retry": "Retry",
31
31
  "new": "New"
@@ -96,6 +96,7 @@
96
96
  "showLess": "Show less",
97
97
  "showMore": "Show more",
98
98
  "copy": "Copy",
99
+ "attempt": "Attempt {{attempt}} of {{total}}",
99
100
  "at": "at"
100
101
  },
101
102
  "controls": {
@@ -124,5 +125,13 @@
124
125
  "packages": "Packages",
125
126
  "suites": "Suites",
126
127
  "timeline": "Timeline"
128
+ },
129
+ "charts": {
130
+ "trend": {
131
+ "title": "Trend {{type}} Chart"
132
+ },
133
+ "pie": {
134
+ "title": "Test Success Rate"
135
+ }
127
136
  }
128
137
  }
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "filters": {
27
27
  "more-filters": "Más filtros",
28
- "enable-filter": "Habilitar filtro para \"{filter}\"",
28
+ "enable-filter": "Habilitar filtro para \"{{filter}}\"",
29
29
  "flaky": "Inestable",
30
30
  "retry": "Reintento",
31
31
  "new": "Nuevo"
@@ -95,6 +95,7 @@
95
95
  "showLess": "Mostrar menos",
96
96
  "showMore": "Mostrar más",
97
97
  "copy": "Copiar",
98
+ "attempt": "Intento {{attempt}} de {{total}}",
98
99
  "at": "a las"
99
100
  },
100
101
  "controls": {