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

PADV-1658 test: Shared Components Test Suite #20

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

nandodev-net
Copy link
Contributor

@nandodev-net nandodev-net commented Sep 10, 2024

Tickets

Description

This PR focuses on enhancing and completing the test coverage for shared components utilized across the application. The aim is to ensure that all reusable components are thoroughly tested to guarantee their reliability and robustness.

Includes:

  • Shared Components:

  • AlertMessage: Verifies rendering, message display, and error handling logic.

  • LabDetailsCard: Tests for correct lab detail representation, edge cases, and data handling.

  • LabDetailsChartCard: Ensures that chart data is correctly processed and displayed.

  • Table: Covers table rendering, data population, empty states, and interactions like sorting and pagination.

  • TableFilter: Validates filtering logic, form handling, and integration with the table component.

  • DashboardLaunchButton: Ensures button visibility, click events, error handling, and integration with the dashboard launch logic.

  • JsonViewer: Verifies JSON editor initialization, configuration, and cleanup behavior.

Changes Made

This PR aims to achieve full coverage for all shared components, ensuring they function correctly in all intended use cases. Expected coverage for all shared components is at least 87%

How To Test

  1. Ensure your development environment is set up with the latest dependencies by running npm i in your MFE folder.
  2. Run all test with npm test -- --verbose
    Verify that all tests pass and that coverage reports indicate the coverage for the targeted files.

Component Tests

  • Shared

    • AlertMessage ----> Done cov. 100/100
    • LabDetailsCard ----> Done cov. 100/100
    • LabDetailsChatCard ----> Done cov. 100/100
    • Table ----> Done cov. 100/100
    • TableFilter ----> Done cov. 90.47/100
    • DashboardLaunchButton ---> Done cov. 91.66/100
    • JsonViewer ---> Done cov. 100/100

image

@nandodev-net nandodev-net changed the title test: Shared Components Test Suite PADV-1658 test: Shared Components Test Suite Sep 10, 2024
@nandodev-net nandodev-net self-assigned this Sep 10, 2024
@nandodev-net nandodev-net reopened this Sep 10, 2024
Copy link

@01001110J 01001110J left a comment

Choose a reason for hiding this comment

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

In general I think the 98% of the comments are not necessary and that's because the test is descriptive itself maybe in some cases like the gauges make sense.

src/shared/AlertMessage/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/AlertMessage/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/DashboardLaunchButton/index.jsx Show resolved Hide resolved
src/shared/DashboardLaunchButton/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/JsonViewer/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/LabDetailsCard/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/LabDetailsChartCard/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/LabDetailsChartCard/tests/index.test.jsx Outdated Show resolved Hide resolved
src/shared/Table/tests/index.test.jsx Outdated Show resolved Hide resolved
@nandodev-net
Copy link
Contributor Author

nandodev-net commented Sep 11, 2024

In general I think the 98% of the comments are not necessary and that's because the test is descriptive itself maybe in some cases like the gauges make sense.

Sure!, but given so many tests of that tool that I don't know well, for me they were very useful. I Will erased all those comments

@nandodev-net nandodev-net merged commit f9264fd into vue/PADV-1475 Sep 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants