Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/forms 1371-Adding status to submission #1491

Open
wants to merge 187 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
45a3eb0
#FORMS-974
nimya-aot Jan 29, 2024
0aaf2ae
#974 updates
nimya-aot Jan 29, 2024
bc49c44
#980 modification to cypress config
nimya-aot Feb 5, 2024
e7bc4c1
FORMS-980
nimya-aot Feb 5, 2024
0764439
#992
nimya-aot Feb 14, 2024
1887ff4
#992 Fix cypress scripts
nimya-aot Feb 21, 2024
82b559c
#1011 Form design page
nimya-aot Feb 27, 2024
767b618
#1011 test scripts
nimya-aot Mar 8, 2024
f2e43ff
#1023 cypress scripts
nimya-aot Mar 12, 2024
42f900f
#1023 advanced data components
nimya-aot Mar 14, 2024
48d23a0
#1023 Updated scripts
nimya-aot Mar 14, 2024
0525ba6
#1023 updation
nimya-aot Mar 14, 2024
ebdc467
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Mar 15, 2024
4c49d07
Updated json file
nimya-aot Mar 15, 2024
800b1a6
Merge branch 'test/forms-1011' into test/forms-1011
nimya-aot Mar 15, 2024
fb16211
Test/forms (#1011)(#1023) (#1307)
nimya-aot Mar 15, 2024
9db7c30
#1059 workflow file for cypress
nimya-aot Mar 21, 2024
a4efc8d
Merge branch 'main' into test/forms-1011
nimya-aot Mar 21, 2024
d1edf09
#1059 updated the base url
nimya-aot Mar 21, 2024
c2afaac
#1059 updated workflow
nimya-aot Mar 21, 2024
48e978a
Updated node version
nimya-aot Mar 21, 2024
5194f92
updated
nimya-aot Mar 21, 2024
cb9b031
updated
nimya-aot Mar 21, 2024
94a2b78
Updation
nimya-aot Mar 21, 2024
c0ab7bb
updated file
nimya-aot Mar 22, 2024
f8a6f0c
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
467d287
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
24e72a6
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
c1274ef
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
a5d8fcb
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
1e98c86
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
e7793ce
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
bfb8e8e
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
bf21230
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
67203d7
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
9a10207
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
1633263
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
f0321c0
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
f2bd165
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
8ff0d6c
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
97e55aa
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
e0970a2
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
d76e365
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
e516d31
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
32cd53f
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
bab3bb2
updated package file
nimya-aot Mar 22, 2024
6c5cd5f
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Mar 22, 2024
965095d
Update cypress-ci.yaml
nimya-aot Mar 22, 2024
53dbe88
Updated config file
nimya-aot Mar 22, 2024
53ae8d2
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Mar 22, 2024
7e7e9f5
Update cypress-ci.yaml
nimya-aot Mar 25, 2024
d901c57
#1059 updated package
nimya-aot Mar 25, 2024
eabc3db
Merge branch 'bcgov:main' into master
nimya-aot Mar 25, 2024
a9e42d7
Merge pull request #1 from nimya-aot/test/cypress-yaml
nimya-aot Mar 25, 2024
328664e
Merge branch 'main' into test/forms-1011
jasonchung1871 Mar 27, 2024
0b61fd8
Merge branch 'main' into test/forms-1011
nimya-aot Mar 28, 2024
111ea6e
#1060 scripts for Advanced fields and BC Gov components
nimya-aot Apr 8, 2024
7794257
Merge branch 'main' into test/forms-1011
nimya-aot Apr 10, 2024
7f7ecad
Fixing review comments
nimya-aot Apr 10, 2024
e893239
Merge branch 'test/forms-1011' of https://github.com/nimya-aot/common…
nimya-aot Apr 10, 2024
c14950f
Updated changes
nimya-aot Apr 10, 2024
9dd444c
# Updated with PR comments
nimya-aot Apr 17, 2024
11784b8
Merge branch 'bcgov:main' into master
nimya-aot Apr 17, 2024
5c1f027
Merge branch 'test/forms-1011' into test/forms-1011
nimya-aot Apr 17, 2024
01d0412
updated
nimya-aot Apr 17, 2024
2574662
Merge branch 'test/forms-1011' of https://github.com/nimya-aot/common…
nimya-aot Apr 17, 2024
6f9ffd3
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Apr 17, 2024
202f3b7
Merge branch 'test/forms-1011'
nimya-aot Apr 17, 2024
bc987af
Update form-design-basicfields.cy.js
nimya-aot Apr 17, 2024
5288d36
Update cypress-ci.yaml
nimya-aot Apr 18, 2024
b021253
Update cypress-ci.yaml
nimya-aot Apr 19, 2024
cf748dd
Update cypress-ci.yaml
nimya-aot Apr 19, 2024
14060fe
Update cypress-ci.yaml
nimya-aot Apr 19, 2024
662abd9
Update cypress-ci.yaml
nimya-aot Apr 19, 2024
c850c05
Update cypress-ci.yaml
nimya-aot Apr 19, 2024
9a1c396
Update cypress-ci.yaml
nimya-aot Apr 22, 2024
9cd4bff
Modifies test scripts
nimya-aot Apr 24, 2024
3c10e56
Merge branch 'test/forms-1011'
nimya-aot Apr 24, 2024
2f5a442
Updated files
nimya-aot Apr 24, 2024
5fa1f8c
Fixed errors during CI/CD Run
nimya-aot Apr 26, 2024
991529f
Updated browser type
nimya-aot Apr 26, 2024
ca5305b
Updated Simple BC address component
nimya-aot Apr 26, 2024
2dcd44e
Updated
nimya-aot Apr 26, 2024
0599cb1
Fields updated
nimya-aot Apr 26, 2024
ee4fa8b
Test script changed
nimya-aot Apr 26, 2024
86d2cd1
Updated
nimya-aot Apr 26, 2024
2afe8ea
Updated fields
nimya-aot Apr 26, 2024
225dcf0
Updated env variable
nimya-aot Apr 29, 2024
e948c70
Update form-design-basicfields.cy.js
nimya-aot Apr 29, 2024
3cd601f
Updated
nimya-aot Apr 30, 2024
eda1fef
Update cypress-ci.yaml
nimya-aot Apr 30, 2024
8553dd5
Updated email input
nimya-aot Apr 30, 2024
81403c6
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Apr 30, 2024
5a79458
screenshots
nimya-aot Apr 30, 2024
084e957
Updated path
nimya-aot Apr 30, 2024
6e01b00
Update cypress-ci.yaml
nimya-aot Apr 30, 2024
43c0991
Update cypress-ci.yaml
nimya-aot May 1, 2024
ad31da3
Updated version on workflow
nimya-aot May 1, 2024
5a6d5d3
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot May 1, 2024
12f6455
Fix to failed tests
nimya-aot May 6, 2024
d8a1790
Fix to BC address component
nimya-aot May 6, 2024
810343e
Updated the component
nimya-aot May 6, 2024
5246535
Changed button element
nimya-aot May 6, 2024
34468a4
Fixed BC components
nimya-aot May 6, 2024
5f7aaca
Modified submission
nimya-aot May 7, 2024
e52eea3
Modified components
nimya-aot May 7, 2024
c63252f
Updated attribute
nimya-aot May 7, 2024
9f18837
Updated
nimya-aot May 7, 2024
b99764c
Changed simpleBC address component
nimya-aot May 7, 2024
a9a9d03
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot May 8, 2024
714f486
Update package.json
nimya-aot May 8, 2024
9bdff1b
Update package-lock.json
nimya-aot May 8, 2024
2093d36
Merge branch 'bcgov:main' into master
nimya-aot May 8, 2024
a2b2a07
Test scripts
nimya-aot May 13, 2024
9efa258
Updated
nimya-aot May 14, 2024
3047a90
Pushed the changes
nimya-aot May 22, 2024
dcff9e1
Update cypress-ci.yaml
nimya-aot May 23, 2024
cea818f
Update cypress-ci.yaml
nimya-aot May 23, 2024
8c7584c
Update cypress-ci.yaml
nimya-aot May 23, 2024
2a3d082
Update cypress-ci.yaml
nimya-aot May 23, 2024
b027fec
Update cypress-ci.yaml
nimya-aot May 23, 2024
d166680
Update cypress-ci.yaml
nimya-aot May 23, 2024
9d7df97
Update cypress-ci.yaml
nimya-aot May 24, 2024
64d62cd
Update cypress-ci.yaml
nimya-aot May 24, 2024
826fd8e
Update cypress-ci.yaml
nimya-aot May 24, 2024
7f3d0e4
Update cypress-ci.yaml
nimya-aot May 24, 2024
f5ba964
Update cypress-ci.yaml
nimya-aot May 24, 2024
67be59c
Update cypress-ci.yaml
nimya-aot May 24, 2024
a2b6cb0
Update cypress-ci.yaml
nimya-aot May 24, 2024
419964c
Update cypress-ci.yaml
nimya-aot May 24, 2024
5379fef
Update cypress-ci.yaml
nimya-aot May 24, 2024
d08deb8
Update cypress-ci.yaml
nimya-aot May 24, 2024
7ef8a6d
Update cypress-ci.yaml
nimya-aot May 24, 2024
24b7dea
Update cypress-ci.yaml
nimya-aot May 24, 2024
96230a5
Update cypress-ci.yaml
nimya-aot May 25, 2024
4e02a7c
Update cypress-ci.yaml
nimya-aot May 25, 2024
ce9c683
Env change
nimya-aot May 25, 2024
c3a09d1
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot May 25, 2024
7a920a2
Update cypress-ci.yaml
nimya-aot May 25, 2024
9bafc29
Update cypress-ci.yaml
nimya-aot May 25, 2024
be71bf1
Update cypress-ci.yaml
nimya-aot May 25, 2024
e46c3d7
Update cypress-ci.yaml
nimya-aot May 25, 2024
dfb27d1
Update cypress-ci.yaml
nimya-aot May 25, 2024
668ad0b
Update cypress-ci.yaml
nimya-aot May 25, 2024
de3c63e
Update cypress-ci.yaml
nimya-aot May 25, 2024
b382086
Update cypress-ci.yaml
nimya-aot May 26, 2024
ac74dfc
Update cypress-ci.yaml
nimya-aot May 26, 2024
c4eb94c
Update cypress-ci.yaml
nimya-aot May 26, 2024
bd92785
Update cypress-ci.yaml
nimya-aot May 26, 2024
68eb79b
Update cypress-ci.yaml
nimya-aot May 26, 2024
a84e63a
Update cypress-ci.yaml
nimya-aot May 26, 2024
ed27587
Update cypress-ci.yaml
nimya-aot May 26, 2024
7a92745
Updated
nimya-aot May 26, 2024
cf90a7d
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot May 26, 2024
e95b144
Updated to take default env variable
nimya-aot May 27, 2024
23e1326
Updated with current workflow
nimya-aot May 29, 2024
d2a5fff
updated
nimya-aot Jun 4, 2024
08a4774
Merge branch 'master' into test/forms-1226
nimya-aot Jun 4, 2024
11a7fcb
Merge branch 'main' into test/forms-1226
nimya-aot Jun 5, 2024
6c3c076
Formatted
nimya-aot Jun 5, 2024
ed5ffc3
Merge branch 'test/forms-1226' of https://github.com/nimya-aot/common…
nimya-aot Jun 5, 2024
28ccba3
Update cypress.config.js
nimya-aot Jun 5, 2024
ffe3244
updated
nimya-aot Jun 5, 2024
8d29716
Merge branch 'test/forms-1226' of https://github.com/nimya-aot/common…
nimya-aot Jun 5, 2024
9f74cd2
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Jun 5, 2024
948cff5
Merge branch 'test/forms-1226'
nimya-aot Jun 5, 2024
08d5f8e
Merge branch 'master' of https://github.com/nimya-aot/common-hosted-f…
nimya-aot Jun 14, 2024
13e7555
Merge branch 'bcgov:main' into master
nimya-aot Jul 3, 2024
3b7eac5
Test scripts for updating submission data
nimya-aot Jul 5, 2024
fdfda2f
Merge branch 'bcgov:main' into master
nimya-aot Jul 5, 2024
f45570b
Merge branch 'bcgov:main' into test/forms-1313
nimya-aot Jul 8, 2024
84e8117
Scripts for adding notes
nimya-aot Jul 9, 2024
403d824
Merge branch 'main' into test/forms-1313
nimya-aot Jul 9, 2024
2dfd5cf
Added scripts for logout after each run
nimya-aot Jul 10, 2024
6d3c7b7
Merge branch 'test/forms-1313' of https://github.com/nimya-aot/common…
nimya-aot Jul 10, 2024
acced87
Merge branch 'test/forms-1313' into test/forms-1371
nimya-aot Aug 22, 2024
23844bb
Adding statuses to submission
nimya-aot Sep 3, 2024
911e36a
Merge branch 'main' into test/forms-1371
nimya-aot Sep 3, 2024
f83b1b9
Fixed alert message for subscription settings
nimya-aot Sep 3, 2024
142846d
Merge branch 'test/forms-1371' of https://github.com/nimya-aot/common…
nimya-aot Sep 3, 2024
e12390e
Fixing CI/CD running issues
nimya-aot Sep 3, 2024
01ab9a3
Fixed issues on schedule date verification
nimya-aot Sep 3, 2024
a47f8a5
Merge branch 'main' into test/forms-1371
nimya-aot Sep 4, 2024
6916d01
Merge branch 'main' into test/forms-1371
jasonchung1871 Sep 9, 2024
020332e
#1371 Updated the scripts according to the changes with revising status
nimya-aot Sep 19, 2024
9bdefad
Merge branch 'main' into test/forms-1371
nimya-aot Sep 19, 2024
9413294
Merge branch 'main' into test/forms-1371
nimya-aot Sep 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ describe('Form Designer', () => {
cy.waitForLoad();
cy.get('.mdi-delete').click();
cy.get('[data-test="continue-btn-continue"]').click();
cy.get('#logoutButton > .v-btn__content > span').click();

})

Expand Down
15 changes: 10 additions & 5 deletions tests/functional/cypress/e2e/form-design-basicfields.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,20 +235,25 @@ describe('Form Designer', () => {
cy.get('button').contains('Basic Fields').click();
cy.get('div.formio-builder-form').then($el => {
const coords = $el[0].getBoundingClientRect();
cy.get('span.btn').contains('Text Field')
cy.get('span.btn').contains('Checkbox')

.trigger('mousedown', { which: 1}, { force: true })
.trigger('mousemove', coords.x, -50, { force: true })
.trigger('mouseup', { force: true });

cy.get('button').contains('Save').click();
});
//cy.get('[ref=removeComponent]').then($el => {

// const rem=$el[11];
//rem.click();
cy.waitForLoad();
cy.waitForLoad();
//Remove a component
cy.get('[ref=removeComponent]').then($el => {

const rem=$el[11];
rem.click();

//});

});

cy.waitForLoad();
cy.waitForLoad();
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/cypress/e2e/form-edit-submission-data.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ describe('Form Designer', () => {
cy.waitForLoad();
cy.waitForLoad();
cy.get('div.formio-builder-form').then($el => {
const coords2 = $el[0].getBoundingClientRect();
cy.get('span.btn').contains('Checkbox')
const coords2 = $el[0].getBoundingClientRect();
cy.get('span.btn').contains('Checkbox')

.trigger('mousedown', { which: 1}, { force: true })
.trigger('mousemove', coords2.x, -50, { force: true })
Expand Down
5 changes: 3 additions & 2 deletions tests/functional/cypress/e2e/form-manage-form.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ describe('Form Designer', () => {
cy.get(rem).contains('2026-06-17').should('be.visible');
});
cy.contains('SEND Reminder email').click();
cy.contains('b','2026-06-21').should('be.visible');
//cy.contains('b','2026-06-21');
cy.get('[data-test="submission-schedule-text"] > :nth-child(2)').contains('2026-06-21');
cy.get('[data-test="canEditForm"]').click();


Expand All @@ -197,7 +198,7 @@ describe('Form Designer', () => {

cy.get('.v-col > .v-btn > .v-btn__content > span').click();
// Verify form settings updation success message
cy.get('.v-alert__content').contains('div','Your form settings have been updated successfully.').should('be.visible');
cy.get('.v-alert__content').contains('div','Subscription settings for this form has been saved.').should('be.visible');

//Delete form after test run
cy.get('.mdi-delete').click();
Expand Down
244 changes: 244 additions & 0 deletions tests/functional/cypress/e2e/form-submission-assign-status.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
import 'cypress-keycloak-commands';
import 'cypress-drag-drop';
import { formsettings } from '../support/login.js';

const depEnv = Cypress.env('depEnv');


Cypress.Commands.add('waitForLoad', () => {
const loaderTimeout = 60000;

cy.get('.nprogress-busy', { timeout: loaderTimeout }).should('not.exist');
});
describe('Form Designer', () => {

beforeEach(()=>{


cy.on('uncaught:exception', (err, runnable) => {
// Form.io throws an uncaught exception for missing projectid
// Cypress catches it as undefined: undefined so we can't get the text
console.log(err);
return false;
});
});
it('Visits the form settings page', () => {


cy.viewport(1000, 1100);
cy.waitForLoad();
formsettings();

});
it('Add some fields for submission', () => {

cy.viewport(1000, 1800);
cy.waitForLoad();
cy.get('button').contains('Basic Fields').click();
cy.get('div.formio-builder-form').then($el => {
const coords = $el[0].getBoundingClientRect();
cy.get('span.btn').contains('Text Field')

.trigger('mousedown', { which: 1}, { force: true })
.trigger('mousemove', coords.x, -50, { force: true })
.trigger('mouseup', { force: true });
cy.get('button').contains('Save').click();
});

});

it('Form Submission and Updation', () => {
cy.viewport(1000, 1100);
cy.waitForLoad();
cy.waitForLoad();
cy.intercept('GET', `/${depEnv}/api/v1/forms/*`).as('getForm');
// Form saving
let savedButton = cy.get('[data-cy=saveButton]');
expect(savedButton).to.not.be.null;
savedButton.trigger('click');
cy.waitForLoad();



// Go to My forms
cy.wait('@getForm').then(()=>{
let userFormsLinks = cy.get('[data-cy=userFormsLinks]');
expect(userFormsLinks).to.not.be.null;
userFormsLinks.trigger('click');
});
// Filter the newly created form
cy.location('search').then(search => {
//let pathName = fullUrl.pathname
let arr = search.split('=');
let arrayValues = arr[1].split('&');
cy.log(arrayValues[0]);
//cy.log(arrayValues[1]);
//cy.log(arrayValues[2]);
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.waitForLoad();


//Publish the form
cy.get('.v-label > span').click();

cy.get('span').contains('Publish Version 1');

cy.contains('Continue').should('be.visible');
cy.contains('Continue').trigger('click');
//Submit the form
cy.visit(`/${depEnv}/form/submit?f=${arrayValues[0]}`);
cy.waitForLoad();
cy.waitForLoad();
cy.waitForLoad();
cy.get('button').contains('Submit').should('be.visible');
cy.waitForLoad();
cy.waitForLoad();
cy.contains('Text Field').click();
cy.contains('Text Field').type('Alex');
//cy.get('.form-check-input').click();
//form submission
cy.get('button').contains('Submit').click();
cy.waitForLoad();
cy.get('button').contains('Submit').click();
cy.waitForLoad();
cy.waitForLoad();
cy.waitForLoad();
cy.get('label').contains('Text Field').should('be.visible');
cy.get('label').contains('Text Field').should('be.visible');
cy.location('pathname').should('eq', `/${depEnv}/form/success`);
cy.contains('h1', 'Your form has been submitted successfully');
cy.waitForLoad();
cy.waitForLoad();


//Update submission
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.waitForLoad();
cy.waitForLoad();
cy.visit(`/${depEnv}/form/submit?f=${arrayValues[0]}`);
cy.waitForLoad();
cy.waitForLoad();
cy.waitForLoad();
cy.get('button').contains('Submit').should('be.visible');
cy.contains('Text Field').click();
cy.contains('Text Field').type('Smith');
cy.get('button').contains('Submit').click();
cy.waitForLoad();
cy.get('button').contains('Submit').click();
//cy.get('[data-test="continue-btn-continue"]').click();
cy.get('label').contains('Text Field').should('be.visible');
//cy.get('label').contains('Applying for self').should('be.visible');
cy.location('pathname').should('eq', `/${depEnv}/form/success`);

cy.contains('h1', 'Your form has been submitted successfully');
cy.waitForLoad();
cy.waitForLoad();
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.waitForLoad();
cy.waitForLoad();

cy.get('.mdi-list-box-outline').click();
cy.waitForLoad();
//Verify pagination for submission
cy.get('div').contains('1-2 of 2').should('be.visible');
cy.get('.v-select__selection-text').contains('10');
cy.get('.v-data-table-footer__items-per-page > .v-input > .v-input__control > .v-field > .v-field__append-inner > .mdi-menu-down').click();
cy.contains('20').should('be.visible');
cy.contains('25').should('be.visible');
cy.contains('50').should('be.visible');
cy.contains('All').should('be.visible');
cy.get('button[title="Delete Submission"]').should('be.visible');
//view submission
cy.get(':nth-child(1) > :nth-child(6) > a > .v-btn > .v-btn__content > .mdi-eye').click();
cy.waitForLoad();
cy.waitForLoad();
})

});
it('Submission status Assignment', () => {
cy.viewport(1000, 1100);
cy.waitForLoad();
cy.waitForLoad();
//Assign status submission
cy.get('.status-heading > .mdi-chevron-right').click();
cy.get('[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.contains('ASSIGNED').click();
cy.get('[data-test="canAssignToMe"] > .v-btn__content > span').should('be.visible');
cy.get('[data-test="showAssigneeList"] > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.get('[data-test="showAssigneeList"] > .v-input__control > .v-field > .v-field__field > .v-field__input').type('ch');
cy.get('div').contains('CHEFS Testing').click();
cy.get('[data-test="updateStatusToNew"] > .v-btn__content > span').click();
cy.waitForLoad();
cy.waitForLoad();
//cy.get('[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.get('[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__append-inner > .mdi-menu-down').click();
cy.contains('REVISING').click();
//cy.get('.v-selection-control > .v-label').click();
cy.get('[data-test="canAttachCommentToEmail"] > .v-input__control > .v-selection-control > .v-label').click();
cy.get('textarea[rows="1"]').type('some comments');
cy.get('button').contains('REVISE').click();
cy.get(':nth-child(1) > .v-checkbox > .v-input__control > .v-selection-control > .v-label').click();
cy.waitForLoad();
cy.waitForLoad();
//Verify Edit submission button is disabled
cy.get('button[title="Edit This Submission"]').should('be.disabled');
//Verify Submission edit users history
cy.get('.mdi-history').click();
cy.get('.v-data-table__tr > :nth-child(1)').contains('CHEFSTST@idir');
cy.get('.v-card-actions > .v-btn').click();

//Verify History for status updation
cy.get('[data-test="viewHistoryButton"]').click();
cy.get('[data-test="canCloseStatusPanel"] > .v-btn__content > span').click();
cy.get('[data-test="showStatusList"] > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.contains('COMPLETED').click();
cy.get('button').contains('COMPLETE').click();
cy.get('[data-test="viewHistoryButton"]').click();
cy.get('tbody > :nth-child(1) > :nth-child(1)').contains('COMPLETED');
cy.get('tbody > :nth-child(2) > :nth-child(1)').contains('REVISING');
cy.get('tbody > :nth-child(3) > :nth-child(1)').contains('ASSIGNED');
cy.get('tbody > :nth-child(4) > :nth-child(1)').contains('SUBMITTED');
cy.get('[data-test="canCloseStatusPanel"] > .v-btn__content > span').click();
cy.get('.mdi-list-box-outline').click();
cy.waitForLoad();
cy.location('search').then(search => {
//let pathName = fullUrl.pathname
let arr = search.split('=');
cy.visit(`/${depEnv}/form/manage?f=${arr[1]}`);
cy.waitForLoad();
// Checks copy submission button enabled for user
cy.visit(`/${depEnv}/user/submissions?f=${arr[1]}`);

cy.get('.v-data-table-column--align-end > .d-flex > :nth-child(2) > a > .v-btn');
cy.get('.mdi-pencil-box-multiple');

//Delete Submission
cy.visit(`/${depEnv}/form/manage?f=${arr[1]}`);
cy.waitForLoad();
cy.waitForLoad();
cy.get('.mdi-list-box-outline').click();
cy.get('button[title="Delete Submission"]').then($el => {

const rem=$el[0];
rem.click();

});
cy.get('[data-test="continue-btn-continue"] > .v-btn__content > span').click();
cy.get('.v-data-table__tbody > :nth-child(2) > :nth-child(2)').should('not.exist');

//Delete form after test run
cy.visit(`/${depEnv}/form/manage?f=${arr[1]}`);
cy.waitForLoad();
cy.waitForLoad();
cy.get('.mdi-delete').click();
cy.get('[data-test="continue-btn-continue"]').click();
cy.get('#logoutButton > .v-btn__content > span').click();
})





});

});