snap-ally 0.2.3-beta → 0.2.4-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.
@@ -20,6 +20,7 @@ export interface AccessibilityReporterOptions {
20
20
  ado?: {
21
21
  organization?: string;
22
22
  project?: string;
23
+ areaPath?: string;
23
24
  };
24
25
  }
25
26
  /**
@@ -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 (((_b = test.parent.project()) === null || _b === void 0 ? void 0 : _b.name) ||
203
+ return (projectUse.defaultBrowserType ||
204
204
  projectUse.browserName ||
205
- projectUse.defaultBrowserType ||
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;
@@ -10,6 +10,7 @@ export interface ReportData {
10
10
  minorColor: string;
11
11
  adoOrganization?: string;
12
12
  adoProject?: string;
13
+ adoAreaPath?: string;
13
14
  adoPat?: string;
14
15
  timestamp?: string;
15
16
  }
@@ -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';
@@ -926,7 +932,7 @@ 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}` },
935
+ { op: 'add', path: '/fields/System.AreaPath', value: area.startsWith(proj + '\\') || area === proj ? area : `${proj}\\${area}` },
930
936
  { op: 'add', path: '/fields/System.Tags', value: 'A11y;SnapAlly;UI-Test' },
931
937
  ];
932
938
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snap-ally",
3
- "version": "0.2.3-beta",
3
+ "version": "0.2.4-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",