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

Test frontend/pages/sites/SiteListItem.jsx #4695

Closed
15 tasks
sknep opened this issue Dec 16, 2024 · 0 comments · Fixed by #4696
Closed
15 tasks

Test frontend/pages/sites/SiteListItem.jsx #4695

sknep opened this issue Dec 16, 2024 · 0 comments · Fixed by #4696
Assignees

Comments

@sknep
Copy link
Contributor

sknep commented Dec 16, 2024

Add a test to frontend/pages/sites/SiteListItem.jsx using the RTL framework. See our docs for writing frontend tests.

Acceptance Criteria

  • Colocate test file to pages/sites/SiteListItem.test.jsx
  • Test the component renders with the proper props
  • Make sure that (Inactive) shows if the site or org is not active
  • Test to make sure that getSiteName actually concats the site's owner and repository name.
  • Fix title for Site Name Link, and make sure the Link links to the site's build history page
  • Ensure RepoLastVerified is removed from the imports & render fn(see Remove frontend/pages/sites/RepoLastVerified.jsx #4694 )
  • Refactor line 43 (organization check) and always show org name
  • Check that the component displays the site's org name
  • Check that the component shows a message if the site's orgs is a sandbox
  • Consider integrating the test for PublishedState (Test frontend/pages/sites/PublishedState.jsx #4691 )
  • (Maybe) Check that the GitHub link renders (may be redundant with existing tests for GitHubLink)
  • Remove lines 61-70 because all sites are in orgs.
  • Remove "handleRemoveSite()" fn because all sites must be part of orgs.
  • Update props to make sure organization is required
  • Remove component defaultProps (if any) and add the to the component args
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant