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

Follow Up PR: Fix Key Metrics tests failing due to updated list of conversiontailored metrics. #9519

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

benbowler
Copy link
Collaborator

@benbowler benbowler commented Oct 16, 2024

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 7.4.
  • 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.
  • Ensure there are no unexpected significant changes to file sizes.

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.

@benbowler benbowler changed the title Fix Key Metrics tests failing due to updated list of conversiontailored metrics. Follow Up PR: Fix Key Metrics tests failing due to updated list of conversiontailored metrics. Oct 16, 2024
Copy link
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.

Thanks @benbowler, this looks good. I've left a couple of minor suggestions, sending it back you way to confirm/update.

...expectedMetrics,
...conversionTailoredMetrics,
] );
).toEqual( conversionTailoredMetrics );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, if I've understood things correctly the new set of metrics is a mix of the old/non-conversion and conversion based metrics, so it would be good to rename this variable e.g. expectedMetricsIncludingConversionTailored or something along those lines...

Suggested change
).toEqual( conversionTailoredMetrics );
).toEqual( expectedMetricsIncludingConversionTailored );

Comment on lines 458 to 459
// Conversion Tailored Metrics should be added to the list if the
// includeConversionTailoredMetrics setting is true.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be good to update this comment to be a bit more accurate, e.g. something like this:

Suggested change
// Conversion Tailored Metrics should be added to the list if the
// includeConversionTailoredMetrics setting is true.
// Conversion Tailored Metrics should be included in the list if the
// includeConversionTailoredMetrics setting is true.

@techanvil techanvil changed the base branch from develop to main October 16, 2024 14:19
@techanvil
Copy link
Collaborator

techanvil commented Oct 16, 2024

@benbowler I just realised this needs to target main as it's a 1.138.0 release issue. I've updated the target for the PR.

@benbowler
Copy link
Collaborator Author

Thanks @techanvil, yes agreed your points would clarify the description and variable name.

Copy link
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.

Great, thanks @benbowler. LGTM!

@techanvil techanvil merged commit 0028b0c into main Oct 16, 2024
6 checks passed
@techanvil techanvil deleted the enhancement/9437-fix-key-metrics-tests branch October 16, 2024 15:29
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