Closed ibolton336 closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 42.22%. Comparing base (
b654645
) to head (30ad160
). Report is 171 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
- Update this logic to account for new states added to task engine on backend API side
Is this PR dependent on a hub PR getting merged? If yes, please reference the PR or hub issue in the PR description.
Is this PR dependent on a hub PR getting merged? If yes, please reference the PR or hub issue in the PR description.
Description updated with more context! Could not find a specific hub PR for this. @sjd78
@ibolton336 integration tests fail because they cannot delete an application
AssertionError: Timed out retrying after 8000ms: expected '<button#analyze-application.pf-v5-c-button.pf-m-primary.pf-m-disabled>' to be 'enabled'
at Analysis.startAnalysis (cypress/e2e/models/migration/applicationinventory/analysis.ts:199:43)
(...)
No elements in the current DOM matched your query:
> cy.get(span.pf-v5-c-menu__item-text).contains(Delete)
(...)
From Your Spec Code:
at clickItemInKebabMenu (cypress/utils/utils.ts:657:57)
at Application.delete (cypress/e2e/models/migration/applicationinventory/application.ts:254:29)
This PR narrows down the check for analysis tasks that are cancellable. Also the logic is updated and flipped for "disabling" the creation of a new analysis task. Analysis tasks should be creatable when there are no states for tasks outside of "succeeded" or "failed". This will future proof against any other additional task states that may be added in the future. The "scheduled" state was just added for 0.4 & is the motivation behind this PR ( as requested by @jortel )