From 94776a78b5330826db456314fdccea288d6b3fe7 Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 6 Mar 2023 16:16:55 -0500 Subject: [PATCH] some minor tweaks and turn off debug logging for spiff step details w/ burnettk --- spiffworkflow-backend/Dockerfile | 5 +++++ .../services/process_instance_processor.py | 6 +++--- spiffworkflow-frontend/cypress/pilot/pp1.cy.js | 12 ++++++++---- spiffworkflow-frontend/cypress/support/commands.js | 2 +- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/spiffworkflow-backend/Dockerfile b/spiffworkflow-backend/Dockerfile index 42b0fee2f..f42b8a5b6 100644 --- a/spiffworkflow-backend/Dockerfile +++ b/spiffworkflow-backend/Dockerfile @@ -19,6 +19,11 @@ RUN apt-get update \ # Setup image for installing Python dependencies. FROM base AS setup +# poetry 1.4 seems to cause an issue where it errors with +# This error originates from the build backend, and is likely not a +# problem with poetry but with lazy-object-proxy (1.7.1) not supporting PEP 517 builds. +# You can verify this by running 'pip wheel --use-pep517 "lazy-object-proxy (==1.7.1) ; python_version >= "3.6""'. +# Pinnning to 1.3.2 to attempt to avoid it. RUN pip install poetry==1.3.2 RUN useradd _gunicorn --no-create-home --user-group diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py index 774feec47..e73e7ff09 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1218,7 +1218,7 @@ class ProcessInstanceProcessor: ) db.session.add(spiff_step_detail) db.session.commit() - self.log_spiff_step_details(spiff_step_detail_mapping) + # self.log_spiff_step_details(spiff_step_detail_mapping) if len(human_tasks) > 0: for at in human_tasks: @@ -1255,7 +1255,7 @@ class ProcessInstanceProcessor: spiff_step_detail = SpiffStepDetailsModel(**step) db.session.add(spiff_step_detail) db.session.commit() - self.log_spiff_step_details(step) + # self.log_spiff_step_details(step) def manual_complete_task(self, task_id: str, execute: bool) -> None: """Mark the task complete optionally executing it.""" @@ -1720,7 +1720,7 @@ class ProcessInstanceProcessor: raise ApiError.from_workflow_exception("task_error", str(swe), swe) from swe finally: - self.log_spiff_step_details(step_details) + # self.log_spiff_step_details(step_details) db.session.bulk_insert_mappings(SpiffStepDetailsModel, step_details) spiff_logger = logging.getLogger("spiff") for handler in spiff_logger.handlers: diff --git a/spiffworkflow-frontend/cypress/pilot/pp1.cy.js b/spiffworkflow-frontend/cypress/pilot/pp1.cy.js index c34315b83..196559b6b 100644 --- a/spiffworkflow-frontend/cypress/pilot/pp1.cy.js +++ b/spiffworkflow-frontend/cypress/pilot/pp1.cy.js @@ -31,14 +31,17 @@ const approveWithUser = ( }; describe('pp1', () => { - it.skip('can run PP1', () => { + it('can run PP1', () => { cy.login('core5.contributor', 'core5.contributor'); cy.visit('/'); cy.contains('Start New +').click(); cy.contains('Raise New Demand Request'); cy.runPrimaryBpmnFile(true); - cy.contains('Procurement').click(); - // cy.contains('Submit').click(); + 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(1000); + cy.get('input#root-procurement').click(); + cy.wait(1000); cy.get('button') .contains(/^Submit$/) .click(); @@ -77,7 +80,8 @@ describe('pp1', () => { .click(); cy.contains( - 'Review and provide any supporting information or files for your request.' + 'Review and provide any supporting information or files for your request.', + { timeout: 20000 } ); cy.contains('Submit the Request').click(); cy.get('input[value="Submit the Request"]').click(); diff --git a/spiffworkflow-frontend/cypress/support/commands.js b/spiffworkflow-frontend/cypress/support/commands.js index 5e786a0dc..5fe791d10 100644 --- a/spiffworkflow-frontend/cypress/support/commands.js +++ b/spiffworkflow-frontend/cypress/support/commands.js @@ -109,7 +109,7 @@ Cypress.Commands.add( if (expectAutoRedirectToHumanTask) { // the url changes immediately, so also make sure we get some content from the next page, "Task:", or else when we try to interact with the page, it'll re-render and we'll get an error with cypress. cy.url().should('include', `/tasks/`); - cy.contains('Task: '); + cy.contains('Task: ', { timeout: 10000 }); } else { cy.contains(/Process Instance.*[kK]icked [oO]ff/); cy.reload(true);