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 23, 2024
1 parent 5b9eb7d commit 2857532
Show file tree
Hide file tree
Showing 4 changed files with 325 additions and 301 deletions.
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 2857532

Please sign in to comment.