snap-ally 0.2.3-beta → 0.2.5-beta
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/SnapAllyReporter.js
CHANGED
|
@@ -200,9 +200,9 @@ class SnapAllyReporter {
|
|
|
200
200
|
var _a, _b;
|
|
201
201
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
202
202
|
const projectUse = ((_a = test.parent.project()) === null || _a === void 0 ? void 0 : _a.use) || {};
|
|
203
|
-
return (
|
|
203
|
+
return (projectUse.defaultBrowserType ||
|
|
204
204
|
projectUse.browserName ||
|
|
205
|
-
|
|
205
|
+
((_b = test.parent.project()) === null || _b === void 0 ? void 0 : _b.name) ||
|
|
206
206
|
'chromium');
|
|
207
207
|
}
|
|
208
208
|
/** Converts Playwright error objects into HTML-safe strings. */
|
|
@@ -309,6 +309,9 @@ class SnapAllyReporter {
|
|
|
309
309
|
reportData.adoOrganization =
|
|
310
310
|
this.options.ado.organization || reportData.adoOrganization;
|
|
311
311
|
reportData.adoProject = this.options.ado.project || reportData.adoProject;
|
|
312
|
+
if (this.options.ado.areaPath) {
|
|
313
|
+
reportData.adoAreaPath = this.options.ado.areaPath;
|
|
314
|
+
}
|
|
312
315
|
}
|
|
313
316
|
if (video) {
|
|
314
317
|
reportData.video = video;
|
package/dist/models/index.d.ts
CHANGED
|
@@ -462,6 +462,12 @@ function renderAccessibilityReport(injectedData) {
|
|
|
462
462
|
if (failedCountEl) failedCountEl.textContent = failedCount;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
+
// Set default area path if provided in data
|
|
466
|
+
const areaInput = document.getElementById('bugAreaInput');
|
|
467
|
+
if (areaInput && data.adoAreaPath) {
|
|
468
|
+
areaInput.value = data.adoAreaPath;
|
|
469
|
+
}
|
|
470
|
+
|
|
465
471
|
// Render video section if exists
|
|
466
472
|
if (videoPath) {
|
|
467
473
|
document.getElementById('a11y-video-card').style.display = 'block';
|
|
@@ -874,7 +880,7 @@ async function submitFinalBug() {
|
|
|
874
880
|
|
|
875
881
|
const title = document.getElementById('bugTitleInput').value;
|
|
876
882
|
const severity = document.getElementById('bugSeverityInput').value;
|
|
877
|
-
const area = document.getElementById('bugAreaInput').value
|
|
883
|
+
const area = document.getElementById('bugAreaInput').value;
|
|
878
884
|
|
|
879
885
|
let screenshotUrl = null;
|
|
880
886
|
if (screenshotBase64) {
|
|
@@ -926,10 +932,18 @@ async function submitFinalBug() {
|
|
|
926
932
|
value: `Found at URL / Resource: <a href="${safePageKey}">${safePageKey}</a>`,
|
|
927
933
|
},
|
|
928
934
|
{ op: 'add', path: '/fields/Microsoft.VSTS.Common.Priority', value: priority },
|
|
929
|
-
{ op: 'add', path: '/fields/System.AreaPath', value: `${proj}\\\\${area}` },
|
|
930
|
-
{ op: 'add', path: '/fields/System.Tags', value: 'A11y;SnapAlly;UI-Test' },
|
|
931
935
|
];
|
|
932
936
|
|
|
937
|
+
if (area) {
|
|
938
|
+
payload.push({
|
|
939
|
+
op: 'add',
|
|
940
|
+
path: '/fields/System.AreaPath',
|
|
941
|
+
value: area.startsWith(proj + '\\') || area === proj ? area : `${proj}\\${area}`,
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
payload.push({ op: 'add', path: '/fields/System.Tags', value: 'A11y;SnapAlly;UI-Test' });
|
|
946
|
+
|
|
933
947
|
if (screenshotUrl) {
|
|
934
948
|
payload.push({
|
|
935
949
|
op: 'add',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snap-ally",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5-beta",
|
|
4
4
|
"description": "A custom Playwright reporter for Accessibility testing using Axe, with HTML reporting and Azure DevOps integration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|