google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.22k stars 278 forks source link

Replace unnecessary Key Metrics VRT scenarios with Jest test when appropriate #8418

Open kuasha420 opened 5 months ago

kuasha420 commented 5 months ago

Feature Description

Each and every Key Metrics widget stories also includes all their stories in Visual Regression suite. This is repetitive and unnecessarily increases the VRT running time on CI and bloats the suite. This includes:

The stories for each title should only keep the generic Ready, ReadyViewOnly and any other unique stories for them. ie. AdSenseNotLinked story for TopEarningContentWidget. Besides the unique stories, VRT scenarios should be removed from the generic stories as well. (ie. Ready. ReadyViewOnly).

Instead, the generic VRT scenarios should be added to the actual underlying tile components. ie. MetricTileWrapper, MetricTileText, MetricTileTable, MetricTileNumeric etc.

Specific conditions for a Key Metrics widgets (ie. ErrorMissingCustomDimensions, Error etc) should be verified in component Jest test instead, wherever applicable.


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

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

binnieshah commented 2 months ago

Possible ticket for 132, based on the conversation during standup on 26/06