File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
cypress/integration/plugins/dashboards-assistant Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,28 @@ const testSuggestAD = (url) => {
122122
123123 // Check main UI elements are present
124124 cy . get ( '[data-test-subj="detectorNameTextInputFlyout"]' ) . should ( 'exist' ) ;
125+ cy . get ( '#add-anomaly-detector__title' ) . should (
126+ 'contain' ,
127+ 'Suggested anomaly detector'
128+ ) ;
129+ cy . get ( '[data-test-subj="detectionInterval"]' ) . should ( 'exist' ) ;
130+ cy . get ( '[data-test-subj="windowDelay"]' ) . should ( 'exist' ) ;
131+
132+ cy . get ( '[id="detectorDetailsAccordion"]' )
133+ . parent ( )
134+ . find ( '[data-test-subj="accordionTitleButton"]' )
135+ . click ( ) ;
136+
137+ // Test empty name validation
138+ cy . get ( '[data-test-subj="detectorNameTextInputFlyout"]' ) . clear ( ) ;
139+ cy . get ( '[data-test-subj="detectorNameTextInputFlyout"]' ) . blur ( ) ;
140+ cy . contains ( 'Detector name cannot be empty' ) . should ( 'be.visible' ) ;
141+
142+ // Test valid name
143+ cy . get ( '[data-test-subj="detectorNameTextInputFlyout"]' ) . type (
144+ 'test-detector-name' + Math . floor ( Math . random ( ) * 100 ) + 1
145+ ) ;
146+ cy . contains ( 'Detector name cannot be empty' ) . should ( 'not.exist' ) ;
125147 } ) ;
126148
127149 it ( 'should create detector successfully' , ( ) => {
You can’t perform that action at this time.
0 commit comments