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

Enable throwSuggestions RTL configuration #3367

Merged
merged 7 commits into from
Oct 17, 2023
Merged

Conversation

@amanmahajan7 amanmahajan7 marked this pull request as ready for review October 17, 2023 02:26
@@ -1,4 +1,7 @@
import { act } from 'react-dom/test-utils';
import { configure } from '@testing-library/react';

configure({ throwSuggestions: true });
Copy link
Contributor

Choose a reason for hiding this comment

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

Duration 67.79s (transform 1.28s, setup 7.69s, collect 7.75s, tests 29.41s, environment 12.71s, prepare 2.69s)

The tests take over 1 minute now, I think it's fine to try it from time to time to improve tests, but I'm 👎 on keeping this enabled.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How long does it take without this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

NVM I thought the GH CI was faster than that

Copy link
Contributor

Choose a reason for hiding this comment

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

We can add it back

@@ -16,25 +16,25 @@ describe('Editor', () => {
it('should open editor on double click', async () => {
render(<EditorTest />);
await userEvent.click(getCellsAtRowIndex(0)[0]);
expect(screen.queryByLabelText('col1-editor')).not.toBeInTheDocument();
expect(screen.queryByRole('spinbutton', { name: 'col1-editor' })).not.toBeInTheDocument();
Copy link
Contributor

Choose a reason for hiding this comment

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

What element are we actually querying here? I don't really understand what a spinbutton is

Copy link
Contributor Author

@amanmahajan7 amanmahajan7 Oct 17, 2023

Choose a reason for hiding this comment

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

input type=number.

@amanmahajan7 amanmahajan7 requested a review from nstepien October 17, 2023 11:56
);
expect(
JSON.parse(screen.getByTestId('sortColumnsValue', { suggest: false }).textContent!)
).toStrictEqual(expectedValue);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use toHaveTextContent?

@amanmahajan7 amanmahajan7 merged commit 847c130 into main Oct 17, 2023
3 checks passed
@amanmahajan7 amanmahajan7 deleted the am-throwSuggestions branch October 17, 2023 13:34
adityatoshniwal pushed a commit to pgadmin-org/react-data-grid that referenced this pull request Jul 31, 2024
* Enable `throwSuggestions`

* Fix tests

* Fix sorting tests

* Update test/setup.ts

* Revert "Update test/setup.ts"

This reverts commit f051f4d.

* Use `toHaveTextContent`
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