@@ -217,9 +217,9 @@ describe('Testing a panel', () => {
217
217
} ) ;
218
218
219
219
it ( 'Add existing visualization #1' , ( ) => {
220
- cy . get ( '.euiButton__text' ) . contains ( 'Add visualization ' ) . click ( ) ;
220
+ cy . get ( '.euiButton__text' ) . contains ( 'Add Visualization ' ) . click ( ) ;
221
221
cy . wait ( panelDelay ) ;
222
- cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Select existing visualization ' ) . click ( ) ;
222
+ cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Select Existing Visualization ' ) . click ( ) ;
223
223
cy . wait ( panelDelay ) ;
224
224
cy . get ( 'select' ) . select ( PPL_VISUALIZATIONS_NAMES [ 0 ] ) ;
225
225
cy . get ( 'button[aria-label="refreshPreview"]' ) . click ( ) ;
@@ -231,9 +231,9 @@ describe('Testing a panel', () => {
231
231
} ) ;
232
232
233
233
it ( 'Add existing visualization #2' , ( ) => {
234
- cy . get ( '.euiButton__text' ) . contains ( 'Add visualization ' ) . click ( ) ;
234
+ cy . get ( '.euiButton__text' ) . contains ( 'Add Visualization ' ) . click ( ) ;
235
235
cy . wait ( panelDelay ) ;
236
- cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Select existing visualization ' ) . click ( ) ;
236
+ cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Select Existing Visualization ' ) . click ( ) ;
237
237
cy . wait ( panelDelay ) ;
238
238
cy . get ( 'select' ) . select ( PPL_VISUALIZATIONS_NAMES [ 1 ] ) ;
239
239
cy . get ( 'button[aria-label="refreshPreview"]' ) . click ( ) ;
@@ -245,7 +245,7 @@ describe('Testing a panel', () => {
245
245
} ) ;
246
246
247
247
it ( 'Add ppl filter to panel' , ( ) => {
248
- cy . get ( '[data-test-subj="searchAutocompleteTextArea"]' ) . type ( "where Carrier = 'OpenSearch-Air'| where Dest = 'Munich Airport'" , { delay : TYPING_DELAY } ) ;
248
+ cy . get ( '[data-test-subj="searchAutocompleteTextArea"]' ) . type ( "{selectall}{backspace} where Carrier = 'OpenSearch-Air'| where Dest = 'Munich Airport'" , { delay : TYPING_DELAY } ) ;
249
249
cy . get ( '.euiButton__text' ) . contains ( 'Refresh' ) . click ( ) ;
250
250
cy . wait ( panelDelay * 3 ) ;
251
251
cy . get ( '.xtick' ) . should ( 'contain' , 'OpenSearch-Air' ) ;
@@ -331,9 +331,9 @@ describe('Testing a panel', () => {
331
331
} ) ;
332
332
333
333
it ( 'Create new visualization and add to panel' , ( ) => {
334
- cy . get ( '.euiButton__text' ) . contains ( 'Add visualization ' ) . click ( ) ;
334
+ cy . get ( '.euiButton__text' ) . contains ( 'Add Visualization ' ) . click ( ) ;
335
335
cy . wait ( panelDelay ) ;
336
- cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Create new visualization ' ) . click ( ) ;
336
+ cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Create New Visualization ' ) . click ( ) ;
337
337
cy . wait ( panelDelay * 3 ) ;
338
338
cy . url ( ) . should ( 'match' , new RegExp ( '(.*)#/event_analytics/explorer' ) ) ;
339
339
cy . get ( '[id^=autocomplete-textarea]' ) . type ( PPL_VISUALIZATIONS [ 2 ] ) ;
@@ -382,6 +382,7 @@ describe('Testing a panel', () => {
382
382
383
383
describe ( 'Add samples and clean up all test data' , ( ) => {
384
384
it ( 'Add sample data' , ( ) => {
385
+ cy . route2 ( '**/api/observability/operational_panels/panels/addSamplePanels' ) . as ( 'samplePanels' ) ;
385
386
moveToPanelHome ( ) ;
386
387
cy . get ( '.euiButton__text' ) . contains ( 'Actions' ) . click ( ) ;
387
388
cy . wait ( panelDelay ) ;
@@ -392,9 +393,7 @@ describe('Add samples and clean up all test data', () => {
392
393
. should ( 'exist' ) ;
393
394
cy . wait ( panelDelay ) ;
394
395
cy . get ( '.euiButton__text' ) . contains ( 'Yes' ) . click ( ) ;
395
- cy . wait ( panelDelay * 5 ) ;
396
- cy . get ( '.euiTableCellContent' ) . contains ( SAMPLE_PANEL ) . should ( 'exist' ) ;
397
- cy . wait ( panelDelay ) ;
396
+ cy . wait ( '@samplePanels' ) . its ( 'response.statusCode' ) . should ( 'eq' , 200 ) ;
398
397
} ) ;
399
398
400
399
it ( 'Validate sample data' , ( ) => {
0 commit comments