Skip to content

Commit

Permalink
Fix flaky policy form test (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
joncombe authored Nov 29, 2024
1 parent 1f3f21c commit 7c47eaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- Fix flaky PolicyForm test.

## 2024-11-26 - 0.19.0

- Updated the schema tree to be more efficient and have nested columns.
Expand Down
6 changes: 4 additions & 2 deletions src/routes/Automation/views/PolicyForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,13 @@ describe('The "PolicyForm" component', () => {
const { user } = setupAdd();
await waitForFormRender();

const tablesTree = screen.getByTestId('tables-tree');
const tablesTree = await screen.getByTestId('tables-tree');
await checkTreeItem(tablesTree, 'policy_tests.parted_table', user);

// Select should not be disabled
expect(screen.getByName('select-column-name')).not.toBeDisabled();
await waitFor(() => {
expect(screen.getByName('select-column-name')).not.toBeDisabled();
});
// Warning should not be present
expect(screen.queryByTestId('column-warning')).not.toBeInTheDocument();
// Elements should be in the select
Expand Down

0 comments on commit 7c47eaa

Please sign in to comment.