Feature/ab#32508 approval flow cypress#2411
Merged
Merged
Conversation
- Change date filter from 'alltime' to 'last7days' when searching submissions - Trim chefs-api-submission seeder to create exactly one submission (removes custom overrides, draft, file attachment, and retrieve test blocks) - Fix clickPaymentInfoSave to target #savePaymentInfoBtn and intercept the PUT supplier-number API instead of a fixed wait - Add page reload in ensureSiteInfoReady so DataTable re-initializes with the saved SupplierId before Refresh Site List is clicked - Intercept sites-by-supplier-number API in ensureSiteInfoReady to wait on the actual response rather than a timer - Scroll #main-left pane to bring SiteInfoTable into view before row checks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Stephan-McColm
approved these changes
May 6, 2026
Contributor
Stephan-McColm
left a comment
There was a problem hiding this comment.
Acceptable in TEST
PASS in UAT
PASS in PROD
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Cypress approval-flow regression suite to rely on a deterministic CHEFS “seeder” submission (persisted to last-submission-id.json) and adjusts the approval workflow test to be more stable around Payment Info / Site Info behaviors and blocking modals.
Changes:
- Convert the CHEFS API test into a single-purpose “Approval Flow Seeder” that creates one submission and writes its confirmation/submission ID to
cypress/scripts/last-submission-id.json. - Update
ApprovalFlow.cy.tsto prefer the seeded submission ID and to improve resilience around Payment Info → Refresh Site List and modal cleanup, while narrowing list filtering tolast7days. - Update page-object interactions for Payment Info save/refresh actions (new selectors, forced blur).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| applications/Unity.AutoUI/cypress/scripts/chefs-api-submission.cy.ts | Refactors the CHEFS API script into a seeder that creates one submission and writes an ID file for downstream approval-flow tests. |
| applications/Unity.AutoUI/cypress/regression/ApprovalFlow.cy.ts | Adjusts approval-flow filtering and adds stability improvements for payment/site info refresh and blocking modal handling. |
| applications/Unity.AutoUI/cypress/pages/ApplicationDetailsPage.ts | Updates selectors/flows for saving Payment Info and refreshing Site List (plus a forced blur on supplier number entry). |
Comment on lines
116
to
119
| listPage | ||
| .selectQuickDateRange("alltime") | ||
| .selectQuickDateRange("last7days") | ||
| .waitForTableRefresh() | ||
| .searchForSubmission(submissionId); |
Comment on lines
+351
to
+353
| // Wait for the button to become disabled (saving in-progress) or re-enabled (save complete). | ||
| // A cy.reload() always follows immediately, so we just need the click to register. | ||
| cy.wait(1500); |
Comment on lines
+362
to
+367
| cy.contains("Refresh Site List", { timeout: 20000 }) | ||
| .should("be.visible") | ||
| .click({ force: true }); | ||
|
|
||
| // Dismiss the "Action Complete" modal that always appears after refresh | ||
| cy.contains("button", "Ok", { timeout: 20000 }) |
Comment on lines
323
to
+333
| expect(response.status).to.be.oneOf([200, 201]); | ||
| expect(response.body).to.have.property("id"); | ||
|
|
||
| if (response.body.id) { | ||
| createdSubmissionId = response.body.id; | ||
| const confirmationId = response.body.confirmationId || response.body.id; | ||
| cy.log(`✅ Submission created with ID: ${response.body.id}`); | ||
| cy.log(`✅ Confirmation ID: ${confirmationId}`); | ||
| cy.writeFile("cypress/scripts/last-submission-id.json", { | ||
| submissionId: confirmationId, | ||
| createdAt: new Date().toISOString(), | ||
| }); | ||
| } | ||
| const confirmationId = response.body.confirmationId || response.body.id; | ||
| cy.log(`✅ Submission created with ID: ${response.body.id}`); | ||
| cy.log(`✅ Confirmation ID: ${confirmationId}`); | ||
|
|
||
| cy.writeFile("cypress/scripts/last-submission-id.json", { | ||
| submissionId: confirmationId, | ||
| createdAt: new Date().toISOString(), | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.