@arghajit/dummy 0.1.0-beta-8 → 0.1.0-beta-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.
|
@@ -114,24 +114,8 @@ class PlaywrightPulseReporter {
|
|
|
114
114
|
const projectConfig = project === null || project === void 0 ? void 0 : project.use; // This is where options like userAgent, defaultBrowserType are
|
|
115
115
|
const userAgent = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.userAgent;
|
|
116
116
|
const configuredBrowserType = (_b = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.defaultBrowserType) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
117
|
-
// --- DEBUG LOGS (Uncomment if needed for diagnosing) ---
|
|
118
|
-
// console.log(`[PulseReporter DEBUG] Project: ${test.info().project.name}`);
|
|
119
|
-
// console.log(`[PulseReporter DEBUG] Configured Browser Type: "${configuredBrowserType}"`);
|
|
120
|
-
// console.log(`[PulseReporter DEBUG] User Agent for UAParser: "${userAgent}"`);
|
|
121
|
-
// --- END DEBUG LOGS ---
|
|
122
|
-
// if (!userAgent) {
|
|
123
|
-
// // Fallback if no user agent is available
|
|
124
|
-
// return configuredBrowserType
|
|
125
|
-
// ? configuredBrowserType.charAt(0).toUpperCase() +
|
|
126
|
-
// configuredBrowserType.slice(1)
|
|
127
|
-
// : "Unknown Browser";
|
|
128
|
-
// }
|
|
129
|
-
// try {
|
|
130
117
|
const parser = new ua_parser_js_1.UAParser(userAgent);
|
|
131
118
|
const result = parser.getResult();
|
|
132
|
-
// --- DEBUG LOGS (Uncomment if needed for diagnosing) ---
|
|
133
|
-
// console.log("[PulseReporter DEBUG] UAParser Result:", JSON.stringify(result, null, 2));
|
|
134
|
-
// --- END DEBUG LOGS ---
|
|
135
119
|
let browserName = result.browser.name;
|
|
136
120
|
const browserVersion = result.browser.version
|
|
137
121
|
? ` v${result.browser.version.split(".")[0]}`
|
|
@@ -141,12 +125,11 @@ class PlaywrightPulseReporter {
|
|
|
141
125
|
? ` ${result.os.version.split(".")[0]}`
|
|
142
126
|
: ""; // Major version
|
|
143
127
|
const deviceType = result.device.type; // "mobile", "tablet", etc.
|
|
128
|
+
let finalString;
|
|
144
129
|
// If UAParser couldn't determine browser name, fallback to configured type
|
|
145
|
-
if (
|
|
146
|
-
browserName = configuredBrowserType
|
|
147
|
-
|
|
148
|
-
configuredBrowserType.slice(1)
|
|
149
|
-
: "Unknown";
|
|
130
|
+
if (browserName === undefined) {
|
|
131
|
+
browserName = configuredBrowserType;
|
|
132
|
+
finalString = `${browserName}`;
|
|
150
133
|
}
|
|
151
134
|
else {
|
|
152
135
|
// Specific refinements for mobile based on parsed OS and device type
|
|
@@ -173,19 +156,9 @@ class PlaywrightPulseReporter {
|
|
|
173
156
|
else if (browserName === "Electron") {
|
|
174
157
|
browserName = "Electron App";
|
|
175
158
|
}
|
|
159
|
+
finalString = `${browserName}${browserVersion}${osName}${osVersion}`;
|
|
176
160
|
}
|
|
177
|
-
|
|
178
|
-
return finalString.trim() || "Unknown Browser";
|
|
179
|
-
// } catch (error) {
|
|
180
|
-
// console.warn(
|
|
181
|
-
// `Pulse Reporter: Error parsing User-Agent string "${userAgent}":`,
|
|
182
|
-
// error
|
|
183
|
-
// );
|
|
184
|
-
// return configuredBrowserType
|
|
185
|
-
// ? configuredBrowserType.charAt(0).toUpperCase() +
|
|
186
|
-
// configuredBrowserType.slice(1)
|
|
187
|
-
// : "Unknown Browser";
|
|
188
|
-
// }
|
|
161
|
+
return finalString.trim();
|
|
189
162
|
}
|
|
190
163
|
async processStep(step, testId, browserDetails, testCase) {
|
|
191
164
|
var _a, _b, _c, _d;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arghajit/dummy",
|
|
3
3
|
"author": "Arghajit Singha",
|
|
4
|
-
"version": "0.1.0-beta-
|
|
4
|
+
"version": "0.1.0-beta-10",
|
|
5
5
|
"description": "A Playwright reporter and dashboard for visualizing test results.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"playwright",
|
|
@@ -45,65 +45,25 @@
|
|
|
45
45
|
"report:email": "node ./scripts/sendReport.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@genkit-ai/googleai": "^1.6.2",
|
|
49
|
-
"@genkit-ai/next": "^1.6.2",
|
|
50
|
-
"@hookform/resolvers": "^4.1.3",
|
|
51
|
-
"@radix-ui/react-accordion": "^1.2.3",
|
|
52
|
-
"@radix-ui/react-alert-dialog": "^1.1.6",
|
|
53
|
-
"@radix-ui/react-avatar": "^1.1.3",
|
|
54
|
-
"@radix-ui/react-checkbox": "^1.1.4",
|
|
55
|
-
"@radix-ui/react-dialog": "^1.1.6",
|
|
56
|
-
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
|
57
|
-
"@radix-ui/react-label": "^2.1.2",
|
|
58
|
-
"@radix-ui/react-menubar": "^1.1.6",
|
|
59
|
-
"@radix-ui/react-popover": "^1.1.6",
|
|
60
|
-
"@radix-ui/react-progress": "^1.1.2",
|
|
61
|
-
"@radix-ui/react-radio-group": "^1.2.3",
|
|
62
|
-
"@radix-ui/react-scroll-area": "^1.2.3",
|
|
63
|
-
"@radix-ui/react-select": "^2.1.6",
|
|
64
|
-
"@radix-ui/react-separator": "^1.1.2",
|
|
65
|
-
"@radix-ui/react-slider": "^1.2.3",
|
|
66
|
-
"@radix-ui/react-slot": "^1.1.2",
|
|
67
|
-
"@radix-ui/react-switch": "^1.1.3",
|
|
68
|
-
"@radix-ui/react-tabs": "^1.1.3",
|
|
69
|
-
"@radix-ui/react-toast": "^1.2.6",
|
|
70
|
-
"@radix-ui/react-tooltip": "^1.1.8",
|
|
71
|
-
"@tanstack-query-firebase/react": "^1.0.5",
|
|
72
|
-
"@tanstack/react-query": "^5.66.0",
|
|
73
48
|
"archiver": "^7.0.1",
|
|
74
49
|
"class-variance-authority": "^0.7.1",
|
|
75
50
|
"clsx": "^2.1.1",
|
|
76
51
|
"d3": "^7.9.0",
|
|
77
52
|
"date-fns": "^3.6.0",
|
|
78
53
|
"dotenv": "^16.5.0",
|
|
79
|
-
"firebase": "^11.3.0",
|
|
80
|
-
"genkit": "^1.6.2",
|
|
81
54
|
"highcharts": "^12.2.0",
|
|
82
55
|
"jsdom": "^26.1.0",
|
|
83
|
-
"lucide-react": "^0.475.0",
|
|
84
|
-
"next": "15.2.3",
|
|
85
56
|
"nodemailer": "^7.0.3",
|
|
86
57
|
"patch-package": "^8.0.0",
|
|
87
|
-
"react": "^18.3.1",
|
|
88
|
-
"react-day-picker": "^8.10.1",
|
|
89
|
-
"react-dom": "^18.3.1",
|
|
90
|
-
"react-hook-form": "^7.54.2",
|
|
91
58
|
"recharts": "^2.15.1",
|
|
92
|
-
"tailwind-merge": "^3.0.1",
|
|
93
|
-
"tailwindcss-animate": "^1.0.7",
|
|
94
59
|
"ua-parser-js": "^2.0.3",
|
|
95
|
-
"zod": "^3.24.2"
|
|
60
|
+
"zod": "^3.24.2",
|
|
61
|
+
"lucide-react": "^0.475.0"
|
|
96
62
|
},
|
|
97
63
|
"devDependencies": {
|
|
98
64
|
"@types/node": "^20",
|
|
99
|
-
"@types/react": "^18",
|
|
100
|
-
"@types/react-dom": "^18",
|
|
101
65
|
"@types/ua-parser-js": "^0.7.39",
|
|
102
66
|
"eslint": "9.25.1",
|
|
103
|
-
"eslint-config-next": "15.3.1",
|
|
104
|
-
"genkit-cli": "^1.6.1",
|
|
105
|
-
"postcss": "^8",
|
|
106
|
-
"tailwindcss": "^3.4.1",
|
|
107
67
|
"typescript": "^5"
|
|
108
68
|
},
|
|
109
69
|
"engines": {
|
|
@@ -874,8 +874,11 @@ function generateSuitesWidget(suitesData) {
|
|
|
874
874
|
<h3 class="suite-name" title="${sanitizeHTML(
|
|
875
875
|
suite.name
|
|
876
876
|
)} (${sanitizeHTML(suite.browser)})">${sanitizeHTML(suite.name)}</h3>
|
|
877
|
-
<span class="browser-tag">${sanitizeHTML(suite.browser)}</span>
|
|
878
877
|
</div>
|
|
878
|
+
<div>
|
|
879
|
+
🖥️
|
|
880
|
+
<span class="browser-tag">${sanitizeHTML(suite.browser)}</span>
|
|
881
|
+
</div>
|
|
879
882
|
<div class="suite-card-body">
|
|
880
883
|
<span class="test-count">${suite.count} test${
|
|
881
884
|
suite.count !== 1 ? "s" : ""
|