Skip to content

Fix dashboard CSV parsing failures and add Cypress console-error coverage#2470

Merged
pethers merged 7 commits into
mainfrom
copilot/fix-broken-dashboard-pages
May 14, 2026
Merged

Fix dashboard CSV parsing failures and add Cypress console-error coverage#2470
pethers merged 7 commits into
mainfrom
copilot/fix-broken-dashboard-pages

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

  • Inspect PR review thread and current Cypress command implementations
  • Run baseline repository lint/build/test before code changes
  • Implement fixes in cypress/support/commands.js for cross-realm Error formatting and async console error assertion timing
  • Run targeted Cypress-related tests for updated commands
  • Run final validation and update PR with comment reply

@pethers pethers marked this pull request as ready for review May 13, 2026 23:06
Copilot AI review requested due to automatic review settings May 13, 2026 23:06
@github-actions github-actions Bot added javascript JavaScript code changes testing Test coverage size-m Medium change (50-250 lines) labels May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: javascript,testing,size-m

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses dashboard CSV parsing/runtime regressions and strengthens Cypress dashboard checks so console-level initialization errors are surfaced during dashboard test runs.

Changes:

  • Renamed fragile local Papa Parse bindings in risk and committee dashboard CSV parsing paths.
  • Added dashboard console.error capture/assertion helpers to Cypress support commands.
  • Updated dashboard Cypress suites to use visitDashboard() and assert captured console errors.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/browser/dashboards/risk-dashboard.ts Renames the local Papa parser binding used during CSV parsing.
src/browser/dashboards/committees-dashboard.ts Renames the committee dashboard Papa parser binding and related load checks.
cypress/support/commands.js Extends visitDashboard() to capture console.error and adds assertNoConsoleErrors().
cypress/e2e/dashboards-per-chart/_helpers.js Adds per-test console-error assertions to per-chart dashboard suites.
cypress/e2e/all-dashboards.cy.js Uses visitDashboard() for dashboard pages and adds console-error assertions.

Comment on lines +242 to +248
Cypress.Commands.add('assertNoConsoleErrors', () => {
cy.window().then((win) => {
const messages = (win.__rdmConsoleErrors || []).map((args) =>
args.map(formatDashboardConsoleErrorArgument).join(' '),
);
expect(messages, 'dashboard console.error messages').to.deep.equal([]);
});
Comment on lines +228 to +236
function formatDashboardConsoleErrorArgument(arg) {
if (arg instanceof Error) {
return `${arg.name}: ${arg.message}`;
}
if (typeof arg === 'string') {
return arg;
}
try {
return JSON.stringify(arg);
@pethers
Copy link
Copy Markdown
Member

pethers commented May 14, 2026

@copilot apply changes based on the comments in this thread

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions
Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers pethers merged commit 188cc9b into main May 14, 2026
18 checks passed
@pethers pethers deleted the copilot/fix-broken-dashboard-pages branch May 14, 2026 08:11
Copilot AI requested a review from pethers May 14, 2026 08:11
Copilot stopped work on behalf of pethers due to an error May 14, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript JavaScript code changes size-m Medium change (50-250 lines) testing Test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants