Repository navigation
test(e2e): finish an interrupted deploy end-to-end (pubspec pushed, class not re-provisioned) - #116
Merged
Conversation
…al step-3 push The "step-2 timeout ends with classes AND pubspec both present" criterion was only proven at the unit level (isDeployFinishable, buildFinishPushFileMap). This drives the real handlers: provision stalls past a shortened UI bound while the class has landed, reconcile arms the "Finish deploy" terminal, and running that action pushes the merged pubspec (asserted on the intercepted syncCustomCodeChanges request body), issues no second /deployCustomClasses request, and ends the terminal in a finished state.
Contributor
|
This PR does not match any of the 1 configured review trigger rule. |
Comment on lines
+78
to
+82
| zip.file("pubspec.yaml", mergedPubspec); | ||
| zip.file( | ||
| "lib/custom_code/gauge_widget.dart", | ||
| attemptedClass["gauge_widget.dart"].content, | ||
| ); |
Contributor
There was a problem hiding this comment.
Comment on lines
+134
to
+160
| // Mirror app.js mergeFinishDeployContext: gives the finished terminal the | ||
| // identity and the "Deploy finished" message a normal deploy would show. | ||
| const merged = { | ||
| ...fd, | ||
| result: { | ||
| targetIdentity: identity, | ||
| metadata: { | ||
| artifactType: identity.artifactType, | ||
| artifactName: identity.artifactName, | ||
| fileName: identity.fileName, | ||
| projectId: identity.projectId, | ||
| }, | ||
| message: `Deploy finished: ${identity.artifactName || "custom classes"} and their dependencies are now in FlutterFlow.`, | ||
| addedDependencies: [], | ||
| unverified: [], | ||
| approximate: [], | ||
| warnings: [], | ||
| elapsedTime: 0, | ||
| }, | ||
| }; | ||
| window.showCommitUnconfirmedModal({ | ||
| success: false, | ||
| unconfirmed: true, | ||
| targetIdentity: identity, | ||
| error: error.message, | ||
| finishDeploy: merged, | ||
| }); |
Contributor
There was a problem hiding this comment.
🔍 Manual terminal setup leaves deploy wiring untested
The test builds the finish context and opens the modal itself. A broken production handoff through mergeFinishDeployContext or renderCommitTerminal can leave this test passing.
Was this helpful? React with 👍 or 👎 to provide feedback.
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.
What
Adds
e2e/finish-deploy-e2e.spec.js, browser proof of the last P0: an interrupted deploy that outlives the browser bound now finishes rather than being left as a re-read estimate.The "step-2 timeout ends with classes AND pubspec both present" criterion was previously proven only at the unit level (
isDeployFinishable,buildFinishPushFileMapinsrc/flutterFlowCodeFileProvisioning.js), never through the handler that actually performs the push. This spec drives the real code:window.showCommitUnconfirmedModalwith the finish context merged exactly asmergeFinishDeployContextdoes — the same dispatch production uses).window.finishProvisionedDeploybehind the on-screen button) runs step 3 only.Assertions that matter
syncCustomCodeChangesrequest body carriesserialized_yamlcontaining the merged dependency (http: ^1.2.0) — the pubspec was really pushed, not just presumed./deployCustomClassesafter the finish action (provision count stays at 1), and the pushfile_mapcarries no entry for the landed class — it is not re-provisioned.#success-message= "Deploy finished…"), not still-unknown.Scope
Only
e2e/finish-deploy-e2e.spec.js. No change toapp.js,src/**, orplaywright.config.js. The test starts the flow through the existing__CCC_PROVISION_CUSTOM_CLASSES__transport hook (app.jsexports it explicitly "for the browser suite"); the real confirm-deploy entry point is unreachable without a full generate→review→confirm journey, consistent with howstu380-deploy.spec.jsanddeploy-timeout-reconcile.spec.jsalready drive this transport.Verification
CCC_TEST_PORT=3109 npx playwright test e2e/finish-deploy-e2e.spec.js→ 1 passed. Unit baseline (node --test src/*.test.js) → 402 pass, 0 fail.