Skip to content

test: add unit test for ChaosHub output mapping - #5549

Open
Ju-Min-Kyung wants to merge 16 commits into
litmuschaos:masterfrom
Ju-Min-Kyung:test/chaoshub-output-model-mapping
Open

test: add unit test for ChaosHub output mapping#5549
Ju-Min-Kyung wants to merge 16 commits into
litmuschaos:masterfrom
Ju-Min-Kyung:test/chaoshub-output-model-mapping

Conversation

@Ju-Min-Kyung

Copy link
Copy Markdown

Proposed changes

Fixes #5535
Added unit tests for the ChaosFaults component

  • Validated fault name and description rendering
  • Verified fault links contain the expected chartName parameter

Types of changes

What types of changes does your code introduce to Litmus? Put an x in the boxes that apply

  • New feature (non-breaking change which adds functionality)
  • Bugfix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices applies)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have signed the commit for DCO to be passed.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added necessary documentation (if appropriate)

Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new unit test file for the ChaosHub ChaosFaults view to validate some of the rendered fault details and ensure generated fault links include the chartName query parameter, addressing part of the mapping behavior described in #5535.

Changes:

  • Introduces ChaosFaults.test.tsx covering basic fault name/description rendering.
  • Adds an assertion that the fault card link URL contains chartName=<chart metadata.name>.

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

Comment thread chaoscenter/web/src/views/ChaosHub/__tests__/ChaosFaults.test.tsx
Comment thread chaoscenter/web/src/views/ChaosHub/__tests__/ChaosFaults.test.tsx
@PriteshKiri

Copy link
Copy Markdown
Contributor

Hey @Ju-Min-Kyung
Any updates?

Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
@Ju-Min-Kyung

Copy link
Copy Markdown
Author

Hey @Ju-Min-Kyung Any updates?

Yes, I've pushed an update that adds multi-chart mapping coverage and tag-based filtering tests.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

@PriteshKiri

Copy link
Copy Markdown
Contributor

@Ju-Min-Kyung could you please fix the CI failures?

Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
@Ju-Min-Kyung
Ju-Min-Kyung force-pushed the test/chaoshub-output-model-mapping branch from d2c56e6 to ea10d0f Compare July 14, 2026 11:51
Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
@Ju-Min-Kyung

Copy link
Copy Markdown
Author

@Ju-Min-Kyung could you please fix the CI failures?

It looks like Codacy is analyzing stale code. The latest commit (61fc9ee) already contains the fixes, but Codacy is still reporting the previous 17 issues. Could you please refresh the analysis?

@PriteshKiri PriteshKiri reopened this Jul 21, 2026
Signed-off-by: Ju-Min-Kyung <alsrud7767@naver.com>
@Ju-Min-Kyung
Ju-Min-Kyung force-pushed the test/chaoshub-output-model-mapping branch from 0eaaff9 to 5c3a790 Compare August 13, 2026 08:30
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.

test: add unit coverage for ChaosHub output model mapping

4 participants