Skip to content

Commit

Permalink
remove unnecesssary async helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
eokoneyo committed Dec 11, 2024
1 parent 514dab6 commit fe1bfe5
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByText('Change defaults'));

await waitFor(() => Promise.resolve(null));

fireEvent.change(renderResult.getByDisplayValue('/var/log/nginx/access.log*'), {
target: { value: '' },
});
Expand All @@ -320,8 +318,6 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByRole('switch'));

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getByText('Save integration').closest('button')!);

await waitFor(() => {
Expand Down Expand Up @@ -356,8 +352,6 @@ describe('edit package policy page', () => {
});
fireEvent.click(renderResult.getByRole('switch'));

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getByText('Save integration').closest('button')!);

await waitFor(() => {
Expand All @@ -384,8 +378,6 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByRole('switch'));

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getByText('Save integration').closest('button')!);

await waitFor(() => {
Expand Down Expand Up @@ -515,8 +507,6 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByRole('switch'));

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getByText('Save integration').closest('button')!);

await waitFor(() => expect(sendUpdatePackagePolicy).toHaveBeenCalled());
Expand Down Expand Up @@ -557,12 +547,8 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByTestId('createNewAgentPolicyButton'));

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getByText(/Save integration/).closest('button')!);

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getAllByText(/Save and deploy changes/)[1].closest('button')!);

await waitFor(() => {
Expand Down Expand Up @@ -628,8 +614,6 @@ describe('edit package policy page', () => {

fireEvent.click(renderResult.getByText(/Save integration/).closest('button')!);

await waitFor(() => Promise.resolve(null));

fireEvent.click(renderResult.getAllByText(/Save and deploy changes/)[1].closest('button')!);

await waitFor(() =>
Expand Down

0 comments on commit fe1bfe5

Please sign in to comment.