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 pt13 #5176

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

msilva-broad
Copy link
Contributor

  • shifting ajax usage to directly use ajax sub-areas for some of the src/pages uses.
  • improving mock types where possible.

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

Summary of changes:

What

Why

  • improve code maintainability

Testing strategy

toStorageString: '',
};

Ajax.mockImplementation(() => {
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 must be a left-over from an earlier version of this test... Ajax.mockImplementation is called a 2nd time just after this, which negates this mock implementation completely. So this block and its referenced bits like mockOidcUser can be removed.

@@ -6,6 +6,8 @@ import { dataCatalogStore } from 'src/libs/state';
import { Datasets } from 'src/pages/library/Datasets';
import { renderWithAppContexts as render } from 'src/testing/test-utils';

jest.mock('src/libs/ajax/Metrics');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mocking Metrics as a precaution

- shifting ajax usage to directly use ajax sub-areas for some of the src/pages uses.
- improving mock types where possible.
@msilva-broad msilva-broad force-pushed the msilva/UIE-204_Narrow-ajax-usage_pt13 branch from 71fc0df to 95a2f28 Compare November 22, 2024 20:09
Copy link

sonarcloud bot commented Nov 22, 2024

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.

2 participants