@midscene/visualizer 0.2.2 → 0.2.3-beta-20240815082813.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 (46) hide show
  1. package/dist/es/assets/logo-plain.0f78df8a.png +0 -0
  2. package/dist/es/component/blackboard.js +32 -104
  3. package/dist/es/component/detail-panel.css +6 -0
  4. package/dist/es/component/detail-panel.js +1 -1
  5. package/dist/es/component/misc.js +29 -0
  6. package/dist/es/component/panel-title.css +5 -3
  7. package/dist/es/component/panel-title.js +6 -2
  8. package/dist/es/component/sidebar.css +1 -11
  9. package/dist/es/component/sidebar.js +5 -47
  10. package/dist/es/component/store.js +18 -20
  11. package/dist/es/index.css +42 -0
  12. package/dist/es/index.js +160 -34
  13. package/dist/es/utils.js +1 -1
  14. package/dist/index.css +445 -0
  15. package/dist/index.js +1 -0
  16. package/dist/lib/assets/logo-plain.0f78df8a.png +0 -0
  17. package/dist/lib/component/blackboard.js +32 -104
  18. package/dist/lib/component/detail-panel.css +6 -0
  19. package/dist/lib/component/detail-panel.js +1 -1
  20. package/dist/lib/component/misc.js +23 -0
  21. package/dist/lib/component/panel-title.css +5 -3
  22. package/dist/lib/component/panel-title.js +5 -1
  23. package/dist/lib/component/sidebar.css +1 -11
  24. package/dist/lib/component/sidebar.js +3 -37
  25. package/dist/lib/component/store.js +31 -23
  26. package/dist/lib/index.css +42 -0
  27. package/dist/lib/index.js +159 -33
  28. package/dist/lib/utils.js +1 -1
  29. package/dist/report/demo.html +5449 -0
  30. package/dist/report/index.css +445 -0
  31. package/dist/report/index.html +479 -0
  32. package/dist/report/index.js +1 -0
  33. package/dist/report/multi.html +24279 -0
  34. package/dist/types/component/misc.d.ts +1 -0
  35. package/dist/types/component/panel-title.d.ts +1 -0
  36. package/dist/types/component/sidebar.d.ts +0 -1
  37. package/dist/types/component/store.d.ts +7 -6
  38. package/dist/types/index.d.ts +11 -3
  39. package/html/tpl.html +29 -0
  40. package/package.json +20 -11
  41. package/dist/es/component/assets/logo-plain.js +0 -128
  42. package/dist/es/component/assets/logo-plain2.js +0 -128
  43. package/dist/es/demo-dump.json +0 -1
  44. package/dist/lib/component/assets/logo-plain.js +0 -156
  45. package/dist/lib/component/assets/logo-plain2.js +0 -156
  46. package/dist/lib/demo-dump.json +0 -1
@@ -33,9 +33,6 @@ const noop = () => {
33
33
  };
34
34
  const BlackBoard = () => {
35
35
  const dump = useInsightDump((store) => store.data);
36
- const setHighlightSectionNames = useInsightDump(
37
- (store) => store.setHighlightSectionNames
38
- );
39
36
  const setHighlightElements = useInsightDump(
40
37
  (store) => store.setHighlightElements
41
38
  );
@@ -43,17 +40,18 @@ const BlackBoard = () => {
43
40
  (store) => store.highlightSectionNames
44
41
  );
45
42
  const highlightElements = useInsightDump((store) => store.highlightElements);
46
- const { context, matchedSection: sections, matchedElement: elements } = dump;
43
+ const highlightIds = highlightElements.map((e) => e.id);
44
+ const { context } = dump;
47
45
  const { size, screenshotBase64 } = context;
48
46
  const screenWidth = size.width;
49
47
  const screenHeight = size.height;
50
48
  const domRef = useRef(null);
51
49
  const app = useMemo(() => new PIXI.Application(), []);
52
50
  const [appInitialed, setAppInitialed] = useState(false);
53
- const itemMarkContainer = useMemo(() => new PIXI.Container(), []);
54
- const textContainer = useMemo(() => new PIXI.Container(), []);
51
+ const highlightContainer = useMemo(() => new PIXI.Container(), []);
52
+ const elementMarkContainer = useMemo(() => new PIXI.Container(), []);
55
53
  const pixiBgRef = useRef();
56
- const { bgVisible, setBgVisible, textsVisible, setTextsVisible } = useBlackboardPreference();
54
+ const { bgVisible, setBgVisible, elementsVisible, setTextsVisible } = useBlackboardPreference();
57
55
  useEffect(() => {
58
56
  Promise.resolve(
59
57
  (() => __async(void 0, null, function* () {
@@ -75,8 +73,8 @@ const BlackBoard = () => {
75
73
  canvasEl.style.width = `${Math.floor(screenWidth * ratio)}px`;
76
74
  canvasEl.style.height = `${Math.floor(screenHeight * ratio)}px`;
77
75
  }
78
- app.stage.addChild(itemMarkContainer);
79
- app.stage.addChild(textContainer);
76
+ app.stage.addChild(highlightContainer);
77
+ app.stage.addChild(elementMarkContainer);
80
78
  setAppInitialed(true);
81
79
  }))()
82
80
  );
@@ -126,52 +124,25 @@ const BlackBoard = () => {
126
124
  texts.y = Math.max(top - (nameFontSize + 4), 0);
127
125
  return [graphics, texts];
128
126
  };
129
- const { highlightSectionRects, highlightElementRects } = useMemo(() => {
130
- const highlightSectionRects2 = [];
127
+ const { highlightElementRects } = useMemo(() => {
131
128
  const highlightElementRects2 = [];
132
- itemMarkContainer.removeChildren();
133
- textContainer.removeChildren();
134
- sections.forEach((section) => {
135
- const ifHighlight = highlightSectionNames.includes(section.name);
129
+ highlightContainer.removeChildren();
130
+ elementMarkContainer.removeChildren();
131
+ context.content.forEach((element) => {
132
+ const { rect, content, id } = element;
133
+ const ifHighlight = highlightIds.includes(id);
136
134
  if (ifHighlight) {
137
- highlightSectionRects2.push(section.rect);
138
- }
139
- const [graphics, texts] = rectMarkForItem(
140
- section.rect,
141
- section.name,
142
- ifHighlight ? highlightColorForType("section") : colorForName("section", section.name),
143
- ifHighlight ? 1 : itemFillAlpha,
144
- () => {
145
- setHighlightSectionNames([section.name]);
146
- },
147
- () => {
148
- setHighlightSectionNames([]);
149
- }
150
- );
151
- itemMarkContainer.addChild(graphics);
152
- textContainer.addChild(texts);
153
- });
154
- highlightElements.forEach((element) => {
155
- const { rect } = element;
156
- highlightElementRects2.push(rect);
157
- if (elements.includes(element)) {
158
- return;
135
+ const [graphics2] = rectMarkForItem(
136
+ rect,
137
+ content,
138
+ ifHighlight ? highlightColorForType("element") : colorForName("element", content),
139
+ ifHighlight ? 1 : itemFillAlpha,
140
+ noop,
141
+ noop
142
+ );
143
+ highlightContainer.addChild(graphics2);
159
144
  }
160
- const [graphics, texts] = rectMarkForItem(
161
- rect,
162
- "",
163
- highlightColorForType("element"),
164
- 1,
165
- noop,
166
- noop
167
- );
168
- itemMarkContainer.addChild(graphics);
169
- textContainer.addChild(texts);
170
- });
171
- elements.forEach((element) => {
172
- const { rect, content } = element;
173
- const ifHighlight = highlightElements.includes(element);
174
- const [graphics, texts] = rectMarkForItem(
145
+ const [graphics] = rectMarkForItem(
175
146
  rect,
176
147
  content,
177
148
  ifHighlight ? highlightColorForType("element") : colorForName("element", content),
@@ -183,47 +154,19 @@ const BlackBoard = () => {
183
154
  setHighlightElements([]);
184
155
  }
185
156
  );
186
- itemMarkContainer.addChild(graphics);
187
- textContainer.addChild(texts);
188
- });
189
- sections.forEach((section) => {
190
- const { content } = section;
191
- const ifHighlight = highlightSectionNames.includes(section.name);
192
- const sectionTheme = ifHighlight ? "#FFFFFF" : colorForName("section", section.name);
193
- content.forEach((text) => {
194
- const { content: content2, rect } = text;
195
- const { left, top } = rect;
196
- const style = new PIXI.TextStyle({
197
- wordWrap: true,
198
- wordWrapWidth: rect.width,
199
- fontSize: 18,
200
- fill: sectionTheme
201
- });
202
- const textElement = new PIXI.Text(content2, style);
203
- textElement.x = left;
204
- textElement.y = top;
205
- textContainer.addChild(textElement);
206
- const textBorder = new PIXI.Graphics();
207
- textBorder.beginFill(11184810, 0.2);
208
- textBorder.lineStyle(1, 0, 1);
209
- textBorder.drawRect(left, top, rect.width, rect.height);
210
- textBorder.endFill();
211
- textContainer.addChild(textBorder);
212
- });
157
+ elementMarkContainer.addChild(graphics);
213
158
  });
214
- textContainer.visible = textsVisible;
159
+ elementMarkContainer.visible = elementsVisible;
215
160
  return {
216
- highlightSectionRects: highlightSectionRects2,
217
161
  highlightElementRects: highlightElementRects2
218
162
  };
219
163
  }, [
220
164
  app,
221
165
  appInitialed,
222
- sections,
223
- highlightSectionNames,
224
- highlightElements
166
+ highlightElements,
167
+ context.content
225
168
  // bgVisible,
226
- // textsVisible,
169
+ // elementsVisible,
227
170
  ]);
228
171
  const onSetBg = (e) => {
229
172
  setBgVisible(e.target.checked);
@@ -231,9 +174,9 @@ const BlackBoard = () => {
231
174
  pixiBgRef.current.alpha = e.target.checked ? bgOnAlpha : bgOffAlpha;
232
175
  }
233
176
  };
234
- const onSetTextsVisible = (e) => {
177
+ const onSetElementsVisible = (e) => {
235
178
  setTextsVisible(e.target.checked);
236
- textContainer.visible = e.target.checked;
179
+ elementMarkContainer.visible = e.target.checked;
237
180
  };
238
181
  let bottomTipA = null;
239
182
  if (highlightElementRects.length === 1) {
@@ -247,18 +190,6 @@ const BlackBoard = () => {
247
190
  JSON.stringify(highlightElementRects)
248
191
  ] }) });
249
192
  }
250
- let bottomTipB = null;
251
- if (highlightSectionRects.length === 1) {
252
- bottomTipB = /* @__PURE__ */ jsx("div", { className: "bottom-tip", children: /* @__PURE__ */ jsxs("div", { className: "bottom-tip-item", children: [
253
- "Section: ",
254
- JSON.stringify(highlightSectionRects[0])
255
- ] }) });
256
- } else if (highlightSectionRects.length > 1) {
257
- bottomTipB = /* @__PURE__ */ jsx("div", { className: "bottom-tip", children: /* @__PURE__ */ jsxs("div", { className: "bottom-tip-item", children: [
258
- "Sections: ",
259
- JSON.stringify(highlightSectionRects)
260
- ] }) });
261
- }
262
193
  return /* @__PURE__ */ jsxs("div", { className: "blackboard", children: [
263
194
  /* @__PURE__ */ jsx(
264
195
  "div",
@@ -270,12 +201,9 @@ const BlackBoard = () => {
270
201
  ),
271
202
  /* @__PURE__ */ jsx("div", { className: "blackboard-filter", children: /* @__PURE__ */ jsxs("div", { className: "overlay-control", children: [
272
203
  /* @__PURE__ */ jsx(Checkbox, { checked: bgVisible, onChange: onSetBg, children: "Screenshot" }),
273
- /* @__PURE__ */ jsx(Checkbox, { checked: textsVisible, onChange: onSetTextsVisible, children: "Text Mark" })
204
+ /* @__PURE__ */ jsx(Checkbox, { checked: elementsVisible, onChange: onSetElementsVisible, children: "Elements" })
274
205
  ] }) }),
275
- /* @__PURE__ */ jsxs("div", { className: "bottom-tip", children: [
276
- bottomTipA,
277
- bottomTipB
278
- ] })
206
+ /* @__PURE__ */ jsx("div", { className: "bottom-tip", children: bottomTipA })
279
207
  ] });
280
208
  };
281
209
  var blackboard_default = BlackBoard;
@@ -22,6 +22,12 @@
22
22
  .detail-panel .blackboard {
23
23
  margin: 0 auto;
24
24
  }
25
+ .detail-panel .screenshot-item-wrapper {
26
+ display: flex;
27
+ flex-wrap: wrap;
28
+ justify-content: space-around;
29
+ align-items: center;
30
+ }
25
31
  .detail-panel .screenshot-item {
26
32
  margin-bottom: 10px;
27
33
  }
@@ -41,7 +41,7 @@ const DetailPanel = () => {
41
41
  }
42
42
  } else if (viewType === VIEW_TYPE_SCREENSHOT) {
43
43
  if ((_a = activeTask.recorder) == null ? void 0 : _a.length) {
44
- content = /* @__PURE__ */ jsx("div", { children: activeTask.recorder.filter((item) => item.screenshot).map((item, index) => {
44
+ content = /* @__PURE__ */ jsx("div", { className: "screenshot-item-wrapper", children: activeTask.recorder.filter((item) => item.screenshot).map((item, index) => {
45
45
  const fullTime = timeStr(item.ts);
46
46
  const str = item.timing ? `${fullTime} / ${item.timing}` : fullTime;
47
47
  return /* @__PURE__ */ jsx(ScreenshotItem, { time: str, img: item.screenshot }, index);
@@ -1,4 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import {
3
+ ArrowRightOutlined,
4
+ CheckCircleFilled,
5
+ ClockCircleFilled,
6
+ CloseCircleFilled,
7
+ LogoutOutlined,
8
+ MinusOutlined
9
+ } from "@ant-design/icons";
2
10
  function timeCostStrElement(timeCost) {
3
11
  let str;
4
12
  if (typeof timeCost !== "number") {
@@ -19,6 +27,27 @@ function timeCostStrElement(timeCost) {
19
27
  }
20
28
  );
21
29
  }
30
+ const iconForStatus = (status) => {
31
+ switch (status) {
32
+ case "success":
33
+ case "passed":
34
+ return /* @__PURE__ */ jsx("span", { style: { color: "#2B8243" }, children: /* @__PURE__ */ jsx(CheckCircleFilled, {}) });
35
+ case "failed":
36
+ case "timedOut":
37
+ case "interrupted":
38
+ return /* @__PURE__ */ jsx("span", { style: { color: "#FF0A0A" }, children: /* @__PURE__ */ jsx(CloseCircleFilled, {}) });
39
+ case "pending":
40
+ return /* @__PURE__ */ jsx(ClockCircleFilled, {});
41
+ case "cancelled":
42
+ case "skipped":
43
+ return /* @__PURE__ */ jsx(LogoutOutlined, {});
44
+ case "running":
45
+ return /* @__PURE__ */ jsx(ArrowRightOutlined, {});
46
+ default:
47
+ return /* @__PURE__ */ jsx(MinusOutlined, {});
48
+ }
49
+ };
22
50
  export {
51
+ iconForStatus,
23
52
  timeCostStrElement
24
53
  };
@@ -1,8 +1,10 @@
1
- .task-list-name {
2
- padding: 2px 10px;
3
- font-weight: bold;
1
+ .panel-title {
4
2
  background: #F8F8F8;
5
3
  border-top: 1px solid #E5E5E5;
6
4
  border-bottom: 1px solid #E5E5E5;
7
5
  margin-top: -1px;
6
+ padding: 2px 10px;
7
+ }
8
+ .panel-title .task-list-name {
9
+ font-weight: bold;
8
10
  }
@@ -1,7 +1,11 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import "./panel-title.css";
3
3
  const PanelTitle = (props) => {
4
- return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", { className: "task-list-name", children: props.title }) });
4
+ const subTitleEl = props.subTitle ? /* @__PURE__ */ jsx("div", { className: "task-list-sub-name", children: props.subTitle }) : null;
5
+ return /* @__PURE__ */ jsxs("div", { className: "panel-title", children: [
6
+ /* @__PURE__ */ jsx("div", { className: "task-list-name", children: props.title }),
7
+ subTitleEl
8
+ ] });
5
9
  };
6
10
  var panel_title_default = PanelTitle;
7
11
  export {
@@ -7,11 +7,7 @@
7
7
  border-right: 1px solid #E5E5E5;
8
8
  overflow: auto;
9
9
  background: #F8F8F8;
10
- }
11
- .side-bar .brand {
12
- padding: 10px 5px;
13
- cursor: pointer;
14
- display: flex;
10
+ box-sizing: border-box;
15
11
  }
16
12
  .side-bar .task-meta-section {
17
13
  margin-top: 6px;
@@ -72,12 +68,6 @@
72
68
  top: 50%;
73
69
  margin-top: -5px;
74
70
  }
75
- .side-bar .side-item-name .status-icon-success {
76
- color: #2B8243;
77
- }
78
- .side-bar .side-item-name .status-icon-fail {
79
- color: #ff0a0a;
80
- }
81
71
  .side-bar .side-item-name .status-text {
82
72
  color: #777;
83
73
  }
@@ -2,36 +2,15 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import "./sidebar.css";
3
3
  import { useAllCurrentTasks, useExecutionDump } from "./store";
4
4
  import { typeStr } from "../utils";
5
- import {
6
- ArrowRightOutlined,
7
- CheckCircleFilled,
8
- ClockCircleFilled,
9
- CloseCircleFilled,
10
- LogoutOutlined,
11
- MessageOutlined,
12
- MinusOutlined
13
- } from "@ant-design/icons";
5
+ import { MessageOutlined } from "@ant-design/icons";
14
6
  import { Button } from "antd";
15
7
  import { useEffect } from "react";
16
- import Logo from "./assets/logo-plain2.js";
17
- import { timeCostStrElement } from "./misc";
8
+ import { iconForStatus, timeCostStrElement } from "./misc";
18
9
  import PanelTitle from "./panel-title";
19
10
  const SideItem = (props) => {
20
11
  var _a;
21
12
  const { task, onClick, selected } = props;
22
13
  const selectedClass = selected ? "selected" : "";
23
- let statusIcon = /* @__PURE__ */ jsx(MinusOutlined, {});
24
- if (task.status === "success") {
25
- statusIcon = /* @__PURE__ */ jsx(CheckCircleFilled, {});
26
- } else if (task.status === "fail") {
27
- statusIcon = /* @__PURE__ */ jsx(CloseCircleFilled, {});
28
- } else if (task.status === "pending") {
29
- statusIcon = /* @__PURE__ */ jsx(ClockCircleFilled, {});
30
- } else if (task.status === "cancelled") {
31
- statusIcon = /* @__PURE__ */ jsx(LogoutOutlined, {});
32
- } else if (task.status === "running") {
33
- statusIcon = /* @__PURE__ */ jsx(ArrowRightOutlined, {});
34
- }
35
14
  let statusText = task.status;
36
15
  if ((_a = task.timing) == null ? void 0 : _a.cost) {
37
16
  statusText = timeCostStrElement(task.timing.cost);
@@ -55,7 +34,7 @@ const SideItem = (props) => {
55
34
  children: [
56
35
  " ",
57
36
  /* @__PURE__ */ jsxs("div", { className: "side-item-name", children: [
58
- /* @__PURE__ */ jsx("span", { className: `status-icon status-icon-${task.status}`, children: statusIcon }),
37
+ /* @__PURE__ */ jsx("span", { className: "status-icon", children: iconForStatus(task.status) }),
59
38
  /* @__PURE__ */ jsx("div", { className: "title", children: typeStr(task) }),
60
39
  /* @__PURE__ */ jsx("div", { className: "status-text", children: statusText })
61
40
  ] })
@@ -64,7 +43,7 @@ const SideItem = (props) => {
64
43
  );
65
44
  };
66
45
  const Sidebar = (props) => {
67
- const groupedDumps = useExecutionDump((store) => store.dump);
46
+ const groupedDump = useExecutionDump((store) => store.dump);
68
47
  const setActiveTask = useExecutionDump((store) => store.setActiveTask);
69
48
  const activeTask = useExecutionDump((store) => store.activeTask);
70
49
  const setHoverTask = useExecutionDump((store) => store.setHoverTask);
@@ -104,7 +83,7 @@ const Sidebar = (props) => {
104
83
  document.removeEventListener("keydown", handleKeyDown);
105
84
  };
106
85
  }, [currentSelectedIndex, allTasks, setActiveTask]);
107
- const sideList = (groupedDumps == null ? void 0 : groupedDumps.length) ? groupedDumps.map((group, groupIndex) => {
86
+ const sideList = groupedDump ? [groupedDump].map((group, groupIndex) => {
108
87
  const executions = group.executions.map((execution, indexOfExecution) => {
109
88
  const { tasks } = execution;
110
89
  const taskList = tasks.map((task, index) => {
@@ -154,27 +133,6 @@ const Sidebar = (props) => {
154
133
  }) : /* @__PURE__ */ jsx("span", { children: "no tasks" });
155
134
  return /* @__PURE__ */ jsxs("div", { className: "side-bar", children: [
156
135
  /* @__PURE__ */ jsxs("div", { className: "top-controls", children: [
157
- /* @__PURE__ */ jsx(
158
- "div",
159
- {
160
- className: "brand",
161
- onClick: reset,
162
- style: { display: (props == null ? void 0 : props.hideLogo) ? "none" : "flex" },
163
- children: /* @__PURE__ */ jsx(
164
- Logo,
165
- {
166
- style: { width: 70, height: 70, margin: "auto" },
167
- onClick: () => {
168
- if (props.logoAction) {
169
- props.logoAction();
170
- } else {
171
- location.reload();
172
- }
173
- }
174
- }
175
- )
176
- }
177
- ),
178
136
  /* @__PURE__ */ jsx("div", { className: "task-list", children: sideList }),
179
137
  /* @__PURE__ */ jsx("div", { className: "side-seperator side-seperator-line side-seperator-space-up" }),
180
138
  /* @__PURE__ */ jsx("div", { className: "task-meta-section", children: /* @__PURE__ */ jsx("div", { className: "task-meta", children: "switch: Command + Up / Down" }) })
@@ -17,15 +17,16 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { create } from "zustand";
20
+ import * as Z from "zustand";
21
+ const { create } = Z;
21
22
  const useBlackboardPreference = create((set) => ({
22
- bgVisible: false,
23
- textsVisible: true,
23
+ bgVisible: true,
24
+ elementsVisible: false,
24
25
  setBgVisible: (visible) => {
25
26
  set({ bgVisible: visible });
26
27
  },
27
28
  setTextsVisible: (visible) => {
28
- set({ textsVisible: visible });
29
+ set({ elementsVisible: visible });
29
30
  }
30
31
  }));
31
32
  const useExecutionDump = create((set, get) => {
@@ -47,14 +48,12 @@ const useExecutionDump = create((set, get) => {
47
48
  return __spreadProps(__spreadValues({}, initData), {
48
49
  setGroupedDump: (dump) => {
49
50
  console.log("will set ExecutionDump", dump);
50
- set({
51
+ set(__spreadProps(__spreadValues({}, initData), {
51
52
  dump
52
- });
53
- for (const item of dump) {
54
- if (item.executions.length > 0 && item.executions[0].tasks.length > 0) {
55
- get().setActiveTask(item.executions[0].tasks[0]);
56
- break;
57
- }
53
+ }));
54
+ resetInsightDump();
55
+ if (dump.executions.length > 0 && dump.executions[0].tasks.length > 0) {
56
+ get().setActiveTask(dump.executions[0].tasks[0]);
58
57
  }
59
58
  },
60
59
  setActiveTask(task) {
@@ -89,15 +88,14 @@ const useExecutionDump = create((set, get) => {
89
88
  });
90
89
  });
91
90
  const useAllCurrentTasks = () => {
92
- const groupedDumps = useExecutionDump((store) => store.dump);
93
- const allTasks = (groupedDumps == null ? void 0 : groupedDumps.reduce((acc, group) => {
94
- const tasksInside = group.executions.reduce(
95
- (acc2, execution) => acc2.concat(execution.tasks),
96
- []
97
- );
98
- return acc.concat(tasksInside);
99
- }, [])) || [];
100
- return allTasks;
91
+ const groupedDump = useExecutionDump((store) => store.dump);
92
+ if (!groupedDump)
93
+ return [];
94
+ const tasksInside = groupedDump.executions.reduce(
95
+ (acc2, execution) => acc2.concat(execution.tasks),
96
+ []
97
+ );
98
+ return tasksInside;
101
99
  };
102
100
  const useInsightDump = create((set) => {
103
101
  let loadId = 0;
package/dist/es/index.css CHANGED
@@ -2,6 +2,7 @@ html,
2
2
  body {
3
3
  padding: 0;
4
4
  margin: 0;
5
+ line-height: 1;
5
6
  }
6
7
  .rspress-nav {
7
8
  transition: 0.2s;
@@ -46,6 +47,46 @@ footer.mt-8 {
46
47
  font-size: 14px;
47
48
  border-top: 1px solid #E5E5E5;
48
49
  border-bottom: 1px solid #E5E5E5;
50
+ font-synthesis: style;
51
+ text-rendering: optimizelegibility;
52
+ -webkit-font-smoothing: antialiased;
53
+ line-height: 1.5;
54
+ }
55
+ .page-container blockquote,
56
+ .page-container dl,
57
+ .page-container dd,
58
+ .page-container h1,
59
+ .page-container h2,
60
+ .page-container h3,
61
+ .page-container h4,
62
+ .page-container h5,
63
+ .page-container h6,
64
+ .page-container hr,
65
+ .page-container figure,
66
+ .page-container p,
67
+ .page-container pre {
68
+ margin: 0;
69
+ }
70
+ .page-nav {
71
+ height: 30px;
72
+ padding: 10px;
73
+ border-bottom: 1px solid #E5E5E5;
74
+ display: flex;
75
+ flex-direction: row;
76
+ }
77
+ .page-nav .logo img {
78
+ height: 20px;
79
+ line-height: 30px;
80
+ vertical-align: baseline;
81
+ vertical-align: -webkit-baseline-middle;
82
+ }
83
+ .page-nav .playwright-case-selector {
84
+ margin-left: 20px;
85
+ line-height: 30px;
86
+ width: 320px;
87
+ }
88
+ .cost-str {
89
+ color: #777;
49
90
  }
50
91
  .ant-layout {
51
92
  flex-grow: 1;
@@ -91,6 +132,7 @@ footer.mt-8 {
91
132
  .main-right .main-side {
92
133
  box-sizing: border-box;
93
134
  overflow-y: scroll;
135
+ height: 100%;
94
136
  }
95
137
  .main-right .json-content {
96
138
  word-wrap: break-word;