Skip to content

Commit

Permalink
fix(test): Update broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lordrip committed Jul 22, 2024
1 parent fb6fcb0 commit 1ae688c
Show file tree
Hide file tree
Showing 5 changed files with 328 additions and 304 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('BeanReferenceField', () => {
expect(options).toHaveLength(0);

await act(async () => {
const toggleButton = screen.getByRole('button', { name: 'Menu toggle' });
const toggleButton = screen.getByRole('button', { name: 'Typeahead menu toggle' });
fireEvent.click(toggleButton);
});

Expand All @@ -120,7 +120,7 @@ describe('BeanReferenceField', () => {
});

await act(async () => {
const toggleButton = screen.getByRole('button', { name: 'Menu toggle' });
const toggleButton = screen.getByRole('button', { name: 'Typeahead menu toggle' });
fireEvent.click(toggleButton);
});

Expand Down Expand Up @@ -221,7 +221,7 @@ describe('BeanReferenceField', () => {
});

await act(async () => {
const toggleButton = screen.getByRole('button', { name: 'Menu toggle' });
const toggleButton = screen.getByRole('button', { name: 'Typeahead menu toggle' });
fireEvent.click(toggleButton);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('DataFormatEditor', () => {

it('should render', async () => {
render(<DataFormatEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand All @@ -59,7 +59,7 @@ describe('DataFormatEditor', () => {

it('should filter candidates with a text input', async () => {
render(<DataFormatEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand All @@ -75,7 +75,7 @@ describe('DataFormatEditor', () => {

it('should clear filter and close the dropdown with close button', async () => {
render(<DataFormatEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('LoadBalancerEditor', () => {

it('should render', async () => {
render(<LoadBalancerEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand All @@ -62,7 +62,7 @@ describe('LoadBalancerEditor', () => {

it('should filter candidates with a text input', async () => {
render(<LoadBalancerEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand All @@ -78,7 +78,7 @@ describe('LoadBalancerEditor', () => {

it('should clear filter and close the dropdown with close button', async () => {
render(<LoadBalancerEditor selectedNode={mockNode} />);
const buttons = screen.getAllByRole('button', { name: 'Menu toggle' });
const buttons = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(buttons[0]);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ describe('CanvasForm', () => {
</VisibleFlowsProvider>
</EntitiesContext.Provider>,
);
const button = screen.getAllByRole('button', { name: 'Menu toggle' });
const button = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(button[0]);
});
Expand Down Expand Up @@ -497,7 +497,7 @@ describe('CanvasForm', () => {
expect(camelRoute.from.steps[0].marshal!.avro).toBeUndefined();
expect(camelRoute.from.steps[0].marshal!.id).toEqual('modified');

const button = screen.getAllByRole('button', { name: 'Menu toggle' });
const button = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(button[0]);
});
Expand Down Expand Up @@ -546,7 +546,7 @@ describe('CanvasForm', () => {
</VisibleFlowsProvider>
</EntitiesContext.Provider>,
);
const button = screen.getAllByRole('button', { name: 'Menu toggle' });
const button = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(button[0]);
});
Expand Down Expand Up @@ -603,7 +603,7 @@ describe('CanvasForm', () => {
expect(camelRoute.from.steps[0].loadBalance!.weighted).toBeUndefined();
expect(camelRoute.from.steps[0].loadBalance!.id).toEqual('modified');

const button = screen.getAllByRole('button', { name: 'Menu toggle' });
const button = screen.getAllByRole('button', { name: 'Typeahead menu toggle' });
await act(async () => {
fireEvent.click(button[0]);
});
Expand Down
Loading

0 comments on commit 1ae688c

Please sign in to comment.