@arghajit/dummy 0.1.2-beta-11 → 0.1.3

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.
@@ -1,10 +1,9 @@
1
1
  import type { LucideIcon } from "lucide-react";
2
2
  export type TestStatus = "passed" | "failed" | "skipped" | "expected-failure" | "unexpected-success" | "explicitly-skipped";
3
- export type PulseTestStatus = TestStatus | "flaky";
4
3
  export interface TestStep {
5
4
  id: string;
6
5
  title: string;
7
- status: PulseTestStatus;
6
+ status: TestStatus;
8
7
  duration: number;
9
8
  startTime: Date;
10
9
  endTime: Date;
@@ -19,7 +18,7 @@ export interface TestStep {
19
18
  export interface TestResult {
20
19
  id: string;
21
20
  name: string;
22
- status: PulseTestStatus;
21
+ status: TestStatus;
23
22
  duration: number;
24
23
  startTime: Date;
25
24
  endTime: Date;
@@ -55,7 +54,6 @@ export interface TestRun {
55
54
  passed: number;
56
55
  failed: number;
57
56
  skipped: number;
58
- flaky: number;
59
57
  duration: number;
60
58
  environment?: EnvDetails;
61
59
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@arghajit/dummy",
3
- "version": "0.1.2-beta-11",
3
+ "author": "Arghajit Singha",
4
+ "version": "0.1.3",
4
5
  "description": "A Playwright reporter and dashboard for visualizing test results.",
5
6
  "homepage": "https://playwright-pulse-report.netlify.app/",
6
7
  "keywords": [
@@ -50,8 +51,7 @@
50
51
  "report:merge": "node ./scripts/merge-pulse-report.js",
51
52
  "report:email": "node ./scripts/sendReport.mjs",
52
53
  "report:minify": "node ./scripts/generate-email-report.mjs",
53
- "generate-trend": "node ./scripts/generate-trend.mjs",
54
- "deploy": "npm publish --access -public"
54
+ "generate-trend": "node ./scripts/generate-trend.mjs"
55
55
  },
56
56
  "dependencies": {
57
57
  "archiver": "^7.0.1",
@@ -73,13 +73,16 @@
73
73
  "devDependencies": {
74
74
  "@types/node": "^20",
75
75
  "@types/ua-parser-js": "^0.7.39",
76
- "eslint": "9.25.1",
76
+ "eslint": "^9.39.1",
77
77
  "typescript": "^5"
78
78
  },
79
79
  "engines": {
80
- "node": ">=16"
80
+ "node": ">=18"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@playwright/test": ">=1.40.0"
84
+ },
85
+ "overrides": {
86
+ "glob": "^13.0.0"
84
87
  }
85
88
  }
@@ -1850,53 +1850,43 @@ function generateHTML(reportData, trendData = null) {
1850
1850
  : ""
1851
1851
  }<button class="copy-error-btn" onclick="copyErrorToClipboard(this)">Copy Error Prompt</button></div>`
1852
1852
  : ""
1853
- }${(() => {
1854
- if (!step.attachments || step.attachments.length === 0)
1855
- return "";
1856
- return `<div class="attachments-section"><h4>Step Attachments</h4><div class="attachments-grid">${step.attachments
1857
- .map((attachment) => {
1858
- try {
1859
- const attachmentPath = path.resolve(
1860
- DEFAULT_OUTPUT_DIR,
1861
- attachment.path
1862
- );
1863
- if (!fsExistsSync(attachmentPath)) {
1864
- return `<div class="attachment-item error">Attachment not found: ${sanitizeHTML(
1865
- attachment.name
1866
- )}</div>`;
1867
- }
1868
- const attachmentBase64 =
1869
- readFileSync(attachmentPath).toString("base64");
1870
- const attachmentDataUri = `data:${attachment.contentType};base64,${attachmentBase64}`;
1871
- return `<div class="attachment-item generic-attachment">
1872
- <div class="attachment-icon">${getAttachmentIcon(
1873
- attachment.contentType
1874
- )}</div>
1853
+ }${
1854
+ (() => {
1855
+ if (!step.attachments || step.attachments.length === 0) return "";
1856
+ return `<div class="attachments-section"><h4>Step Attachments</h4><div class="attachments-grid">${step.attachments
1857
+ .map((attachment) => {
1858
+ try {
1859
+ const attachmentPath = path.resolve(
1860
+ DEFAULT_OUTPUT_DIR,
1861
+ attachment.path
1862
+ );
1863
+ if (!fsExistsSync(attachmentPath)) {
1864
+ return `<div class="attachment-item error">Attachment not found: ${sanitizeHTML(
1865
+ attachment.name
1866
+ )}</div>`;
1867
+ }
1868
+ const attachmentBase64 = readFileSync(attachmentPath).toString("base64");
1869
+ const attachmentDataUri = `data:${attachment.contentType};base64,${attachmentBase64}`;
1870
+ return `<div class="attachment-item generic-attachment">
1871
+ <div class="attachment-icon">${getAttachmentIcon(attachment.contentType)}</div>
1875
1872
  <div class="attachment-caption">
1876
- <span class="attachment-name" title="${sanitizeHTML(
1877
- attachment.name
1878
- )}">${sanitizeHTML(attachment.name)}</span>
1879
- <span class="attachment-type">${sanitizeHTML(
1880
- attachment.contentType
1881
- )}</span>
1873
+ <span class="attachment-name" title="${sanitizeHTML(attachment.name)}">${sanitizeHTML(attachment.name)}</span>
1874
+ <span class="attachment-type">${sanitizeHTML(attachment.contentType)}</span>
1882
1875
  </div>
1883
1876
  <div class="attachment-info">
1884
1877
  <div class="trace-actions">
1885
1878
  <a href="#" data-href="${attachmentDataUri}" class="view-full lazy-load-attachment" target="_blank">View</a>
1886
- <a href="#" data-href="${attachmentDataUri}" class="lazy-load-attachment" download="${sanitizeHTML(
1887
- attachment.name
1888
- )}">Download</a>
1879
+ <a href="#" data-href="${attachmentDataUri}" class="lazy-load-attachment" download="${sanitizeHTML(attachment.name)}">Download</a>
1889
1880
  </div>
1890
1881
  </div>
1891
1882
  </div>`;
1892
- } catch (e) {
1893
- return `<div class="attachment-item error">Failed to load attachment: ${sanitizeHTML(
1894
- attachment.name
1895
- )}</div>`;
1896
- }
1897
- })
1898
- .join("")}</div></div>`;
1899
- })()}${
1883
+ } catch (e) {
1884
+ return `<div class="attachment-item error">Failed to load attachment: ${sanitizeHTML(attachment.name)}</div>`;
1885
+ }
1886
+ })
1887
+ .join("")}</div></div>`;
1888
+ })()
1889
+ }${
1900
1890
  hasNestedSteps
1901
1891
  ? `<div class="nested-steps">${generateStepsHTML(
1902
1892
  step.steps,
@@ -1913,9 +1903,7 @@ function generateHTML(reportData, trendData = null) {
1913
1903
  test.tags || []
1914
1904
  )
1915
1905
  .join(",")
1916
- .toLowerCase()}" data-test-id="${sanitizeHTML(
1917
- String(test.id || testIndex)
1918
- )}">
1906
+ .toLowerCase()}" data-test-id="${sanitizeHTML(String(test.id || testIndex))}">
1919
1907
  <div class="test-case-header" role="button" aria-expanded="false"><div class="test-case-summary"><span class="status-badge ${getStatusClass(
1920
1908
  test.status
1921
1909
  )}">${String(
@@ -1982,9 +1970,7 @@ function generateHTML(reportData, trendData = null) {
1982
1970
  ${
1983
1971
  test.stderr && test.stderr.length > 0
1984
1972
  ? (() => {
1985
- const logId = `stderr-log-${
1986
- test.id || testIndex
1987
- }`;
1973
+ const logId = `stderr-log-${test.id || testIndex}`;
1988
1974
  return `<div class="console-output-section"><h4>Console Output (stderr)</h4><pre id="${logId}" class="console-log stderr-log">${test.stderr
1989
1975
  .map((line) => sanitizeHTML(line))
1990
1976
  .join("\\n")}</pre></div>`;
@@ -1998,7 +1984,7 @@ function generateHTML(reportData, trendData = null) {
1998
1984
  test.screenshots.length === 0
1999
1985
  )
2000
1986
  return "";
2001
- return `<div class="attachments-section"><h4>Screenshots (Click to load Images)</h4><div class="attachments-grid">${test.screenshots
1987
+ return `<div class="attachments-section"><h4>Screenshots</h4><div class="attachments-grid">${test.screenshots
2002
1988
  .map((screenshotPath, index) => {
2003
1989
  try {
2004
1990
  const imagePath = path.resolve(
@@ -2398,7 +2384,7 @@ aspect-ratio: 16 / 9;
2398
2384
  @media (max-width: 992px) { .dashboard-bottom-row { grid-template-columns: 1fr; } .pie-chart-wrapper div[id^="pieChart-"] { max-width: 350px; margin: 0 auto; } .filters input { min-width: 180px; } .filters select { min-width: 150px; } }
2399
2385
  @media (max-width: 768px) { body { font-size: 15px; } .container { margin: 10px; padding: 20px; } .header { flex-direction: column; align-items: flex-start; gap: 15px; } .header h1 { font-size: 1.6em; } .run-info { text-align: left; font-size:0.9em; } .tabs { margin-bottom: 25px;} .tab-button { padding: 12px 20px; font-size: 1.05em;} .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px;} .summary-card .value {font-size: 2em;} .summary-card h3 {font-size: 0.95em;} .filters { flex-direction: column; padding: 18px; gap: 12px;} .filters input, .filters select, .filters button {width: 100%; box-sizing: border-box;} .test-case-header { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } .test-case-summary {gap: 10px;} .test-case-title {font-size: 1.05em;} .test-case-meta { flex-direction: row; flex-wrap: wrap; gap: 8px; margin-top: 8px;} .attachments-grid {grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px;} .test-history-grid {grid-template-columns: 1fr;} .pie-chart-wrapper {min-height: auto;} .ai-failure-cards-grid { grid-template-columns: 1fr; } .ai-analyzer-stats { flex-direction: column; gap: 15px; text-align: center; } .failure-header { flex-direction: column; align-items: stretch; gap: 15px; } .failure-main-info { text-align: center; } .failure-meta { justify-content: center; } .compact-ai-btn { justify-content: center; padding: 12px 20px; } }
2400
2386
  @media (max-width: 480px) { body {font-size: 14px;} .container {padding: 15px;} .header h1 {font-size: 1.4em;} #report-logo { height: 35px; width: 45px; } .tab-button {padding: 10px 15px; font-size: 1em;} .summary-card .value {font-size: 1.8em;} .attachments-grid {grid-template-columns: 1fr;} .step-item {padding-left: calc(var(--depth, 0) * 18px);} .test-case-content, .step-details {padding: 15px;} .trend-charts-row {gap: 20px;} .trend-chart {padding: 20px;} .stat-item .stat-number { font-size: 1.5em; } .failure-header { padding: 15px; } .failure-error-preview, .full-error-details { padding-left: 15px; padding-right: 15px; } }
2401
- .trace-actions a { text-decoration: none; font-weight: 500; font-size: 0.9em; }
2387
+ .trace-actions a { text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 0.9em; }
2402
2388
  .generic-attachment { text-align: center; padding: 1rem; justify-content: center; }
2403
2389
  .attachment-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
2404
2390
  .attachment-caption { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-grow: 1; }