From 05f56dd5aad01129597ebc4a990403b4e62fea83 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Tue, 6 Apr 2021 12:13:55 -0400 Subject: [PATCH] [Uptime] Simplift rtl test (#96296) (#96309) Co-authored-by: Shahzad --- .../shared/exploratory_view/exploratory_view.test.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx index 7e99874f557b3..b90d5115bc41e 100644 --- a/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx +++ b/x-pack/plugins/observability/public/components/shared/exploratory_view/exploratory_view.test.tsx @@ -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'; @@ -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));