@vostride/agent-qa-dashboard 0.1.10 → 0.1.12

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DashboardDatabase } from './index-qDoSzi3O.cjs';
2
- export { A as AppiumManager, C as ConfigManager, L as LiveExecutionEvent, R as RunRow, S as StepRow, T as TestFileInfo, a as TestFileManager, b as TestRunHandle, c as TestRunner, d as TestValidationError, e as TestValidationResult, f as createRouter, r as readJsonBody, s as startServer } from './index-qDoSzi3O.cjs';
1
+ import { D as DashboardDatabase } from './index-BL7OautO.cjs';
2
+ export { A as AppiumManager, C as ConfigManager, L as LiveExecutionEvent, R as RunRow, S as StepRow, T as TestFileInfo, a as TestFileManager, b as TestRunHandle, c as TestRunner, d as TestValidationError, e as TestValidationResult, f as createRouter, r as readJsonBody, s as startServer } from './index-BL7OautO.cjs';
3
3
  import { Reporter, SecretRedactor, SuiteDefinition, RunArtifactReporterContext, SuiteSummary, TestDefinition, StepResult, TestResult, RunSummary, HookResultEvent } from '@vostride/agent-qa-core';
4
4
  import 'node:http';
5
5
  import '@vostride/agent-qa-mcp';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DashboardDatabase } from './index-qDoSzi3O.js';
2
- export { A as AppiumManager, C as ConfigManager, L as LiveExecutionEvent, R as RunRow, S as StepRow, T as TestFileInfo, a as TestFileManager, b as TestRunHandle, c as TestRunner, d as TestValidationError, e as TestValidationResult, f as createRouter, r as readJsonBody, s as startServer } from './index-qDoSzi3O.js';
1
+ import { D as DashboardDatabase } from './index-BL7OautO.js';
2
+ export { A as AppiumManager, C as ConfigManager, L as LiveExecutionEvent, R as RunRow, S as StepRow, T as TestFileInfo, a as TestFileManager, b as TestRunHandle, c as TestRunner, d as TestValidationError, e as TestValidationResult, f as createRouter, r as readJsonBody, s as startServer } from './index-BL7OautO.js';
3
3
  import { Reporter, SecretRedactor, SuiteDefinition, RunArtifactReporterContext, SuiteSummary, TestDefinition, StepResult, TestResult, RunSummary, HookResultEvent } from '@vostride/agent-qa-core';
4
4
  import 'node:http';
5
5
  import '@vostride/agent-qa-mcp';
package/dist/index.js CHANGED
@@ -1161,10 +1161,14 @@ var DashboardDatabase = class {
1161
1161
  const steps = this.getSteps(runId);
1162
1162
  const allViolations = [];
1163
1163
  let stepsWithViolations = 0;
1164
+ let scannedSteps = 0;
1164
1165
  for (const step of steps) {
1165
- if (step.accessibilityViolations && step.accessibilityViolations.length > 0) {
1166
- stepsWithViolations++;
1167
- allViolations.push(...step.accessibilityViolations);
1166
+ if (Array.isArray(step.accessibilityViolations)) {
1167
+ scannedSteps++;
1168
+ if (step.accessibilityViolations.length > 0) {
1169
+ stepsWithViolations++;
1170
+ allViolations.push(...step.accessibilityViolations);
1171
+ }
1168
1172
  }
1169
1173
  }
1170
1174
  const bySeverity = { critical: 0, serious: 0, moderate: 0, minor: 0 };
@@ -1175,13 +1179,39 @@ var DashboardDatabase = class {
1175
1179
  byRule[v.ruleId].count++;
1176
1180
  }
1177
1181
  return {
1182
+ enabled: this.getRunAccessibilityEnabled(runId),
1178
1183
  total: allViolations.length,
1179
1184
  bySeverity,
1180
1185
  byRule: Object.entries(byRule).map(([ruleId, data]) => ({ ruleId, ...data })).sort((a, b) => b.count - a.count),
1181
1186
  stepsWithViolations,
1187
+ scannedSteps,
1188
+ unscannedSteps: Math.max(0, steps.length - scannedSteps),
1182
1189
  totalSteps: steps.length
1183
1190
  };
1184
1191
  }
1192
+ getRunAccessibilityEnabled(runId) {
1193
+ const artifact = this.getRunArtifact(runId);
1194
+ const payload = artifact?.payload;
1195
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) return null;
1196
+ const config = payload.config;
1197
+ if (!config || typeof config !== "object" || Array.isArray(config)) return null;
1198
+ const configRecord = config;
1199
+ const candidates = [configRecord.effectiveConfig, configRecord.parsedConfig];
1200
+ let sawConfig = false;
1201
+ let sawAccessibility = false;
1202
+ for (const candidate of candidates) {
1203
+ if (!candidate || typeof candidate !== "object" || Array.isArray(candidate)) continue;
1204
+ sawConfig = true;
1205
+ const services = candidate.services;
1206
+ if (!services || typeof services !== "object" || Array.isArray(services)) continue;
1207
+ const accessibility = services.accessibility;
1208
+ if (!accessibility || typeof accessibility !== "object" || Array.isArray(accessibility)) continue;
1209
+ sawAccessibility = true;
1210
+ const enabled = accessibility.enabled;
1211
+ if (typeof enabled === "boolean") return enabled;
1212
+ }
1213
+ return sawConfig || sawAccessibility ? false : null;
1214
+ }
1185
1215
  getStep(stepId) {
1186
1216
  const row = this.db.prepare("SELECT * FROM steps WHERE id = ?").get(stepId);
1187
1217
  return row ? this.mapStepRow(row) : void 0;