some updates for NDR_PP1 cypress tests w/ burnettk

This commit is contained in:
jasquat 2023-05-10 15:49:55 -04:00
parent b41df276f5
commit 9e57be25a4
5 changed files with 3376 additions and 3379 deletions

View File

@ -33,3 +33,5 @@ cypress/screenshots
# Editors
.idea
/cypress.env

View File

@ -30,6 +30,14 @@ if [[ -z "${CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK:-}" ]]; then
export CYPRESS_SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK=true
fi
if [[ -f cypress.env ]]; then
# shellcheck disable=1091
source cypress.env
else
>&2 echo "ERROR: This requires a cypress.env file to run. You may be able to use generate_pp1_cypress_env_configs."
exit 1
fi
cypress_run_file="/var/tmp/cypress_run"
echo "Recording stats to ${cypress_run_file}"
@ -44,7 +52,6 @@ for attempt in $(seq 1 "$ATTEMPTS" ); do
start_time=$(date +%s)
success="false"
# spec_pattern="cypress/pilot/**/*.cy.{js,jsx,ts,tsx}"
spec_pattern="cypress/pilot/**/*.cy.{js,jsx,ts,tsx}"
if ./node_modules/.bin/cypress "$command" -c specPattern="${spec_pattern}" --e2e --browser chrome "$@"; then
success="true"

View File

@ -42,7 +42,7 @@ const submitWithUser = (
cy.get('button')
.contains(/^Submit$/)
.click();
//Form 2
//Form 2
/*cy.contains('Task: Enter NDR Items', { timeout: 60000 });
cy.get('button')
.contains(/^Submit$/)
@ -105,12 +105,12 @@ describe.only('Consulting Fees Path - Without Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();
@ -234,12 +234,12 @@ describe.only('Consulting Fees Path - Without Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();
@ -363,12 +363,12 @@ describe.only('Consulting Fees Path - Without Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();
@ -517,12 +517,12 @@ describe('Consulting Fees Path - With Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();
@ -685,12 +685,12 @@ describe('Consulting Fees Path - With Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();
@ -856,12 +856,12 @@ describe('Consulting Fees Path - With Files', () => {
/* cy.contains('Please select the type of request to start the process.');
// wait a second to ensure we can click the radio button
cy.wait(2000);
cy.get('input#root-procurement').click();
cy.wait(2000);
cy.get('button')
.contains(/^Submit$/)
.click();

View File

@ -63,6 +63,7 @@ Cypress.Commands.add('login', (username, password) => {
Cypress.Commands.add('logout', (_selector, ..._args) => {
cy.get('#user-profile-toggletip').click();
cy.wait(2000);
cy.getBySel('logout-button').click();
if (Cypress.env('SPIFFWORKFLOW_FRONTEND_AUTH_WITH_KEYCLOAK') === true) {
// otherwise we can click logout, quickly load the next page, and the javascript