Skip to content

Commit

Permalink
rename tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanMarmelab committed Jan 2, 2025
1 parent b27fe7c commit 2f3ed8a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions packages/ra-ui-materialui/src/field/ReferenceManyField.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ describe('<ReferenceManyField />', () => {
});

describe('"Select all" button', () => {
it('should be displayed if an item is selected', async () => {
it('should be displayed if all the items of the page are selected', async () => {
render(<WithPagination />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(6);
Expand All @@ -285,7 +285,7 @@ describe('<ReferenceManyField />', () => {
await screen.findByRole('button', { name: 'Select all' })
).toBeDefined();
});
it('should not be displayed if all item are manyally selected', async () => {
it('should not be displayed if all item are manually selected', async () => {
render(
<WithPagination
dataProvider={testDataProvider({
Expand Down Expand Up @@ -319,7 +319,7 @@ describe('<ReferenceManyField />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if all item are selected with the "Select all" button', async () => {
it('should not be displayed if all items are selected with the "Select all" button', async () => {
render(<WithPagination />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(6);
Expand All @@ -332,7 +332,7 @@ describe('<ReferenceManyField />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if we reached de limit by a manyally selection', async () => {
it('should not be displayed if we reached the limit by a manual selection', async () => {
render(
<WithPaginationAndSelectAllLimit
limit={2}
Expand Down Expand Up @@ -374,7 +374,7 @@ describe('<ReferenceManyField />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if we reached de selectAllLimit by a click on the "Select all" button', async () => {
it('should not be displayed if we reached the selectAllLimit by a click on the "Select all" button', async () => {
render(<WithPaginationAndSelectAllLimit />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(6);
Expand All @@ -400,7 +400,7 @@ describe('<ReferenceManyField />', () => {
fireEvent.click(screen.getByRole('button', { name: 'Select all' }));
await screen.findByText('7 items selected');
});
it('should select the maximum items possible until we reached the selectAllLimit', async () => {
it('should select the maximum items possible until we reach the selectAllLimit', async () => {
render(<WithPaginationAndSelectAllLimit />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(6);
Expand Down
10 changes: 5 additions & 5 deletions packages/ra-ui-materialui/src/list/List.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ describe('<List />', () => {
await screen.findByRole('button', { name: 'Select all' })
).toBeDefined();
});
it('should not be displayed if all item are manually selected', async () => {
it('should not be displayed if all items are manually selected', async () => {
render(
<Default
dataProvider={testDataProvider({
Expand Down Expand Up @@ -391,7 +391,7 @@ describe('<List />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if all item are selected with the "Select all" button', async () => {
it('should not be displayed if all items are selected with the "Select all" button', async () => {
render(<Default />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(11);
Expand All @@ -404,7 +404,7 @@ describe('<List />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if we reached the limit by a manual selection', async () => {
it('should not be displayed if the user reaches the limit by a manual selection', async () => {
render(
<SelectAllLimit
limit={2}
Expand Down Expand Up @@ -446,7 +446,7 @@ describe('<List />', () => {
screen.queryByRole('button', { name: 'Select all' })
).toBeNull();
});
it('should not be displayed if we reached the selectAllLimit by a click on the "Select all" button', async () => {
it('should not be displayed if the user reaches the selectAllLimit by a click on the "Select all" button', async () => {
render(<SelectAllLimit />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(11);
Expand All @@ -472,7 +472,7 @@ describe('<List />', () => {
fireEvent.click(screen.getByRole('button', { name: 'Select all' }));
await screen.findByText('13 items selected');
});
it('should select the maximum items possible until we reached the selectAllLimit', async () => {
it('should select the maximum items possible up to the selectAllLimit', async () => {
render(<SelectAllLimit />);
await waitFor(() => {
expect(screen.queryAllByRole('checkbox')).toHaveLength(11);
Expand Down

0 comments on commit 2f3ed8a

Please sign in to comment.