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

[Chore] Remove third-party testing internals from test snapshots #192747

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('FieldComponent', () => {
selectedField={getField('machine.os.raw')}
/>
);
expect(wrapper).toMatchSnapshot();
expect(wrapper.container).toMatchSnapshot();
const comboBox = wrapper.getByTestId('fieldAutocompleteComboBox');
const input = within(comboBox).getByRole('combobox');
expect(input).toHaveAttribute('value', 'machine.os.raw');
Expand All @@ -52,7 +52,7 @@ describe('FieldComponent', () => {
selectedField={getField('machine.os.raw')}
/>
);
expect(wrapper).toMatchSnapshot();
expect(wrapper.container).toMatchSnapshot();
expect(wrapper.getByTestId('fieldAutocompleteComboBox').querySelector('input')).toBeDisabled();
});
it('should render the loading spinner if isLoading is true when clicked', () => {
Expand All @@ -72,7 +72,7 @@ describe('FieldComponent', () => {
/>
);
const fieldAutocompleteComboBox = wrapper.getByTestId('fieldAutocompleteComboBox');
expect(wrapper).toMatchSnapshot();
expect(wrapper.container).toMatchSnapshot();
fireEvent.click(fieldAutocompleteComboBox);
expect(wrapper.getByRole('progressbar')).toBeInTheDocument();
});
Expand All @@ -92,7 +92,7 @@ describe('FieldComponent', () => {
selectedField={getField('machine.os.raw')}
/>
);
expect(wrapper).toMatchSnapshot();
expect(wrapper.container).toMatchSnapshot();
expect(wrapper.getByTestId('comboBoxClearButton')).toBeInTheDocument();
});
it('should change the selected value', async () => {
Expand Down
Loading