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

chore: Test frontend/pages/sites/SiteListItem.jsx (#4965) and fronten… #4696

Merged

Conversation

sknep
Copy link
Contributor

@sknep sknep commented Dec 18, 2024

Changes proposed in this pull request:

security considerations

N/A - just a few tests

@sknep sknep linked an issue Dec 18, 2024 that may be closed by this pull request
15 tasks
@sknep sknep requested review from apburnes and drewbo December 18, 2024 21:19
@sknep sknep linked an issue Dec 18, 2024 that may be closed by this pull request
5 tasks

import SiteListItem from './SiteListItem';
// import GitHubLink from '@shared/GitHubLink';
// import PublishedState from './PublishedState';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I be stubbing these instead?

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to do this slightly differently with expect.objectContaining() and expect.anything()

LMK what you think

@@ -86,11 +63,6 @@ SiteListItem.propTypes = {
viewLink: PropTypes.string,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'm not sure about viewLink -- i wonder if it was what the link used to link to before we decided to make it the build history?

@cloud-gov-pages-operations
Copy link
Contributor

cloud-gov-pages-operations commented Dec 18, 2024

🤖 This is an automated code coverage report

Total coverage (lines): 17.94%
Coverage diff: 1.18% 📈

Copy link
Contributor

@apburnes apburnes left a comment

Choose a reason for hiding this comment

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

Great work and solid additions to our frontend tests! I just put in a few comments to simplify/breakout some of the test supports.

frontend/pages/sites/SiteListItem.test.jsx Outdated Show resolved Hide resolved
frontend/pages/sites/SiteListItem.test.jsx Outdated Show resolved Hide resolved

import SiteListItem from './SiteListItem';
// import GitHubLink from '@shared/GitHubLink';
// import PublishedState from './PublishedState';

This comment was marked as resolved.

frontend/pages/sites/SiteListItem.test.jsx Show resolved Hide resolved
@sknep sknep force-pushed the chore-test-pages/sites/SiteListItem-and-PublishedState-4691-4695 branch from f0d20f1 to 962f2bd Compare December 19, 2024 16:32
@sknep sknep requested a review from apburnes December 19, 2024 16:32
@sknep sknep force-pushed the chore-test-pages/sites/SiteListItem-and-PublishedState-4691-4695 branch 2 times, most recently from 0b6cdb3 to a55c7ee Compare December 19, 2024 19:00
@sknep sknep force-pushed the chore-test-pages/sites/SiteListItem-and-PublishedState-4691-4695 branch from a55c7ee to 0a53abf Compare December 19, 2024 19:53
Copy link
Contributor

@apburnes apburnes left a comment

Choose a reason for hiding this comment

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

This looks good to go to me. Nice refactoring and readable tests.

@apburnes apburnes self-requested a review December 19, 2024 20:54
@sknep sknep merged commit f78a95f into main Dec 19, 2024
8 checks passed
@sknep sknep deleted the chore-test-pages/sites/SiteListItem-and-PublishedState-4691-4695 branch December 19, 2024 20:55
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 frontend/pages/sites/SiteListItem.jsx Test frontend/pages/sites/PublishedState.jsx
3 participants