Skip to content

Fix Site Health notices and add basic E2E tests#6598

Merged
techanvil merged 12 commits intodevelopfrom
fix/6597-site-health-notices
Feb 21, 2023
Merged

Fix Site Health notices and add basic E2E tests#6598
techanvil merged 12 commits intodevelopfrom
fix/6597-site-health-notices

Conversation

@aaemnnosttv
Copy link
Copy Markdown
Collaborator

@aaemnnosttv aaemnnosttv commented Feb 16, 2023

Summary

Addresses issue:

Relevant technical choices

PR Author Checklist

  • My code is tested and passes existing unit tests.
  • My code has an appropriate set of unit tests which all pass.
  • My code is backward-compatible with WordPress 5.2 and PHP 5.6.
  • My code follows the WordPress coding standards.
  • My code has proper inline documentation.
  • I have added a QA Brief on the issue linked above.
  • I have signed the Contributor License Agreement (see https://cla.developers.google.com/).

Do not alter or remove anything below. The following sections will be managed by moderators only.

Code Reviewer Checklist

  • Run the code.
  • Ensure the acceptance criteria are satisfied.
  • Reassess the implementation with the IB.
  • Ensure no unrelated changes are included.
  • Ensure CI checks pass.
  • Check Storybook where applicable.
  • Ensure there is a QA Brief.

Merge Reviewer Checklist

  • Ensure the PR has the correct target branch.
  • Double-check that the PR is okay to be merged.
  • Ensure the corresponding issue has a ZenHub release assigned.
  • Add a changelog message to the issue.

Copy link
Copy Markdown
Collaborator

@techanvil techanvil 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 @aaemnnosttv and works well. I have left a few comments on the tests, please take a look.


describe( 'Site Health', () => {
it( 'adds debug data to the info tab when Site Kit is active but not setup', async () => {
await setupSiteKit();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The body of this test is the same as the one below - I'm guessing this call to setupSiteKit() needs to be changed/removed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oops, thanks!

array(
$module_slug => array(
'sharedRoles' => array( 'editor' ),
'management' => 'owner',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It might be worth changing the value here to all_admins to further distinguish this from the defaults...

Suggested change
'management' => 'owner',
'management' => 'all_admins',

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I thought about that before and decided to go this way but I don't see a reason not to; SGTM 👍

'verification_status',
'connected_user_count',
'active_modules',
'recoverable_modules',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It could be worth adding an additional test case here to cover the Dashboard Sharing fields...

Copy link
Copy Markdown
Collaborator

@techanvil techanvil left a comment

Choose a reason for hiding this comment

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

Nice one @aaemnnosttv, LGTM!

@techanvil techanvil merged commit a644600 into develop Feb 21, 2023
@techanvil techanvil deleted the fix/6597-site-health-notices branch February 21, 2023 16:50
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.

2 participants