Skip to content

Ws 2610 extra adjust expected data format#14052

Merged
Isabella-Mitchell merged 9 commits into
WS-2610-sport-data-pollingfrom
WS-2610-extra-adjust-expected-data-format
May 21, 2026
Merged

Ws 2610 extra adjust expected data format#14052
Isabella-Mitchell merged 9 commits into
WS-2610-sport-data-pollingfrom
WS-2610-extra-adjust-expected-data-format

Conversation

@Isabella-Mitchell
Copy link
Copy Markdown
Contributor

@Isabella-Mitchell Isabella-Mitchell commented May 21, 2026

Resolves JIRA: N/A

Summary

Updates fixture and amends logic to handle real response data strcuture

Code changes

  • List key code changes that have been made.

Testing

  1. Visited http://localhost:7081/afrique/live/c7gk1vjglxn1t and got it to console log out fetchURL and returned data

Useful Links

Copilot AI review requested due to automatic review settings May 21, 2026 09:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 makeRequest and useSportDataPolling to consume the new nested payload and only apply sportDataEvent to state.
  • Updates fixtures and extends test coverage for missing data in 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.

Comment thread src/app/hooks/useSportDataPolling/makeRequest/index.ts Outdated
Comment thread src/app/hooks/useSportDataPolling/index.ts Outdated
Comment thread src/app/hooks/useSportDataPolling/index.test.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread src/app/hooks/useSportDataPolling/makeRequest/index.test.ts
Comment thread src/app/hooks/useSportDataPolling/fixture/fixtureSportData.js
Comment thread src/app/hooks/useSportDataPolling/fixture/fixtureSportDataUpdate.js
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread src/app/hooks/useSportDataPolling/fixture/fixtureSportData.js
Comment thread src/app/hooks/useSportDataPolling/fixture/fixtureSportDataUpdate.js
@Isabella-Mitchell Isabella-Mitchell merged commit b9b60c2 into WS-2610-sport-data-polling May 21, 2026
9 checks passed
@Isabella-Mitchell Isabella-Mitchell deleted the WS-2610-extra-adjust-expected-data-format branch May 21, 2026 10:23
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.

5 participants