Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIE-204 Narrow Ajax Usage pt12 #5173

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Conversation

msilva-broad
Copy link
Contributor

@msilva-broad msilva-broad commented Nov 18, 2024

  • shifting ajax usage to directly use ajax sub-areas for the user profile and registration areas.
  • improving mock types where possible.

Jira Ticket: https://broadworkbench.atlassian.net/browse/[Ticket #]

Summary of changes:

What

Why

  • improve code maintainability

Testing strategy

partial<UserContract>({
getSamUserCombinedState: jest.fn().mockResolvedValue(mockSamUserCombinedState),
profile: {
get: jest.fn(async () => partial<TerraUserProfile>({})),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this jest.fn inline form gives great type safety, whereas jest.fn().mockResolvedValue(...) has no type safety because of a cast to "any" out of jest.fn().

- shifting ajax usage to directly use ajax sub-areas for the user profile and registration areas.
- improving mock types where possible.
- improved type safety in mocks for test in TermsOfServicePage.test.ts
@msilva-broad msilva-broad force-pushed the msilva/UIE-204_Narrow-ajax-usage_pt12 branch from db356c9 to 4c1db8b Compare November 18, 2024 23:10
Copy link

sonarcloud bot commented Nov 18, 2024

@msilva-broad msilva-broad added this pull request to the merge queue Nov 19, 2024
Merged via the queue into dev with commit 251a323 Nov 19, 2024
10 checks passed
@msilva-broad msilva-broad deleted the msilva/UIE-204_Narrow-ajax-usage_pt12 branch November 19, 2024 16:22
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.

4 participants