When the user is on the project page: /projects/[id] and the project is not finished with discovery, there is a button 'Start Discovery' which should begin the discovery process. But, when the user clicks the button, the API (/projects/[id]/start) returns the following:
{message: "Project 1 is already running", status: "running"}
message
:
"Project 1 is already running"
status
:
"running"
Because of this message, the page does not kick off any discovery process.
Expected Behavior:
- Even if the project is already running, the Start Discovery button should begin the discovery process from scratch. Future issues address what happens if the project is part-way through the discovery process.
- The project page already queries the API (/projects/[id]/status) which in the case of a project that hasn't begun discovery returns the following:
{project_id: 1, name: "test-project", status: "running", phase: "discovery", workflow_step: 1,…}
name: "test-project"
phase: "discovery"
progress: {completed_tasks: 0, total_tasks: 0, percentage: 0}
completed_tasks: 0
percentage: 0
total_tasks: 0
project_id: 1
status: "running"
workflow_step: 1
This response should automatically indicate to the application that the discovery process has not begun and should now begin (or at least ask the user if they're ready to begin). So, the button and/or the status information should kick off the process. Currently, it does not.
In addition to solving the workflow issue, unit tests on the button and E2E tests on the workflow should have caught this but did not. They need to be updated in order to handle this workflow.
When the user is on the project page: /projects/[id] and the project is not finished with discovery, there is a button 'Start Discovery' which should begin the discovery process. But, when the user clicks the button, the API (/projects/[id]/start) returns the following:
Because of this message, the page does not kick off any discovery process.
Expected Behavior:
This response should automatically indicate to the application that the discovery process has not begun and should now begin (or at least ask the user if they're ready to begin). So, the button and/or the status information should kick off the process. Currently, it does not.
In addition to solving the workflow issue, unit tests on the button and E2E tests on the workflow should have caught this but did not. They need to be updated in order to handle this workflow.