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-1621 Cypress test scripts for display tab for Map component #1552

Open
wants to merge 239 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
239 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
8f96e7f
#1488 public form submission
nimya-aot Sep 17, 2024
33acb97
#1488 form for public
nimya-aot Sep 18, 2024
28a4736
form settings page for public form
nimya-aot Sep 18, 2024
37141e5
Added scripts for public forms with no status assign ability
nimya-aot Sep 24, 2024
68eadf8
Changes with login page
nimya-aot Sep 24, 2024
1769fbd
Merge branch 'main' into test/forms-1488
nimya-aot Sep 24, 2024
bf0ee7a
Merge branch 'main' into test/forms-1488
nimya-aot Sep 27, 2024
9e68aa7
Removed additional login page
nimya-aot Sep 27, 2024
dc01c69
#1478/Draft submission
nimya-aot Oct 1, 2024
db409f9
Scripts for draft submission
nimya-aot Oct 2, 2024
984d68d
#1478 Added column management functionality and delete button
nimya-aot Oct 4, 2024
ff5e354
Fixed some CI/Cd issues
nimya-aot Oct 4, 2024
4d10a95
Merge branch 'main' into test/forms-1478
nimya-aot Oct 15, 2024
19da4b9
#1478 Renamed public form
nimya-aot Oct 15, 2024
47d2c32
Merge branch 'test/forms-1478' of https://github.com/nimya-aot/common…
nimya-aot Oct 15, 2024
2ed7089
Removed duplicate files
nimya-aot Oct 15, 2024
e360c50
Merge branch 'main' into test/forms-1478
nimya-aot Oct 15, 2024
0154c04
# Fixed issues after implimenting custom metadata
nimya-aot Oct 18, 2024
6fdb4fd
Merge branch 'test/forms-1478' of https://github.com/nimya-aot/common…
nimya-aot Oct 18, 2024
ec0201a
Updated settings button
nimya-aot Oct 18, 2024
e3f18d6
#1540 Test scripts for revise status changes
nimya-aot Oct 22, 2024
aef1383
Modified scripts
nimya-aot Oct 23, 2024
fd42f82
Fixed CI/Cd issue
nimya-aot Oct 23, 2024
f426e60
#1547 test scripts for export/imprt design
nimya-aot Oct 30, 2024
a5136ea
#1547 added preview form
nimya-aot Nov 4, 2024
cc5e4c5
Added downloads folder to config file
nimya-aot Nov 4, 2024
305cf9d
Added downloads folder
nimya-aot Nov 4, 2024
abbb9f5
Fixed spacing issue
nimya-aot Nov 4, 2024
4934b1d
Removed downloaded files
nimya-aot Nov 4, 2024
42bea1a
Modified download folder path
nimya-aot Nov 5, 2024
861758a
Merge branch 'main' into test/forms-1547
nimya-aot Nov 6, 2024
3bbaf67
Fixed some fornmatting issue
nimya-aot Nov 6, 2024
f4a72b1
Merge branch 'test/forms-1547' of https://github.com/nimya-aot/common…
nimya-aot Nov 6, 2024
31505be
Updated component check
nimya-aot Nov 7, 2024
77c0d0e
#1578 updated scripts
nimya-aot Nov 18, 2024
433b68c
#1578 Added email notification
nimya-aot Nov 20, 2024
9de35f6
#1528 Scripts for email management
nimya-aot Nov 26, 2024
a5c436a
#1528 Fixed some running issues
nimya-aot Nov 29, 2024
0e81627
Fixed running issues
nimya-aot Dec 2, 2024
3348f37
Modified form-team-managememnt.cy.js file name
nimya-aot Dec 2, 2024
58cd154
Merge branch 'main' into test/forms-1528
nimya-aot Dec 2, 2024
5a5ccf5
Fixed issue with export button click
nimya-aot Dec 2, 2024
57f6fb9
#1346 Test scripts for API export functionality validation
nimya-aot Dec 6, 2024
7008037
#1346 Added External API existence checks
nimya-aot Dec 9, 2024
49d09a8
#1619 Added scripts for validatimg Meta form section
nimya-aot Dec 12, 2024
80a597a
Merge branch 'main' into test/forms-1619
nimya-aot Dec 13, 2024
5b06c06
#1619 Added help link validations on form settings page
nimya-aot Dec 13, 2024
2347679
Merge branch 'test/forms-1619' of https://github.com/nimya-aot/common…
nimya-aot Dec 13, 2024
262dc96
#1621 Test scripts for Map component display tab
nimya-aot Dec 18, 2024
9f10bea
#Added preview button validation along with this script
nimya-aot Dec 23, 2024
056cd96
Merge branch 'main' into test/forms-1621
nimya-aot Dec 23, 2024
8d87e75
#1621 Added validations for custom css class
nimya-aot Dec 23, 2024
5777c04
Merge branch 'test/forms-1621' of https://github.com/nimya-aot/common…
nimya-aot Dec 23, 2024
0ce3468
Fixed running issues
nimya-aot Dec 24, 2024
957e5c2
Fixed running issues with adding team member on PR env
nimya-aot Dec 24, 2024
dace317
Merge branch 'main' into test/forms-1621
nimya-aot Dec 26, 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 @@ -80,7 +80,7 @@ describe('Form Designer', () => {
});
//Verify visibility of right side buttons on design page
cy.get('[data-cy="saveButton"] > .v-btn').should('be.enabled');
cy.get('[data-cy="previewRouterLink"] > .v-btn').should('be.enabled');
//cy.get('[data-cy="previewRouterLink"] > .v-btn').should('be.enabled');
cy.get('[data-cy="undoButton"] > .v-btn').should('be.enabled');
cy.get('[data-cy="redoButton"] > .v-btn').should('not.be.enabled');
cy.get('.mdi-undo').click();
Expand All @@ -105,6 +105,7 @@ describe('Form Designer', () => {
expect(savedButton).to.not.be.null;
savedButton.trigger('click');
cy.wait(2000);
//cy.get('[data-cy="previewRouterLink"] > .v-btn').should('be.enabled');

// Filter the newly created form
cy.location('search').then(search => {
Expand Down
122 changes: 122 additions & 0 deletions tests/functional/cypress/e2e/form-design-map.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
import 'cypress-keycloak-commands';
import 'cypress-drag-drop';
import { formsettings } from '../support/login.js';
//import { should } from 'chai';

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();


});
// Publish a simple form with Simplebc Address component
it('Checks simplebcaddress and form submission', () => {
cy.viewport(1000, 1100);
cy.waitForLoad();

cy.get('button').contains('BC Government').click();
cy.get('div.formio-builder-form').then($el => {
const coords = $el[0].getBoundingClientRect();
cy.get('[data-type="map"]')
.trigger('mousedown', { which: 1}, { force: true })
.trigger('mousemove', coords.x, -550, { force: true })
.trigger('mouseup', { force: true });
cy.waitForLoad();
cy.get('input[name="data[label]"]').type('s');
cy.get('textarea[name="data[description]"]').should("have.attr","placeholder","This will appear below the map");
cy.get('textarea[name="data[description]"]').type('Map location above');
cy.wait(2000);
cy.contains('Map location above').should('exist');
cy.get('textarea[placeholder="Add a tooltip beside the label"]').type('Add your desired location');
cy.wait(2000);
cy.get('i[ref="tooltip"]').should('exist');
cy.get('label').contains('Maps').should('exist');
cy.get('div[data-value="top"]').should('exist');
cy.get('input[name="data[customClass]"').should('exist');

cy.waitForLoad();
cy.get('button').contains('Save').click();


});

// Form saving
let savedButton = cy.get('[data-cy=saveButton]');
expect(savedButton).to.not.be.null;
savedButton.trigger('click');
cy.wait(2000);




// 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.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');
//Share link verification
let shareFormButton = cy.get('[data-cy=shareFormButton]');
expect(shareFormButton).to.not.be.null;
shareFormButton.trigger('click').then(()=>{
//let shareFormLinkButton = cy.get('[data-cy=shareFormLinkButtonss]');
let shareFormLinkButton=cy.get('.mx-2');
expect(shareFormLinkButton).to.not.be.null;
shareFormLinkButton.trigger('click');
cy.get('.mx-2 > .v-btn').click();
})
cy.visit(`/${depEnv}`);
cy.get('[data-cy="userFormsLinks"]').click();
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.waitForLoad();
//Delete form after test run
//cy.get('.mdi-delete').click();
cy.get(':nth-child(5) > .v-btn > .v-btn__content > .mdi-delete').click();
cy.get('[data-test="continue-btn-continue"]').click();
cy.get('#logoutButton > .v-btn__content > span').click();


});

});

});
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,6 @@ it('Verify draft submission', () => {
cy.get('.mdi-pencil').click();
cy.get('.mdi-content-save').click();
cy.get('.v-alert__content > div').contains('Draft Saved');
cy.get(':nth-child(2) > :nth-child(4) > :nth-child(1) > .v-btn').click();
//Manage members for draft management
cy.get('form > .v-input > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.get('form > .v-input > .v-input__control > .v-field > .v-field__field > .v-field__input').type('NIM');
cy.contains('John, Nimya 1 CITZ:EX ([email protected])').click();
cy.get('.v-col-3').click();
cy.get('tbody > :nth-child(2) > :nth-child(1)').contains('John, Nimya 1 CITZ:EX').should('be.visible');
cy.get(':nth-child(1) > :nth-child(4) > .v-btn > .v-btn__content > .mdi-minus').should('not.be.enabled');
//Remove added member
cy.get(':nth-child(2) > :nth-child(4) > .v-btn > .v-btn__content > .mdi-minus').click();
cy.get('[data-test="continue-btn-continue"] > .v-btn__content > span').click();
cy.get('tbody > :nth-child(2) > :nth-child(1)').should('not.exist');
cy.wait(4000);

cy.get('.v-card-actions > .v-btn > .v-btn__content > span').click();
cy.waitForLoad();
// Edit draft submission
cy.wait(4000);
cy.get('.mt-6 > :nth-child(1) > .v-btn > .v-btn__content > span').click();
Expand Down
7 changes: 4 additions & 3 deletions tests/functional/cypress/e2e/form-edit-submission-data.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ describe('Form Designer', () => {

//view submission
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.wait(2000);
//cy.get('.mdi-list-box-outline').click({multiple:true,force:true});
cy.get('[data-test="canViewFormSubmissions"]').click({multiple:true,force:true});
cy.wait(4000);
cy.get('.mdi-list-box-outline').click();
cy.wait(4000);
//cy.get('[data-test="canViewFormSubmissions"]').click({multiple:true,force:true});
cy.waitForLoad();
cy.get('.v-data-table__tr > :nth-child(2)').should('exist');
cy.get('input[type="checkbox"]').then($el => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,7 @@ describe('Form Designer', () => {
cy.get(rem5).should("be.enabled");
});
cy.get('[data-test="canEditForm"]').click();
//Check team management functionality for public forms

cy.get('.mdi-account-multiple').click();
cy.get('.mdi-account-plus').click();
//Search for a member to add
cy.get('.v-col > .v-input > .v-input__control > .v-field > .v-field__field > .v-field__input').click();
cy.get('.v-col > .v-input > .v-input__control > .v-field > .v-field__field > .v-field__input').type('NIM');
cy.get('.v-slide-group__content > :nth-child(1)').should('be.visible')//designer role
cy.get(':nth-child(2) > .v-chip__content').should('be.visible');//submitter role
cy.get(':nth-child(3) > .v-chip__content').should('be.visible');//owner role
cy.get(':nth-child(4) > .v-chip__content').should('be.visible');//approver role
cy.get(':nth-child(5) > .v-chip__content').should('be.visible');//reviewer role
cy.get(':nth-child(6) > .v-chip__content').should('be.visible');//team manager role
cy.contains('John, Nimya 1 CITZ:EX ([email protected])').click();
cy.get(':nth-child(2) > .v-chip__content').click();
cy.get(':nth-child(4) > .v-chip__content').click();
cy.get(':nth-child(5) > .v-chip__content').click();
cy.get('.v-btn--elevated > .v-btn__content > span').click();
cy.get(':nth-child(10) > span').should('not.exist');// verify Submitter role is not present on table view
// Verify member is added with proper roles
cy.get('[data-test="ApproverRoleCheckbox"]').should('be.visible');
cy.get('[data-test="ReviewerRoleCheckbox"]').should('exist');
cy.get('[data-test="TeamManagerRoleCheckbox"]').should('be.visible');
cy.get('[data-test="ApproverRoleCheckbox"]').click({multiple:true,force:true});
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
cy.wait(2000);
//Logout to submit the public form
Expand Down
Loading