@@ -30,9 +30,6 @@ describe('Form Designer', () => {
3030
3131 } ) ;
3232 it ( 'Form Submission and Updation' , ( ) => {
33-
34- cy . viewport ( 1000 , 1100 ) ;
35- cy . waitForLoad ( ) ;
3633 cy . viewport ( 1000 , 1800 ) ;
3734 cy . waitForLoad ( ) ;
3835 cy . get ( 'button' ) . contains ( 'Basic Fields' ) . click ( ) ;
@@ -45,12 +42,12 @@ describe('Form Designer', () => {
4542 . trigger ( 'mouseup' , { force : true } ) ;
4643 cy . get ( 'button' ) . contains ( 'Save' ) . click ( ) ;
4744 } ) ;
48- cy . wait ( 4000 ) ;
45+ cy . wait ( 2000 ) ;
4946 // Form saving
5047 let savedButton = cy . get ( '[data-cy=saveButton]' ) ;
5148 expect ( savedButton ) . to . not . be . null ;
5249 savedButton . should ( 'be.visible' ) . trigger ( 'click' ) ;
53- cy . wait ( 4000 ) ;
50+ cy . wait ( 2000 ) ;
5451 // Filter the newly created form
5552 cy . location ( 'search' ) . then ( search => {
5653
@@ -68,7 +65,7 @@ describe('Form Designer', () => {
6865 cy . contains ( 'Continue' ) . trigger ( 'click' ) ;
6966 //Submit the form
7067 cy . visit ( `/${ depEnv } /form/submit?f=${ arrayValues [ 0 ] } ` ) ;
71- cy . wait ( 4000 ) ;
68+ cy . wait ( 2000 ) ;
7269 cy . get ( 'button' ) . contains ( 'Submit' ) . should ( 'be.visible' ) ;
7370 cy . waitForLoad ( ) ;
7471 cy . contains ( 'Text Field' ) . click ( ) ;
@@ -77,31 +74,29 @@ describe('Form Designer', () => {
7774 cy . get ( 'button' ) . contains ( 'Submit' ) . click ( ) ;
7875 cy . waitForLoad ( ) ;
7976 cy . get ( 'button' ) . contains ( 'Submit' ) . click ( ) ;
80- cy . wait ( 4000 ) ;
77+ cy . wait ( 2000 ) ;
8178 cy . get ( 'label' ) . contains ( 'Text Field' ) . should ( 'be.visible' ) ;
8279 cy . get ( 'label' ) . contains ( 'Text Field' ) . should ( 'be.visible' ) ;
8380 cy . location ( 'pathname' ) . should ( 'eq' , `/${ depEnv } /form/success` ) ;
8481 cy . contains ( 'h1' , 'Your form has been submitted successfully' ) ;
85- cy . wait ( 4000 ) ;
82+ cy . wait ( 2000 ) ;
8683 //Update submission
8784 cy . visit ( `/${ depEnv } /form/manage?f=${ arrayValues [ 0 ] } ` ) ;
88- cy . wait ( 4000 ) ;
85+ cy . wait ( 2000 ) ;
8986 cy . visit ( `/${ depEnv } /form/submit?f=${ arrayValues [ 0 ] } ` ) ;
90- cy . wait ( 4000 ) ;
87+ cy . wait ( 2000 ) ;
9188 cy . get ( 'button' ) . contains ( 'Submit' ) . should ( 'be.visible' ) ;
9289 cy . contains ( 'Text Field' ) . click ( ) ;
9390 cy . contains ( 'Text Field' ) . type ( 'Smith' ) ;
9491 cy . get ( 'button' ) . contains ( 'Submit' ) . click ( ) ;
9592 cy . waitForLoad ( ) ;
9693 cy . get ( 'button' ) . contains ( 'Submit' ) . click ( ) ;
97- //cy.get('[data-test="continue-btn-continue"]').click();
9894 cy . get ( 'label' ) . contains ( 'Text Field' ) . should ( 'be.visible' ) ;
99- //cy.get('label').contains('Applying for self').should('be.visible');
10095 cy . location ( 'pathname' ) . should ( 'eq' , `/${ depEnv } /form/success` ) ;
10196 cy . contains ( 'h1' , 'Your form has been submitted successfully' ) ;
102- cy . wait ( 4000 ) ;
97+ cy . wait ( 2000 ) ;
10398 cy . visit ( `/${ depEnv } /form/manage?f=${ arrayValues [ 0 ] } ` ) ;
104- cy . wait ( 4000 ) ;
99+ cy . wait ( 2000 ) ;
105100 cy . get ( '.mdi-list-box-outline' ) . click ( ) ;
106101 cy . waitForLoad ( ) ;
107102 //Verify pagination for submission
@@ -116,13 +111,13 @@ describe('Form Designer', () => {
116111 cy . get ( 'button[title="Delete Submission"]' ) . should ( 'exist' ) ;
117112 //view submission
118113 cy . get ( ':nth-child(1) > :nth-child(7) > a > .v-btn' ) . click ( ) ;
119- cy . wait ( 4000 ) ;
114+ cy . wait ( 2000 ) ;
120115 } ) ;
121116
122117 } ) ;
123118 it ( 'Submission status Assignment' , ( ) => {
124119 cy . viewport ( 1000 , 1100 ) ;
125- cy . wait ( 4000 ) ;
120+ cy . wait ( 2000 ) ;
126121 //Assign status submission
127122 cy . get ( '.status-heading > .mdi-chevron-right' ) . click ( ) ;
128123 cy . get ( '[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__field > .v-field__input' ) . click ( ) ;
@@ -132,7 +127,7 @@ describe('Form Designer', () => {
132127 cy . get ( '[data-test="showAssigneeList"] > .v-input__control > .v-field > .v-field__field > .v-field__input' ) . type ( 'ch' ) ;
133128 cy . get ( 'div' ) . contains ( 'CHEFS Testing' ) . click ( ) ;
134129 cy . get ( '[data-test="updateStatusToNew"] > .v-btn__content > span' ) . click ( ) ;
135- cy . wait ( 4000 ) ;
130+ cy . wait ( 2000 ) ;
136131 cy . get ( '.mdi-list-box-outline' ) . click ( ) ;
137132 cy . get ( 'input[type="checkbox"]' ) . then ( $el => {
138133 const rem1 = $el [ 2 ] ; ////Assigned to me checkbox
@@ -148,7 +143,7 @@ describe('Form Designer', () => {
148143 cy . get ( ':nth-child(1) > :nth-child(7) > a > .v-btn' ) . click ( ) ;
149144 cy . wait ( 2000 ) ;
150145 } ) ;
151- //Assign remaing statuses
146+ //Assign remaining statuses
152147 cy . get ( '.status-heading > .mdi-chevron-right' ) . click ( ) ;
153148 cy . get ( '[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__field > .v-field__input' ) . click ( ) ;
154149 cy . contains ( 'REVISING' ) . click ( ) ;
@@ -157,7 +152,7 @@ describe('Form Designer', () => {
157152 cy . get ( 'textarea[rows="1"]' ) . type ( 'some comments' ) ;
158153 cy . get ( 'button' ) . contains ( 'REVISE' ) . click ( ) ;
159154 cy . get ( ':nth-child(1) > .v-checkbox > .v-input__control > .v-selection-control > .v-label' ) . click ( ) ;
160- cy . wait ( 4000 ) ;
155+ cy . wait ( 2000 ) ;
161156 //Verify Edit submission button is disabled
162157 cy . get ( 'button[title="Edit This Submission"]' ) . should ( 'be.disabled' ) ;
163158 //Verify Submission edit users history
@@ -202,7 +197,7 @@ describe('Form Designer', () => {
202197 cy . get ( '.v-data-table__tbody > :nth-child(2) > :nth-child(2)' ) . should ( 'not.exist' ) ;
203198 //Delete form after test run
204199 cy . visit ( `/${ depEnv } /form/manage?f=${ arr [ 1 ] } ` ) ;
205- cy . wait ( 4000 ) ;
200+ cy . wait ( 2000 ) ;
206201 cy . get ( '.mdi-delete' ) . click ( ) ;
207202 cy . get ( '[data-test="continue-btn-continue"]' ) . click ( ) ;
208203 cy . get ( '#logoutButton > .v-btn__content > span' ) . click ( ) ;
@@ -211,4 +206,4 @@ describe('Form Designer', () => {
211206
212207 } ) ;
213208
214- } ) ;
209+ } ) ;
0 commit comments