@allurereport/web-awesome 3.10.0 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/multi/app-79d160f9989770266f96.js +2 -0
  2. package/dist/multi/manifest.json +25 -25
  3. package/dist/multi/styles-b7f017f505b72e148e8b.css +58 -0
  4. package/dist/single/app-36af07268613f77d3ac5.js +2 -0
  5. package/dist/single/manifest.json +1 -1
  6. package/package.json +7 -12
  7. package/src/components/BaseLayout/styles.scss +3 -1
  8. package/src/components/MainReport/index.tsx +3 -9
  9. package/src/components/MainReport/styles.scss +1 -5
  10. package/src/components/ReportBody/index.tsx +1 -1
  11. package/src/components/SideBySide/styles.scss +10 -0
  12. package/src/components/SplitLayout/index.tsx +1 -8
  13. package/src/components/SplitLayout/styles.scss +0 -6
  14. package/src/components/TestResult/TrOverview.tsx +9 -2
  15. package/src/components/TestResult/TrSteps/TrAttachment.tsx +2 -1
  16. package/src/components/TestResult/TrSteps/TrAttachmentInfo.tsx +11 -3
  17. package/src/components/TestResult/TrSteps/index.tsx +6 -2
  18. package/src/components/TestResult/index.tsx +2 -3
  19. package/src/components/TestResult/styles.scss +0 -5
  20. package/src/components/Tree/index.tsx +1 -6
  21. package/src/styles/_pane-active.scss +2 -2
  22. package/dist/multi/app-b18cce138691927e8759.js +0 -2
  23. package/dist/multi/styles-a4f65de86208f79dd2be.css +0 -58
  24. package/dist/single/app-733f473da7b51f98876d.js +0 -2
  25. /package/dist/multi/{121.app-b18cce138691927e8759.js → 121.app-79d160f9989770266f96.js} +0 -0
  26. /package/dist/multi/{173.app-b18cce138691927e8759.js → 173.app-79d160f9989770266f96.js} +0 -0
  27. /package/dist/multi/{174.app-b18cce138691927e8759.js → 174.app-79d160f9989770266f96.js} +0 -0
  28. /package/dist/multi/{252.app-b18cce138691927e8759.js → 252.app-79d160f9989770266f96.js} +0 -0
  29. /package/dist/multi/{282.app-b18cce138691927e8759.js → 282.app-79d160f9989770266f96.js} +0 -0
  30. /package/dist/multi/{29.app-b18cce138691927e8759.js → 29.app-79d160f9989770266f96.js} +0 -0
  31. /package/dist/multi/{310.app-b18cce138691927e8759.js → 310.app-79d160f9989770266f96.js} +0 -0
  32. /package/dist/multi/{416.app-b18cce138691927e8759.js → 416.app-79d160f9989770266f96.js} +0 -0
  33. /package/dist/multi/{507.app-b18cce138691927e8759.js → 507.app-79d160f9989770266f96.js} +0 -0
  34. /package/dist/multi/{527.app-b18cce138691927e8759.js → 527.app-79d160f9989770266f96.js} +0 -0
  35. /package/dist/multi/{600.app-b18cce138691927e8759.js → 600.app-79d160f9989770266f96.js} +0 -0
  36. /package/dist/multi/{605.app-b18cce138691927e8759.js → 605.app-79d160f9989770266f96.js} +0 -0
  37. /package/dist/multi/{638.app-b18cce138691927e8759.js → 638.app-79d160f9989770266f96.js} +0 -0
  38. /package/dist/multi/{672.app-b18cce138691927e8759.js → 672.app-79d160f9989770266f96.js} +0 -0
  39. /package/dist/multi/{686.app-b18cce138691927e8759.js → 686.app-79d160f9989770266f96.js} +0 -0
  40. /package/dist/multi/{725.app-b18cce138691927e8759.js → 725.app-79d160f9989770266f96.js} +0 -0
  41. /package/dist/multi/{741.app-b18cce138691927e8759.js → 741.app-79d160f9989770266f96.js} +0 -0
  42. /package/dist/multi/{749.app-b18cce138691927e8759.js → 749.app-79d160f9989770266f96.js} +0 -0
  43. /package/dist/multi/{755.app-b18cce138691927e8759.js → 755.app-79d160f9989770266f96.js} +0 -0
  44. /package/dist/multi/{779.app-b18cce138691927e8759.js → 779.app-79d160f9989770266f96.js} +0 -0
  45. /package/dist/multi/{894.app-b18cce138691927e8759.js → 894.app-79d160f9989770266f96.js} +0 -0
  46. /package/dist/multi/{943.app-b18cce138691927e8759.js → 943.app-79d160f9989770266f96.js} +0 -0
  47. /package/dist/multi/{980.app-b18cce138691927e8759.js → 980.app-79d160f9989770266f96.js} +0 -0
  48. /package/dist/multi/{app-b18cce138691927e8759.js.LICENSE.txt → app-79d160f9989770266f96.js.LICENSE.txt} +0 -0
  49. /package/dist/single/{app-733f473da7b51f98876d.js.LICENSE.txt → app-36af07268613f77d3ac5.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- "main.js": "app-733f473da7b51f98876d.js"
2
+ "main.js": "app-36af07268613f77d3ac5.js"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/web-awesome",
3
- "version": "3.10.0",
3
+ "version": "3.11.0",
4
4
  "description": "The static files for Allure Awesome Report",
5
5
  "keywords": [
6
6
  "allure",
@@ -30,11 +30,11 @@
30
30
  "lint:fix": "oxlint --import-plugin --fix src test features stories"
31
31
  },
32
32
  "dependencies": {
33
- "@allurereport/charts-api": "3.10.0",
34
- "@allurereport/core-api": "3.10.0",
35
- "@allurereport/plugin-api": "3.10.0",
36
- "@allurereport/web-commons": "3.10.0",
37
- "@allurereport/web-components": "3.10.0",
33
+ "@allurereport/charts-api": "3.11.0",
34
+ "@allurereport/core-api": "3.11.0",
35
+ "@allurereport/plugin-api": "3.11.0",
36
+ "@allurereport/web-commons": "3.11.0",
37
+ "@allurereport/web-components": "3.11.0",
38
38
  "@preact/signals": "^2.6.1",
39
39
  "clsx": "^2.1.1",
40
40
  "d3-shape": "^3.2.0",
@@ -91,10 +91,5 @@
91
91
  "webpack-cli": "^5.1.4",
92
92
  "webpack-dev-server": "^5.2.4",
93
93
  "webpack-manifest-plugin": "^5.0.0"
94
- },
95
- "browserslist": [
96
- "last 1 version",
97
- "> 1%",
98
- "IE 11"
99
- ]
94
+ }
100
95
  }
@@ -12,8 +12,10 @@
12
12
  .wrapper {
13
13
  max-width: 920px;
14
14
  width: 100%;
15
+ display: flex;
15
16
  flex-direction: column;
16
- margin: auto;
17
+ margin: 0 auto;
18
+ min-height: 100%;
17
19
  }
18
20
 
19
21
  .content {
@@ -13,7 +13,7 @@ import { reportStatsStore, useI18n } from "@/stores";
13
13
  import { categoriesStore } from "@/stores/categories";
14
14
  import { currentEnvironment } from "@/stores/env";
15
15
  import { globalsStore } from "@/stores/globals";
16
- import { activePane, focusTreePane } from "@/stores/keyboard";
16
+ import { focusTreePane } from "@/stores/keyboard";
17
17
  import { isSplitMode } from "@/stores/layout";
18
18
  import { qualityGateStore } from "@/stores/qualityGate";
19
19
  import {
@@ -129,15 +129,9 @@ const MainReport = () => {
129
129
  return null;
130
130
  };
131
131
 
132
- const treePaneActive = isSplitMode.value && activePane.value === "tree";
133
-
134
132
  return (
135
133
  <div
136
- className={clsx(
137
- styles.content,
138
- isSplitMode.value && styles["scroll-inside"],
139
- treePaneActive && styles["pane-active"],
140
- )}
134
+ className={clsx(styles.content, isSplitMode.value && styles["scroll-inside"])}
141
135
  onMouseDown={() => focusTreePane()}
142
136
  >
143
137
  <div className={styles["main-report-header"]}>
@@ -146,7 +140,7 @@ const MainReport = () => {
146
140
  <div className={styles["main-report-tabs"]}>
147
141
  <NavTabs initialTab={initialTab}>
148
142
  <RootTabRouteSync />
149
- <div className={styles["main-report-tabs-layout"]}>
143
+ <div>
150
144
  <div className={styles["main-report-tabs-nav"]}>
151
145
  <NavTabsList>
152
146
  <Loadable
@@ -6,17 +6,13 @@
6
6
  background: var(--color-bg-primary);
7
7
  border-radius: 12px;
8
8
  width: 100%;
9
+ flex: 1 1 auto;
9
10
  }
10
11
 
11
12
  .scroll-inside {
12
13
  display: flex;
13
14
  flex-direction: column;
14
15
  border-radius: 0;
15
- @include paneActive.split-pane-indicator;
16
-
17
- &.pane-active {
18
- @include paneActive.split-pane-indicator-active;
19
- }
20
16
  }
21
17
 
22
18
  .main-report-header {
@@ -20,7 +20,7 @@ const Header = () => {
20
20
  const { t } = useI18n("statuses");
21
21
 
22
22
  return (
23
- <header className={styles.header}>
23
+ <header className={styles.header} data-tree-sticky-header>
24
24
  <HeaderActions />
25
25
  <div className={styles.headerRow}>
26
26
  <ReportTabsList>
@@ -22,6 +22,11 @@
22
22
  box-shadow: var(--shadow-small);
23
23
  overflow: hidden;
24
24
  min-height: 0;
25
+ border-top: 2px solid transparent;
26
+
27
+ &[data-pane-active] {
28
+ border-top-color: var(--color-intent-primary-text);
29
+ }
25
30
 
26
31
  > * {
27
32
  flex: 1 1 auto;
@@ -35,6 +40,11 @@
35
40
  border-radius: 0 12px 12px 0;
36
41
  box-shadow: var(--shadow-small);
37
42
  overflow: hidden;
43
+ border-top: 2px solid transparent;
44
+
45
+ &[data-pane-active] {
46
+ border-top-color: var(--color-intent-primary-text);
47
+ }
38
48
  }
39
49
 
40
50
  [dir="ltr"] {
@@ -8,7 +8,6 @@ import MainReport from "@/components/MainReport";
8
8
  import SideBySide from "@/components/SideBySide";
9
9
  import TestResult from "@/components/TestResult";
10
10
  import { useI18n } from "@/stores";
11
- import { activePane } from "@/stores/keyboard";
12
11
  import { isSplitMode } from "@/stores/layout";
13
12
  import { rootTabRoute, testResultRoute } from "@/stores/router";
14
13
  import { currentTrId } from "@/stores/testResult";
@@ -62,13 +61,7 @@ export const SplitLayout = () => {
62
61
  }}
63
62
  />
64
63
  ) : (
65
- <div
66
- className={clsx(
67
- styles.empty,
68
- isSplitMode.value && styles["empty-split-pane"],
69
- isSplitMode.value && activePane.value === "testResult" && styles["pane-active"],
70
- )}
71
- >
64
+ <div className={clsx(styles.empty, isSplitMode.value && styles["empty-split-pane"])}>
72
65
  <Text>{t("noSelectedTR")}</Text>
73
66
  </div>
74
67
  );
@@ -89,13 +89,7 @@
89
89
  .empty-split-pane {
90
90
  position: relative;
91
91
  background: var(--color-bg-raised);
92
- border-radius: 12px;
93
92
  overflow: auto;
94
- @include paneActive.split-pane-indicator;
95
-
96
- &.pane-active {
97
- @include paneActive.split-pane-indicator-active;
98
- }
99
93
  }
100
94
 
101
95
  .header {
@@ -1,9 +1,10 @@
1
1
  import type { FunctionalComponent } from "preact";
2
2
  import type { AwesomeTestResult } from "types";
3
3
 
4
- import { getBodyItems } from "@/components/TestResult/bodyItems";
4
+ import { getBodyItems, isDisplayableTestError } from "@/components/TestResult/bodyItems";
5
5
  import TestStepsEmpty from "@/components/TestResult/TestStepsEmpty";
6
6
  import { TrDescription } from "@/components/TestResult/TrDescription";
7
+ import { TrError } from "@/components/TestResult/TrError";
7
8
  import { TrLinks } from "@/components/TestResult/TrLinks";
8
9
  import { TrMetadata } from "@/components/TestResult/TrMetadata";
9
10
  import { TrParameters } from "@/components/TestResult/TrParameters";
@@ -23,7 +24,7 @@ export type TrOverviewProps = {
23
24
 
24
25
  export const TrOverview: FunctionalComponent<TrOverviewProps> = ({ testResult }) => {
25
26
  useTestResultOverviewFocusScroll();
26
- const { parameters, groupedLabels, links, descriptionHtml, setup, teardown, id } = testResult || {};
27
+ const { parameters, groupedLabels, links, descriptionHtml, setup, teardown, id, error, status } = testResult || {};
27
28
  const testResultId = id ?? currentTrId.value;
28
29
  const { t } = useI18n("ui");
29
30
  const bodyItems = getBodyItems(testResult, t("error"));
@@ -31,9 +32,15 @@ export const TrOverview: FunctionalComponent<TrOverviewProps> = ({ testResult })
31
32
  const pwTraces = testResult?.attachments?.filter(
32
33
  (attachment) => attachment.link.contentType === "application/vnd.allure.playwright-trace",
33
34
  );
35
+ const showTopError = (status === "failed" || status === "broken") && isDisplayableTestError(error);
34
36
 
35
37
  return (
36
38
  <>
39
+ {showTopError && (
40
+ <div className={styles["test-result-errors"]}>
41
+ <TrError {...error} status={status} />
42
+ </div>
43
+ )}
37
44
  {Boolean(pwTraces?.length) && <TrPwTraces pwTraces={pwTraces} />}
38
45
  {Boolean(parameters?.length) && <TrParameters id={testResultId} parameters={parameters} />}
39
46
  {Boolean(groupedLabels && Object.keys(groupedLabels || {})?.length) && (
@@ -104,7 +104,8 @@ export const TrAttachment: FunctionComponent<{
104
104
  event.stopPropagation();
105
105
  openModal({
106
106
  data: item,
107
- component: <Attachment item={item} previewable={true} />,
107
+ preview: isPreviewable,
108
+ component: <Attachment item={item} previewable={isPreviewable} />,
108
109
  });
109
110
  };
110
111
 
@@ -47,10 +47,11 @@ export const TrAttachmentInfo: FunctionalComponent<TrAttachmentInfo> = ({
47
47
  event.stopPropagation();
48
48
  openModal({
49
49
  data: item,
50
+ preview: isPreviewable,
50
51
  component: (
51
52
  <Attachment
52
53
  item={item}
53
- previewable={true}
54
+ previewable={isPreviewable}
54
55
  i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }}
55
56
  />
56
57
  ),
@@ -62,10 +63,17 @@ export const TrAttachmentInfo: FunctionalComponent<TrAttachmentInfo> = ({
62
63
  openModal({
63
64
  isModalOpen: true,
64
65
  data: item,
65
- component: <Attachment item={item} i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }} />,
66
+ preview: isPreviewable,
67
+ component: (
68
+ <Attachment
69
+ item={item}
70
+ previewable={isPreviewable}
71
+ i18n={{ imageDiff: (key: string) => tAttachments(`imageDiff.${key}`) }}
72
+ />
73
+ ),
66
74
  });
67
75
  }
68
- }, [item, tAttachments]);
76
+ }, [item, isPreviewable, tAttachments]);
69
77
 
70
78
  const downloadData = async (e: MouseEvent) => {
71
79
  e.stopPropagation();
@@ -1,4 +1,9 @@
1
- import { getNextSubtreeToggleState, getSubtreeToggleIcon, type SubtreeToggleState } from "@allurereport/web-commons";
1
+ import {
2
+ getNextSubtreeToggleState,
3
+ getSubtreeToggleIcon,
4
+ isSubtreeFirstLevelOnlyOpened,
5
+ type SubtreeToggleState,
6
+ } from "@allurereport/web-commons";
2
7
  import { IconButton, allureIcons } from "@allurereport/web-components";
3
8
  import type { FunctionalComponent } from "preact";
4
9
  import { useState } from "preact/hooks";
@@ -9,7 +14,6 @@ import {
9
14
  collectExpandableStepNodes,
10
15
  getStepTreeExpansionPolicy,
11
16
  isOpenByDefaultForPolicy,
12
- isSubtreeFirstLevelOnlyOpened,
13
17
  type SubtreeNode,
14
18
  } from "@/components/TestResult/TrSteps/stepTreeExpansion";
15
19
  import { TrBodyItems } from "@/components/TestResult/TrSteps/TrBodyItems";
@@ -13,7 +13,7 @@ import { TrOverview } from "@/components/TestResult/TrOverview";
13
13
  import { TrRetriesView } from "@/components/TestResult/TrRetriesView";
14
14
  import { TrTabs } from "@/components/TestResult/TrTabs";
15
15
  import { fetchTestEnvGroup } from "@/stores/env";
16
- import { activePane, focusTestResultPane } from "@/stores/keyboard";
16
+ import { focusTestResultPane } from "@/stores/keyboard";
17
17
  import { isSplitMode } from "@/stores/layout";
18
18
  import { trCurrentTab } from "@/stores/testResult";
19
19
 
@@ -59,7 +59,6 @@ const TrContent: FunctionalComponent<TrContentProps> = ({ testResult }) => {
59
59
 
60
60
  const TestResult: FunctionComponent<TrProps> = ({ testResult }) => {
61
61
  const split = isSplitMode.value;
62
- const trPaneActive = split && activePane.value === "testResult";
63
62
 
64
63
  useEffect(() => {
65
64
  const testCaseId = testResult?.testCase?.id;
@@ -72,7 +71,7 @@ const TestResult: FunctionComponent<TrProps> = ({ testResult }) => {
72
71
  return (
73
72
  <>
74
73
  <div
75
- className={clsx(styles.content, split && styles["scroll-inside"], trPaneActive && styles["pane-active"])}
74
+ className={clsx(styles.content, split && styles["scroll-inside"])}
76
75
  data-tr-scroll-container
77
76
  onMouseDown={() => focusTestResultPane()}
78
77
  >
@@ -13,10 +13,5 @@
13
13
  height: 100%;
14
14
  border-radius: 0;
15
15
  scrollbar-width: thin;
16
- @include paneActive.split-pane-indicator;
17
-
18
- &.pane-active {
19
- @include paneActive.split-pane-indicator-active;
20
- }
21
16
  }
22
17
 
@@ -60,12 +60,7 @@ export const TreeList = () => {
60
60
  const flatNode = getFlatTreeNode(focusedId);
61
61
  const kind = flatNode?.kind;
62
62
 
63
- // For group/env nodes always pin to top (even when already visible in viewport)
64
- if (kind === "group" || kind === "env") {
65
- (node as HTMLElement).scrollIntoView({ block: "start", inline: "nearest" });
66
- } else {
67
- scrollFocusIntoView(node, { kind });
68
- }
63
+ scrollFocusIntoView(node, { kind });
69
64
  }, [focusedId]);
70
65
 
71
66
  useLayoutEffect(() => {
@@ -1,8 +1,8 @@
1
1
  // border-top on the white pane card (visible above header/content; inset shadow is covered by children).
2
2
  @mixin split-pane-indicator {
3
- border-top: 3px solid transparent;
3
+ border-top: 2px solid transparent;
4
4
  }
5
5
 
6
6
  @mixin split-pane-indicator-active {
7
- border-top-color: var(--bg-support-aldebaran);
7
+ border-top-color: var(--color-intent-primary-text);
8
8
  }