@allurereport/plugin-awesome 3.0.0-beta.14 → 3.0.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/charts.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getPieChartDataDashboard, getSeverityTrendData, getStatusTrendData } from "@allurereport/web-commons";
1
+ import { getPieChartDataDashboard, getSeverityTrendData, getStatusTrendData, DEFAULT_CHART_HISTORY_LIMIT } from "@allurereport/web-commons";
2
2
  import { randomUUID } from "crypto";
3
3
  import { arc, pie } from "d3-shape";
4
4
  export const d3Arc = arc().innerRadius(40).outerRadius(50).cornerRadius(2).padAngle(0.03);
@@ -149,13 +149,14 @@ export const generateCharts = async (options, store, context) => {
149
149
  }, {});
150
150
  };
151
151
  export const generateTrendChart = (options, stores, context) => {
152
- const { dataType } = options;
152
+ const newOptions = { limit: DEFAULT_CHART_HISTORY_LIMIT, ...options };
153
+ const { dataType } = newOptions;
153
154
  const { statistic, historyDataPoints, testResults } = stores;
154
155
  if (dataType === ChartData.Status) {
155
- return getStatusTrendData(statistic, context.reportName, historyDataPoints, options);
156
+ return getStatusTrendData(statistic, context.reportName, historyDataPoints, newOptions);
156
157
  }
157
158
  else if (dataType === ChartData.Severity) {
158
- return getSeverityTrendData(testResults, context.reportName, historyDataPoints, options);
159
+ return getSeverityTrendData(testResults, context.reportName, historyDataPoints, newOptions);
159
160
  }
160
161
  };
161
162
  export const generateAllCharts = async (writer, store, options, context) => {
@@ -233,14 +233,16 @@ export const generateStaticFiles = async (payload) => {
233
233
  const mainJsContentBuffer = await readFile(mainJsSource);
234
234
  bodyTags.push(createScriptTag(`data:text/javascript;base64,${mainJsContentBuffer.toString("base64")}`));
235
235
  }
236
+ const now = Date.now();
236
237
  const reportOptions = {
237
238
  reportName,
238
239
  logo,
239
240
  theme,
240
241
  reportLanguage,
241
- createdAt: Date.now(),
242
+ createdAt: now,
242
243
  reportUuid,
243
244
  groupBy: groupBy?.length ? groupBy : ["parentSuite", "suite", "subSuite"],
245
+ cacheKey: now.toString(),
244
246
  layout,
245
247
  allureVersion,
246
248
  sections,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allurereport/plugin-awesome",
3
- "version": "3.0.0-beta.14",
3
+ "version": "3.0.0-beta.15",
4
4
  "description": "Allure Awesome Plugin – brand new HTML report with modern design and new features",
5
5
  "keywords": [
6
6
  "allure",
@@ -30,10 +30,10 @@
30
30
  "test": "rimraf ./out && vitest run"
31
31
  },
32
32
  "dependencies": {
33
- "@allurereport/core-api": "3.0.0-beta.14",
34
- "@allurereport/plugin-api": "3.0.0-beta.14",
35
- "@allurereport/web-awesome": "3.0.0-beta.14",
36
- "@allurereport/web-commons": "3.0.0-beta.14",
33
+ "@allurereport/core-api": "3.0.0-beta.15",
34
+ "@allurereport/plugin-api": "3.0.0-beta.15",
35
+ "@allurereport/web-awesome": "3.0.0-beta.15",
36
+ "@allurereport/web-commons": "3.0.0-beta.15",
37
37
  "d3-shape": "^3.2.0",
38
38
  "handlebars": "^4.7.8"
39
39
  },