Skip to content

Commit

Permalink
[ResponseOps][Cases] Fix edit tags flaky test (#186295)
Browse files Browse the repository at this point in the history
Fixes [#175655](#175655)

## Summary

The other tests already tested the edit button so I changed the scope to
look only for the `no tags` message.
  • Loading branch information
adcoelho authored Jun 18, 2024
1 parent ef91afd commit 8ad77f6
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ const defaultProps: EditTagsProps = {
tags: [],
};

// FLAKY: https://github.com/elastic/kibana/issues/175655
describe.skip('EditTags ', () => {
describe('EditTags ', () => {
let appMockRender: AppMockRenderer;

const sampleTags = ['coke', 'pepsi'];
Expand All @@ -43,18 +42,11 @@ describe.skip('EditTags ', () => {
appMockRender = createAppMockRenderer();
});

it('renders no tags, and then edit', async () => {
it('renders no tags message', async () => {
appMockRender.render(<EditTags {...defaultProps} />);

expect(await screen.findByTestId('no-tags')).toBeInTheDocument();

userEvent.click(await screen.findByTestId('tag-list-edit-button'));

await waitFor(() => {
expect(screen.queryByTestId('no-tags')).not.toBeInTheDocument();
});

expect(await screen.findByTestId('edit-tags')).toBeInTheDocument();
expect(await screen.findByTestId('tag-list-edit-button')).toBeInTheDocument();
});

it('edit tag from options on submit', async () => {
Expand Down

0 comments on commit 8ad77f6

Please sign in to comment.