@arghajit/playwright-pulse-report 0.2.8 → 0.2.10

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/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Playwright Pluse Report
2
2
 
3
+ [![NPM Version](https://img.shields.io/npm/v/@arghajit/playwright-pulse-report.svg)](https://www.npmjs.com/package/@arghajit/playwright-pulse-report)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+ [![NPM Downloads](https://img.shields.io/npm/dm/@arghajit/playwright-pulse-report.svg)](https://www.npmjs.com/package/@arghajit/playwright-pulse-report)
6
+
3
7
  ![Playwright Pulse Report](https://ocpaxmghzmfbuhxzxzae.supabase.co/storage/v1/object/public/images/pulse-report/playwright-pulse-report.png)
4
8
 
5
9
  _The ultimate Playwright reporter — Interactive dashboard with historical trend analytics, CI/CD-ready standalone HTML reports, and sharding support for scalable test execution._
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arghajit/playwright-pulse-report",
3
3
  "author": "Arghajit Singha",
4
- "version": "0.2.8",
4
+ "version": "0.2.10",
5
5
  "description": "A Playwright reporter and dashboard for visualizing test results.",
6
6
  "homepage": "https://playwright-pulse-report.netlify.app/",
7
7
  "keywords": [
@@ -18,7 +18,8 @@
18
18
  "send-report",
19
19
  "email",
20
20
  "playwright-report",
21
- "pulse"
21
+ "pulse",
22
+ "ai-failure-analysis"
22
23
  ],
23
24
  "main": "dist/reporter/index.js",
24
25
  "types": "dist/reporter/index.d.ts",
@@ -2384,7 +2384,7 @@ aspect-ratio: 16 / 9;
2384
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; } }
2385
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; } }
2386
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; } }
2387
- .trace-actions a { text-decoration: none; color: var(--primary-color); font-weight: 500; font-size: 0.9em; }
2387
+ .trace-actions a { text-decoration: none; font-weight: 500; font-size: 0.9em; }
2388
2388
  .generic-attachment { text-align: center; padding: 1rem; justify-content: center; }
2389
2389
  .attachment-icon { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
2390
2390
  .attachment-caption { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-grow: 1; }
@@ -2856,9 +2856,45 @@ aspect-ratio: 16 / 9;
2856
2856
  const a = e.target.closest('a.lazy-load-attachment');
2857
2857
  if (a && a.dataset && a.dataset.href) {
2858
2858
  e.preventDefault();
2859
- a.href = a.dataset.href;
2860
- a.removeAttribute('data-href');
2861
- a.click();
2859
+
2860
+ // Special handling for view-full links to avoid about:blank issue
2861
+ if (a.classList.contains('view-full')) {
2862
+ // Extract the data from the data URI
2863
+ const dataUri = a.dataset.href;
2864
+ const [header, base64Data] = dataUri.split(',');
2865
+ const mimeType = header.match(/data:([^;]+)/)[1];
2866
+
2867
+ try {
2868
+ // Convert base64 to blob
2869
+ const byteCharacters = atob(base64Data);
2870
+ const byteNumbers = new Array(byteCharacters.length);
2871
+ for (let i = 0; i < byteCharacters.length; i++) {
2872
+ byteNumbers[i] = byteCharacters.charCodeAt(i);
2873
+ }
2874
+ const byteArray = new Uint8Array(byteNumbers);
2875
+ const blob = new Blob([byteArray], { type: mimeType });
2876
+
2877
+ // Create a URL and open it
2878
+ const blobUrl = URL.createObjectURL(blob);
2879
+ const newWindow = window.open(blobUrl, '_blank');
2880
+
2881
+ // Clean up the URL after a delay
2882
+ setTimeout(() => {
2883
+ URL.revokeObjectURL(blobUrl);
2884
+ }, 1000);
2885
+ } catch (error) {
2886
+ console.error('Failed to open attachment:', error);
2887
+ // Fallback to original method
2888
+ a.href = a.dataset.href;
2889
+ a.removeAttribute('data-href');
2890
+ a.click();
2891
+ }
2892
+ } else {
2893
+ // For download links, use the original method
2894
+ a.href = a.dataset.href;
2895
+ a.removeAttribute('data-href');
2896
+ a.click();
2897
+ }
2862
2898
  return;
2863
2899
  }
2864
2900
  });
@@ -324,7 +324,7 @@ async function fetchCredentials(retries = 10) {
324
324
  });
325
325
 
326
326
  const fetchPromise = fetch(
327
- "https://test-dashboard-66zd.onrender.com/api/getcredentials",
327
+ "https://get-credentials.netlify.app/api/getcredentials",
328
328
  {
329
329
  method: "GET",
330
330
  headers: {