This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-release.git


The following commit(s) were added to refs/heads/main by this push:
     new 15d89aa  Redirect to the correct page after resolving a vote as failed
15d89aa is described below

commit 15d89aa5e1bcbb09c6c3d9448f2d97345995f2ac
Author: Sean B. Palmer <[email protected]>
AuthorDate: Thu Apr 24 17:25:55 2025 +0100

    Redirect to the correct page after resolving a vote as failed
---
 atr/routes/candidate.py | 5 ++++-
 playwright/test.py      | 6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/atr/routes/candidate.py b/atr/routes/candidate.py
index 8193cad..e74ff9c 100644
--- a/atr/routes/candidate.py
+++ b/atr/routes/candidate.py
@@ -32,6 +32,7 @@ import atr.db as db
 import atr.db.models as models
 import atr.revision as revision
 import atr.routes as routes
+import atr.routes.draft as draft
 import atr.routes.preview as preview
 import atr.util as util
 
@@ -264,13 +265,15 @@ async def _resolve_post(session: routes.CommitterSession) 
-> response.Response:
                 release.stage = models.ReleaseStage.RELEASE
                 release.phase = models.ReleasePhase.RELEASE_PREVIEW
                 success_message = "Vote marked as passed"
+                destination = preview.deploy_release
             else:
                 release.phase = models.ReleasePhase.RELEASE_CANDIDATE_DRAFT
                 success_message = "Vote marked as failed"
+                destination = draft.compose
 
     await _resolve_post_files(project_name, release, source, vote_result, 
session.uid)
     return await session.redirect(
-        preview.deploy_release, success=success_message, 
project_name=project_name, version_name=release.version
+        destination, success=success_message, project_name=project_name, 
version_name=release.version
     )
 
 
diff --git a/playwright/test.py b/playwright/test.py
index 8ad0f22..45775d6 100644
--- a/playwright/test.py
+++ b/playwright/test.py
@@ -180,14 +180,14 @@ def lifecycle_04_start_vote(page: sync_api.Page, 
credentials: Credentials, versi
     sync_api.expect(submit_button_locator).to_be_enabled()
     submit_button_locator.click()
 
-    logging.info("Waiting for navigation to /candidate/resolve after 
submitting vote email")
-    wait_for_path(page, "/candidate/resolve")
+    logging.info(f"Waiting for navigation to 
/resolve/tooling-test-example/{version_name} after submitting vote email")
+    wait_for_path(page, f"/resolve/tooling-test-example/{version_name}")
     logging.info("Vote initiation actions completed successfully")
 
 
 def lifecycle_05_resolve_vote(page: sync_api.Page, credentials: Credentials, 
version_name: str) -> None:
     logging.info(f"Navigating to the candidate resolve page for 
tooling-test-example {version_name}")
-    go_to_path(page, "/candidate/resolve")
+    go_to_path(page, f"/resolve/tooling-test-example/{version_name}")
     logging.info("Candidate resolve page loaded successfully")
 
     logging.info(f"Locating the form to resolve the vote for 
tooling-test-example {version_name}")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to