Update gathering data test helpers to use getSampleReportArgs()
.
#10104
Labels
P2
Low priority
QA: Eng
Requires specialized QA by an engineer
Type: Infrastructure
Engineering infrastructure & tooling
Feature Description
At present, the
provideAnalytics4GatheringDataState()
andprovideSearchConsoleGatheringDataState()
helper functions are duplicating the report arguments used for the report that's used to determine the gathering data state.We now have the
getSampleReportArgs()
helpers for both Analytics and Search Console in the plugin code, and should update the above test helpers to make use ofgetSampleReportArgs()
.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
provideAnalytics4GatheringDataState()
andprovideSearchConsoleGatheringDataState()
helper functions should usegetSampleReportArgs()
to retrieve the arguments for the relevant reports, rather than duplicating the report args.Implementation Brief
tests/js/gathering-data-utils.js
:getAnalytics4HasZeroDataReportOptions
, replace it's use withgetSampleReportArgs
imported fromassets/js/modules/analytics-4/datastore/report.js
.getSampleReportArgs
imported fromassets/js/modules/search-console/datastore/report.js
:site-kit-wp/tests/js/gathering-data-utils.js
Lines 89 to 102 in a80a060
Test Coverage
assets/js/components/KeyMetrics/KeyMetricsSetupCTAWidget.test.js
to usegetSampleReportArgs
imported fromassets/js/modules/analytics-4/datastore/report.js
.QA Brief
Changelog entry
The text was updated successfully, but these errors were encountered: