Skip to content

Fixes #39384 - replace snapshot test for taskdashboard component#823

Open
andreilakatos wants to merge 1 commit into
theforeman:masterfrom
andreilakatos:tasks-dashboard-test-update
Open

Fixes #39384 - replace snapshot test for taskdashboard component#823
andreilakatos wants to merge 1 commit into
theforeman:masterfrom
andreilakatos:tasks-dashboard-test-update

Conversation

@andreilakatos
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

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

Replaces the existing snapshot-based test for the TasksDashboard React component with explicit assertions using React Testing Library, improving test signal and reducing snapshot churn.

Changes:

  • Migrated TasksDashboard test from testComponentSnapshotsWithFixtures snapshot testing to RTL-based DOM/behavior assertions.
  • Added targeted mocks (URL query helper + donut chart) to keep the test focused and stable.
  • Removed the obsolete Jest snapshot file for TasksDashboard.

Reviewed changes

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

File Description
webpack/ForemanTasks/Components/TasksDashboard/tests/TasksDashboard.test.js Replaces snapshot coverage with RTL assertions for rendering and lifecycle-triggered fetch behavior.
webpack/ForemanTasks/Components/TasksDashboard/tests/snapshots/TasksDashboard.test.js.snap Removes snapshot output no longer used by the updated test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants