Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Test cases for chaosHub views #4249

Merged
merged 6 commits into from
Nov 22, 2023
Merged

Conversation

Freedisch
Copy link
Contributor

Proposed changes

Added tests cases chaoshub views components

  • ChaosHub
  • ChaosHubMenu
  • ChaosFault

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)

Dependency

  • Please add the links to the dependent PR need to be merged before this (if any).

Special notes for your reviewer:

Signed-off-by: freedisch <freeproduc@gmail.com>
@Freedisch Freedisch marked this pull request as draft October 30, 2023 03:10
Signed-off-by: freedisch <freeproduc@gmail.com>
@Freedisch Freedisch marked this pull request as ready for review November 14, 2023 08:57
@S-ayanide S-ayanide added kind/unit-test LFX-MENTORSHIP Linux Foundation Mentor ship Issue labels Nov 15, 2023
useStrings: () => ({ getString: (key: any) => key })
}));

describe('<ChaosFaultView />', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Since this test is specific to a route, after wrapping the render in test wrapper and default layout, use a before all router push to navigate to that specific route and then carry on the test

beforeAll(() =>
  window.history.pushState(
    {},
    'Chaos Fault',
    '/chaos-hubs/6f39cea9-6264-4951-83a8-29976b614289/fault/aws/ecs-instance-stop'
  )
);

Freedisch and others added 4 commits November 22, 2023 10:04
….tsx

Co-authored-by: Sayan Mondal <sayan.mondal@harness.io>
Signed-off-by: Magnim BATALE <82499435+Freedisch@users.noreply.github.com>
Signed-off-by: freedisch <freeproduc@gmail.com>
@S-ayanide S-ayanide merged commit ad4ecca into litmuschaos:master Nov 22, 2023
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/unit-test LFX-MENTORSHIP Linux Foundation Mentor ship Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants