Ws 2610 extra adjust expected data format#14052
Merged
Isabella-Mitchell merged 9 commits intoMay 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the useSportDataPolling hook to handle an updated polling endpoint payload shape (additional metadata alongside sportDataEvent) and adjusts fixtures/tests to reflect the new format.
Changes:
- Introduces polling response/payload TypeScript types for sport polling.
- Updates
makeRequestanduseSportDataPollingto consume the new nested payload and only applysportDataEventto state. - Updates fixtures and extends test coverage for missing
datain the polling response.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/app/hooks/useSportDataPolling/types.ts | Adds types describing the polled sport payload/response shape. |
| src/app/hooks/useSportDataPolling/makeRequest/index.ts | Updates request typing and return type for the new poll format. |
| src/app/hooks/useSportDataPolling/makeRequest/index.test.ts | Adds a test case for a 200 response with missing data. |
| src/app/hooks/useSportDataPolling/index.ts | Updates hook to read sportDataEvent from the new response structure before setting state. |
| src/app/hooks/useSportDataPolling/index.test.ts | Updates tests to use the new fixture shape and mocked request return type. |
| src/app/hooks/useSportDataPolling/fixture/fixtureSportData.js | Adjusts fixture to include new metadata wrapper around sportDataEvent. |
| src/app/hooks/useSportDataPolling/fixture/fixtureSportDataUpdate.js | Adjusts update fixture to include new metadata wrapper around sportDataEvent. |
shayneahchoon
approved these changes
May 21, 2026
hotinglok
approved these changes
May 21, 2026
emilysaffron
approved these changes
May 21, 2026
…xpected-data-format
b9b60c2
into
WS-2610-sport-data-polling
9 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves JIRA: N/A
Summary
Updates fixture and amends logic to handle real response data strcuture
Code changes
Testing
Useful Links