Skip to content

Commit

Permalink
Update groupings-table.test.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
FeimeiChen committed Oct 16, 2024
1 parent 3a4c518 commit 28649c5
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions ui/tests/components/table/groupings-table.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ describe('GroupingsTable', () => {
const user = userEvent.setup();

// Open column settings
await waitFor(async () => {
await user.click(screen.getByLabelText('column-settings-button'));
});
await waitFor(
async () => {
await user.click(screen.getByLabelText('column-settings-button'));
},
{ timeout: 2000 }
);

// Toggle Grouping Path Switch to true
const groupingPathSwitch = await screen.findByTestId('Grouping Path Switch');
Expand Down Expand Up @@ -122,9 +125,12 @@ describe('GroupingsTable', () => {
const user = userEvent.setup();

const toggleColumnVisibility = async (columnTestId: string, isVisible: boolean) => {
await waitFor(async () => {
await user.click(button);
});
await waitFor(
async () => {
await user.click(button);
},
{ timeout: 2000 }
);
fireEvent.click(screen.getByTestId(columnTestId));

// Check getByText('Description') or getByText('Grouping Path') to be in document
Expand Down

0 comments on commit 28649c5

Please sign in to comment.