some updates for NDR_PP1 cypress tests w/ burnettk

This commit is contained in:
jasquat 2023-05-10 15:49:55 -04:00
parent 661fe7fef4
commit b1d27cec75
No known key found for this signature in database
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

@ -93,7 +93,7 @@ describe.only('Software and Licenses Path - Without Files', () => {
Cypress._.times(1, () => {
//Everyone approves with CP
it('Everyone approves with CP', () => {
it.only('Everyone approves with CP', () => {
let username = Cypress.env('requestor_username');
let password = Cypress.env('requestor_password');
cy.log('=====username : ' + username);
@ -103,23 +103,10 @@ describe.only('Software and Licenses Path - Without Files', () => {
cy.visit('/');
cy.contains('Start New +').click();
cy.contains('Request Goods or Services');
cy.contains('Request Goods or Services').click();
cy.runPrimaryBpmnFile(true);
/* 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();
*/
cy.contains(
'Request Goods or Services',
{ timeout: 60000 }

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