2424 * permissions and limitations under the License.
2525 */
2626
27+ describe ( 'Adding sample data' , ( ) => {
28+ it ( 'Adds sample data' , ( ) => {
29+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/home#/tutorial_directory/sampleData` ) ;
30+ cy . get ( 'div[data-test-subj="sampleDataSetCardflights"]' ) . contains ( / ( A d d | V i e w ) d a t a / ) . click ( ) ;
31+ cy . wait ( 3000 ) ;
32+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/home#/tutorial_directory/sampleData` ) ;
33+ cy . get ( 'div[data-test-subj="sampleDataSetCardecommerce"]' ) . contains ( / ( A d d | V i e w ) d a t a / ) . click ( ) ;
34+ cy . wait ( 3000 ) ;
35+ cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/home#/tutorial_directory/sampleData` ) ;
36+ cy . get ( 'div[data-test-subj="sampleDataSetCardlogs"]' ) . contains ( / ( A d d | V i e w ) d a t a / ) . click ( ) ;
37+ cy . wait ( 3000 ) ;
38+ } ) ;
39+ } ) ;
40+
2741describe ( 'Cypress' , ( ) => {
2842 it ( 'Visits Reporting homepage' , ( ) => {
2943 cy . visit ( `${ Cypress . env ( 'opensearchDashboards' ) } /app/reports-dashboards#/` ) ;
@@ -59,10 +73,20 @@ describe('Cypress', () => {
5973 cy . get ( '#reportSettingsDescription' ) . type ( 'Description for cypress test' ) ;
6074
6175 // select a report source
62- cy . get ( '.euiComboBox' ) . click ( { force : true } ) ;
76+ cy . get ( '[data-test-subj="comboBoxInput"]' ) . eq ( 0 ) . click ( { force : true } ) ;
77+
78+ // select drop-down option in report source list
79+ cy . contains ( '[Logs] Web Traffic' ) . click ( ) ;
80+
81+ cy . wait ( 500 ) ;
6382
6483 // create an on-demand report definition
6584 cy . get ( '#createNewReportDefinition' ) . click ( { force : true } ) ;
85+
86+ cy . wait ( 12500 ) ;
87+
88+ // check that re-direct to
89+ cy . get ( '#reportDefinitionDetailsLink' ) . should ( 'exist' ) ;
6690 } ) ;
6791
6892 it ( 'Create a new scheduled report definition' , ( ) => {
@@ -80,6 +104,14 @@ describe('Cypress', () => {
80104 // enter a report description
81105 cy . get ( '#reportSettingsDescription' ) . type ( 'Description for cypress test' ) ;
82106
107+ // select a report source
108+ cy . get ( '[data-test-subj="comboBoxInput"]' ) . eq ( 0 ) . click ( { force : true } ) ;
109+
110+ // select drop-down option in report source list
111+ cy . contains ( '[Logs] Web Traffic' ) . click ( ) ;
112+
113+ cy . wait ( 500 ) ;
114+
83115 // set report trigger to Schedule option
84116 cy . get ( '[type="radio"]' ) . check ( { force : true } ) ;
85117
@@ -88,5 +120,10 @@ describe('Cypress', () => {
88120
89121 // create scheduled report definition
90122 cy . get ( '#createNewReportDefinition' ) . click ( { force : true } ) ;
123+
124+ cy . wait ( 12500 ) ;
125+
126+ // check that re-direct to
127+ cy . get ( '#reportDefinitionDetailsLink' ) . should ( 'exist' ) ;
91128 } ) ;
92129} ) ;
0 commit comments