Skip to content

Commit

Permalink
[Uptime] Simplift rtl test (elastic#96296) (elastic#96309)
Browse files Browse the repository at this point in the history
Co-authored-by: Shahzad <[email protected]>
  • Loading branch information
kibanamachine and shahzad31 authored Apr 6, 2021
1 parent fc2b936 commit 05f56dd
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

import React from 'react';
import { within } from '@testing-library/react';
import { fireEvent, screen, waitFor } from '@testing-library/dom';
import { render, mockUrlStorage, mockCore } from './rtl_helpers';
import { ExploratoryView } from './exploratory_view';
Expand Down Expand Up @@ -56,10 +55,10 @@ describe('ExploratoryView', () => {

await waitFor(() => {
screen.getByText(/open in lens/i);
});

await waitFor(() => {
screen.getByText(/select a data type to start building a series\./i);
screen.getByRole('table', { name: /this table contains 1 rows\./i });
const button = screen.getByRole('button', { name: /add/i });
within(button).getByText(/add/i);
});

await fireEvent.click(screen.getByText(/cancel/i));
Expand Down

0 comments on commit 05f56dd

Please sign in to comment.