@@ -21,17 +21,26 @@ import { SAMPLE_PANEL } from '../utils/panel_constants';
21
21
import { skipOn } from '@cypress/skip-test' ;
22
22
23
23
const moveToEventsHome = ( ) => {
24
- cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/event_analytics /` ) ;
24
+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-logs# /` ) ;
25
25
cy . wait ( delay * 3 ) ;
26
26
} ;
27
27
28
28
const moveToPanelHome = ( ) => {
29
- cy . visit (
30
- `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/operational_panels/`
31
- ) ;
29
+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/` ) ;
32
30
cy . wait ( delay * 3 ) ;
33
31
} ;
34
32
33
+ const moveToTestNotebook = ( ) => {
34
+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-notebooks#/` , {
35
+ timeout : 6000 ,
36
+ } ) ;
37
+ cy . get ( '.euiTableCellContent' )
38
+ . contains ( TEST_NOTEBOOK , {
39
+ timeout : 6000 ,
40
+ } )
41
+ . click ( ) ;
42
+ } ;
43
+
35
44
describe ( 'Adding sample data and visualization' , ( ) => {
36
45
it ( 'Adds sample flights data for visualization paragraph' , ( ) => {
37
46
cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/home#/tutorial_directory/sampleData` ) ;
@@ -41,28 +50,29 @@ describe('Adding sample data and visualization', () => {
41
50
} ) ;
42
51
43
52
it ( 'Add sample observability data' , ( ) => {
44
- moveToPanelHome ( ) ;
45
- cy . get ( '.euiButton__text' ) . contains ( 'Actions ') . trigger ( 'mouseover' ) . click ( ) ;
53
+ moveToEventsHome ( ) ;
54
+ cy . get ( 'button[data-test-subj="eventHomeAction"] ' ) . trigger ( 'mouseover' ) . click ( ) ;
46
55
cy . wait ( 100 ) ;
47
- cy . get ( '.euiContextMenuItem__text' ) . contains ( 'Add samples ') . trigger ( 'mouseover' ) . click ( ) ;
56
+ cy . get ( 'button[data-test-subj="eventHomeAction__addSamples"] ' ) . trigger ( 'mouseover' ) . click ( ) ;
48
57
cy . wait ( 100 * 3 ) ;
49
58
cy . get ( '.euiModalHeader__title[data-test-subj="confirmModalTitleText"]' )
50
59
. contains ( 'Add samples' )
51
60
. should ( 'exist' ) ;
52
61
cy . wait ( 100 ) ;
53
- cy . get ( '.euiButton__text' ) . contains ( 'Yes ') . trigger ( 'mouseover' ) . click ( ) ;
62
+ cy . get ( 'button[data-test-subj="confirmModalConfirmButton"] ' ) . trigger ( 'mouseover' ) . click ( ) ;
54
63
cy . wait ( 100 * 5 ) ;
55
64
cy . route2 ( 'POST' , '/addSamplePanels' ) . as ( 'addSamples' ) ;
56
65
cy . wait ( '@addSamples' ) . then ( ( ) => {
57
- cy . get ( '.euiTableCellContent ' ) . contains ( SAMPLE_PANEL ) . should ( 'exist ' ) ;
66
+ cy . get ( '.euiToastHeader__title ' ) . should ( 'contain' , 'successfully ') ;
58
67
} ) ;
59
68
cy . wait ( 100 ) ;
60
69
} ) ;
61
70
} ) ;
62
71
63
72
describe ( 'Testing notebooks table' , ( ) => {
64
73
beforeEach ( ( ) => {
65
- cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/notebooks` ) ;
74
+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-notebooks#/` ) ;
75
+ cy . wait ( delay ) ;
66
76
} ) ;
67
77
68
78
it ( 'Notebooks table empty state' , ( ) => {
@@ -178,7 +188,7 @@ describe('Testing notebooks table', () => {
178
188
179
189
describe ( 'Test reporting integration if plugin installed' , ( ) => {
180
190
beforeEach ( ( ) => {
181
- cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/notebooks ` ) ;
191
+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-notebooks#/ ` ) ;
182
192
cy . get ( '.euiTableCellContent' ) . contains ( TEST_NOTEBOOK ) . click ( ) ;
183
193
cy . wait ( delay * 3 ) ;
184
194
cy . get ( 'body' ) . then ( ( $body ) => {
@@ -222,8 +232,7 @@ describe('Test reporting integration if plugin installed', () => {
222
232
223
233
describe ( 'Testing paragraphs' , ( ) => {
224
234
beforeEach ( ( ) => {
225
- cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/observability-dashboards#/notebooks` ) ;
226
- cy . get ( '.euiTableCellContent' ) . contains ( TEST_NOTEBOOK ) . click ( ) ;
235
+ moveToTestNotebook ( ) ;
227
236
} ) ;
228
237
229
238
it ( 'Goes into a notebook and creates paragraphs' , ( ) => {
@@ -550,7 +559,5 @@ describe('clean up all test data', () => {
550
559
} ) ;
551
560
cy . get ( 'button.euiButton--danger' ) . should ( 'not.be.disabled' ) ;
552
561
cy . get ( '.euiButton__text' ) . contains ( 'Delete' ) . trigger ( 'mouseover' ) . click ( ) ;
553
-
554
- cy . get ( '.euiTextAlign' ) . contains ( 'No Operational Panels' ) . should ( 'exist' ) ;
555
562
} ) ;
556
563
} ) ;
0 commit comments