Skip to content

Commit

Permalink
Fixed running issues with adding team member on PR env
Browse files Browse the repository at this point in the history
  • Loading branch information
nimya-aot committed Dec 24, 2024
1 parent 0ce3468 commit 957e5c2
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ describe('Form Designer', () => {
cy.visit(`/${depEnv}/form/manage?f=${arrayValues[0]}`);
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');
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

0 comments on commit 957e5c2

Please sign in to comment.