@arcadialdev/arcality 3.0.3 → 4.0.0

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/src/testRunner.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import 'dotenv/config';
2
2
  import fs from 'node:fs';
3
+ import os from 'node:os';
3
4
  import path from 'node:path';
4
5
  import { spawn } from 'node:child_process';
5
6
  import { select, isCancel, outro, spinner, text } from '@clack/prompts';
@@ -123,7 +124,7 @@ async function runPlaywright(selection: string): Promise<void> {
123
124
 
124
125
  s.stop(chalk.green('✅ Test completed.'));
125
126
 
126
- const reportPath = path.join(process.cwd(), 'tests-report', 'index.html');
127
+ const reportPath = path.join(process.env.REPORTS_DIR || path.join(os.tmpdir(), 'arcality', 'reports'), 'index.html');
127
128
  if (fs.existsSync(reportPath)) {
128
129
  if (isWin) {
129
130
  spawn('cmd', ['/c', 'start', '""', `"${reportPath}"`], {
@@ -747,6 +747,11 @@ class ArcalityReporter {
747
747
  background: var(--brand-soft);
748
748
  border-color: rgba(181,108,255,0.26);
749
749
  }
750
+ .tag-bug {
751
+ color: #b7e4ff;
752
+ background: rgba(80,170,255,0.12);
753
+ border-color: rgba(80,170,255,0.3);
754
+ }
750
755
  .tag-retry {
751
756
  color: #ffe2a6;
752
757
  background: var(--warning-soft);
@@ -941,6 +946,8 @@ class ArcalityReporter {
941
946
  const isOpen = this.results.length === 1 || tone === 'failed' || i === 0;
942
947
  const successSummary = r.attachments.find(a => a.name === 'success_summary');
943
948
  const successText = this.getAttachmentText(successSummary);
949
+ const bugClassificationAtt = r.attachments.find(a => a.name === 'bug_classification');
950
+ const bugClassification = (this.getAttachmentText(bugClassificationAtt) || '').trim();
944
951
  const evidenceHtml = this.renderVisualEvidence(r.attachments);
945
952
  const contextHtml = this.renderTextAttachmentSection(r.attachments, 'qa_context_summary', 'Contexto QA aplicado');
946
953
  const securityHtml = this._renderSecuritySection(r.attachments, i);
@@ -954,6 +961,7 @@ class ArcalityReporter {
954
961
  <div class="test-meta">
955
962
  <span class="tag tag-status-${tone}">${this.getStatusLabel(r.result.status)}</span>
956
963
  <span class="tag tag-project">${this.escapeHtml(projectName)}</span>
964
+ ${bugClassification ? `<span class="tag tag-bug">${this.escapeHtml(bugClassification)}</span>` : ''}
957
965
  ${r.result.retry > 0 ? `<span class="tag tag-retry">Retry #${r.result.retry}</span>` : ''}
958
966
  <span class="tag">${this.formatDuration(r.result.duration)}</span>
959
967
  </div>
@@ -972,6 +980,13 @@ class ArcalityReporter {
972
980
  </div>
973
981
  ` : ''}
974
982
 
983
+ ${r.result.error && bugClassification ? `
984
+ <div class="outcome-block error">
985
+ <span class="outcome-label">Clasificacion AI</span>
986
+ <pre class="error-block">${this.escapeHtml(bugClassification)}</pre>
987
+ </div>
988
+ ` : ''}
989
+
975
990
  ${r.result.error ? `
976
991
  <div class="outcome-block error">
977
992
  <span class="outcome-label">Diagnostico del bloqueo</span>