Skip to content

Commit

Permalink
test: FORMS-1346 Cypress test scripts for External API settings confi…
Browse files Browse the repository at this point in the history
…guration (#1539)

* #FORMS-974

* #974 updates

* #980 modification to cypress config

* FORMS-980

* #992

* #992 Fix cypress scripts

* #1011 Form design page

* #1011 test scripts

* #1023 cypress scripts

* #1023 advanced data components

* #1023 Updated scripts

* #1023 updation

* Updated json file

* Test/forms (#1011)(#1023) (#1307)

* #FORMS-974

* #974 updates

* #980 modification to cypress config

* FORMS-980

* #992

* #992 Fix cypress scripts

* #1011 Form design page

* #1011 test scripts

* #1023 cypress scripts

* #1023 advanced data components

* #1023 Updated scripts

* #1023 updation

* Updated json file

* #1059 workflow file for cypress

* #1059 updated the base url

* #1059 updated workflow

* Updated node version

* updated

* updated

* Updation

* updated file

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* updated package file

* Update cypress-ci.yaml

* Updated config file

* Update cypress-ci.yaml

* #1059 updated package

* #1060 scripts for Advanced fields and BC Gov components

* Fixing review comments

* Updated changes

* # Updated with PR comments

* updated

* Update form-design-basicfields.cy.js

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Modifies test scripts

* Updated files

* Fixed errors during CI/CD Run

* Updated browser type

* Updated Simple BC address component

* Updated

* Fields updated

* Test script changed

* Updated

* Updated fields

* Updated env variable

* Update form-design-basicfields.cy.js

* Updated

* Update cypress-ci.yaml

* Updated email input

* screenshots

* Updated path

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Updated version on workflow

* Fix to failed tests

* Fix to BC address component

* Updated the  component

* Changed button element

* Fixed BC components

* Modified submission

* Modified components

* Updated attribute

* Updated

* Changed simpleBC address component

* Update package.json

* Update package-lock.json

* Test scripts

* Updated

* Pushed the changes

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Env change

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Update cypress-ci.yaml

* Updated

* Updated to take default env variable

* Updated with current workflow

* updated

* Formatted

* Update cypress.config.js

* updated

* Test scripts for updating submission data

* Scripts for adding notes

* Added scripts for logout after each run

* Adding statuses to submission

* Fixed alert message for subscription settings

* Fixing CI/CD running issues

* Fixed issues on schedule date verification

* #1488 public form submission

* #1488 form for public

* form settings page for public form

* Added scripts for public forms with no status assign ability

* Changes with login page

* Removed additional login page

* #1478/Draft submission

* Scripts for draft submission

* #1478 Added column management functionality and delete button

* Fixed some CI/Cd issues

* #1478 Renamed public form

* Removed duplicate files

* # Fixed issues after implimenting custom metadata

* Updated settings button

* #1540 Test scripts for revise status changes

* Modified scripts

* Fixed CI/Cd issue

* #1547 test scripts for export/imprt design

* #1547 added preview form

* Added downloads folder to config file

* Added downloads folder

* Fixed spacing issue

* Removed downloaded files

* Modified download folder path

* Fixed some fornmatting issue

* Updated component check

* #1578 updated scripts

* #1578 Added email notification

* #1528 Scripts for email management

* #1528 Fixed some running issues

* Fixed running issues

* Modified form-team-managememnt.cy.js file name

* Fixed issue with export button click

* #1346 Test scripts for API export functionality validation

* #1346 Added External API existence checks

---------

Co-authored-by: jasonchung1871 <[email protected]>
  • Loading branch information
nimya-aot and jasonchung1871 authored Dec 13, 2024
1 parent e989383 commit fe35d5d
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 4 deletions.
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 @@ -108,8 +108,8 @@ describe('Form Designer', () => {
cy.waitForLoad();
cy.waitForLoad();

//cy.get('.mdi-list-box-outline').click();
cy.get('[data-test="canViewFormSubmissions"]').click({multiple:true,force:true});
cy.get('.mdi-list-box-outline').click({multiple:true,force:true});
//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
64 changes: 62 additions & 2 deletions tests/functional/cypress/e2e/form-manage-form.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,70 @@ 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','Subscription settings for this form has been saved.').should('be.visible');
})
it('Checks External API settings', () => {
cy.viewport(1000, 1100);
cy.waitForLoad();
cy.get(':nth-child(5) > .v-expansion-panel > .v-expansion-panel-title > .v-expansion-panel-title__overlay').click();
cy.get('.mt-6 > :nth-child(2) > .mdi-help-circle-outline').should('exist');
cy.get('.mdi-plus-circle').click({ force: true });
cy.wait(2000);
cy.get('input[type="text"]').then($el => {
cy.get('.mdi-plus-circle').click();

//Delete form after test run
cy.get('.mdi-delete').click();
const api_name=$el[12];
const api_endpoint=$el[13];
const api_header=$el[14];
const api_keyvalue=$el[15];
cy.get(api_name).click();
cy.get(api_endpoint).click();

cy.wait(2000);
cy.get(api_header).click();
cy.contains('div','Name is required.').should('be.visible');
cy.get('.v-messages__message').contains('div','Please enter a valid endpoint starting with http:// or https://').should('be.visible');

cy.get(api_name).type('chefs_name');
cy.get(api_endpoint).type('chefs_endpoint');
cy.contains('div','Name is required.').should('not.exist');
cy.get('.v-messages__message').contains('div','Please enter a valid endpoint starting with http:// or https://').should('be.visible');
cy.get(api_endpoint).type('{selectall}{backspace}');
cy.get(api_endpoint).type('https://chefs-dev.apps.silver.devops.gov.bc.ca/');
cy.get(api_header).type('header');
cy.get(api_keyvalue).type('keyvalue');
});
cy.get('input[type="checkbox"]').then($el => {
const user_apikey=$el[14];
const user_info=$el[15];
cy.get(user_info).click();
cy.get(user_apikey).click();
cy.get('[data-test="continue-btn-continue"]').should('be.enabled');
cy.get('[data-test="continue-btn-cancel"]').should('be.enabled');
cy.get('[data-test="continue-btn-continue"]').click();
})

cy.get('.v-data-table__tbody > .v-data-table__tr > :nth-child(3)').contains('Submitted');
cy.get(':nth-child(1) > .v-btn > .v-btn__content > .mdi-pencil').click();
cy.get('span').contains('Submitted').should('exist');
cy.get('[data-test="continue-btn-continue"]').click();
cy.get('.v-data-table__tbody > .v-data-table__tr > :nth-child(1)').should('have.text',"chefs_name");
//Delete external api configuration
cy.get('.v-data-table__tbody > .v-data-table__tr > .v-data-table-column--align-end > :nth-child(2) > [targetref="[object Object]"] > .v-btn').click();
cy.wait(2000);
cy.get('.v-data-table__tbody > .v-data-table__tr > :nth-child(1)').should('not.exist');
//Delete form after test run
cy.get('[data-test="canRemoveForm"]').then($el => {
const delform=$el[0];
cy.get(delform).click();
})
cy.get('[data-test="continue-btn-continue"] > .v-btn__content > span').then($el => {
const delcontinue=$el[1];
cy.get(delcontinue).click();
cy.get('#logoutButton > .v-btn__content > span').click();



})

})
})

0 comments on commit fe35d5d

Please sign in to comment.