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

[Devops] Add Frontend Tests, Fix Coverage, Update API Docs #714

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

mmtftr
Copy link
Contributor

@mmtftr mmtftr commented Dec 20, 2024

📋 Proposed Changes

  • Coverage report no longer includes auto generated code and config files
  • Frontend tests improved
  • API docs updated from latest API schema

Closes #587

🧪 Included Tests

  1. Tag Component Tests (Tag.test.tsx)

    • Renders tag information correctly (name, description, logo)
    • Shows 'See all questions' link with correct href
    • Shows create question link when authenticated
    • Hides create question link when not authenticated
    • Renders image with correct alt and title attributes
  2. Tags Page Tests (Tags.test.tsx)

    • Renders tags list correctly
    • Displays loading state
    • Displays error state
    • Shows create tag button
    • Loads more tags when scrolling
    • Handles empty tags list
    • Updates search results when query changes
  3. CustomAnchor Component Tests (CustomAnchor.test.tsx)

    • Renders a span when no href is provided
    • Renders an anchor with correct href when provided
    • Navigates to tag page when tag link is clicked
    • Navigates to question page when question link is clicked
    • Sets correct title for tag links
    • Sets correct title for question links
    • Sets loading title for invalid href patterns
  4. SearchQuestionsList Component Tests (SearchQuestionsList.test.tsx)

    • Renders search results correctly
    • Displays loading state
    • Displays error state
    • Displays empty state message when no results
    • Handles difficulty filter change

@mmtftr mmtftr added type: documentation Improvements or additions to documentation component: frontend About frontend labels Dec 20, 2024
@mmtftr mmtftr self-assigned this Dec 20, 2024
@NazireAta NazireAta self-requested a review December 20, 2024 13:30
Copy link
Contributor

@NazireAta NazireAta left a comment

Choose a reason for hiding this comment

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

Great! Thanks!

@mmtftr mmtftr merged commit 932fb7c into develop Dec 20, 2024
1 check passed
@mmtftr mmtftr deleted the chore/devops/cov-api-doc branch December 20, 2024 13:30
@mmtftr mmtftr mentioned this pull request Dec 20, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: frontend About frontend type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants