google / google/site-kit-wp

Add missing tests (follow-up for #10708)

Open
#11,233 0 comments 0 reactions 0 assignees View on GitHub
Module: Analytics Next Up P2 Type: Enhancement
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 14h
Merged PRs (30d)
77

Description

## Feature Description

In #10708, we updated the Analytics module to reduce fetch requests to query the web data streams list. One action was to update the following components to call `getWebDataStreams` if `hasModuleAccess` is explicitly truthy:

- `PropertyOrWebDataStreamNotAvailableError`
- `WebDataStreamSelect`
- `PropertySelect`
- `PublicationSelect`

We should update tests for the above components to ensure `getWebDataStreams` is not called if `hasModuleAccess` is falsy (particularly `false` + `undefined`).

---------------

_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

*

Contributor guide

Open the contributing guide

Research direction

Start with the Analytics module tests for PropertyOrWebDataStreamNotAvailableError, WebDataStreamSelect, PropertySelect, and PublicationSelect, and review the getWebDataStreams behavior introduced in #10708. Add coverage showing the call is not made when hasModuleAccess is false or undefined, then run the relevant component test suites.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.