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 a26865b Integrate vote tabulation more thoroughly and update the browser tests a26865b is described below commit a26865b8da7d008636d8052dbf0355290f297416 Author: Sean B. Palmer <s...@miscoranda.com> AuthorDate: Mon Jun 30 20:06:53 2025 +0100 Integrate vote tabulation more thoroughly and update the browser tests --- atr/routes/vote.py | 2 +- atr/templates/check-selected-candidate-forms.html | 9 --------- atr/templates/check-selected-release-info.html | 10 +++++++++- atr/templates/check-selected-vote-email.html | 1 - atr/templates/vote-tabulate.html | 10 ++++------ playwright/test.py | 4 ++-- 6 files changed, 16 insertions(+), 20 deletions(-) diff --git a/atr/routes/vote.py b/atr/routes/vote.py index 7b297f1..5742ba5 100644 --- a/atr/routes/vote.py +++ b/atr/routes/vote.py @@ -125,7 +125,7 @@ async def selected(session: routes.CommitterSession, project_name: str, version_ form = await CastVoteForm.create_form() hidden_form = await util.HiddenFieldForm.create_form() hidden_form.hidden_field.data = archive_url or "" - hidden_form.submit.label.text = "Tabulate votes" + hidden_form.submit.label.text = "Resolve vote" return await compose.check( session, release, diff --git a/atr/templates/check-selected-candidate-forms.html b/atr/templates/check-selected-candidate-forms.html index b562a1a..2fc8d09 100644 --- a/atr/templates/check-selected-candidate-forms.html +++ b/atr/templates/check-selected-candidate-forms.html @@ -43,12 +43,3 @@ <div class="col-md-9 offset-md-3">{{ form.submit(class_="btn btn-primary") }}</div> </div> </form> - -<h2 id="resolve-vote">Resolve vote</h2> -<p>Press the button below to automatically tabulate the current votes, and display a form to resolve the vote.</p> -<form action="{{ as_url(routes.vote.tabulate, project_name=release.project.name, version_name=release.version) }}" - method="post" - class="mb-0"> - {{ hidden_form.hidden_tag() }} - {{ hidden_form.submit(class="btn btn-sm btn-outline-primary") }} -</form> diff --git a/atr/templates/check-selected-release-info.html b/atr/templates/check-selected-release-info.html index 44576be..bf5a0a1 100644 --- a/atr/templates/check-selected-release-info.html +++ b/atr/templates/check-selected-release-info.html @@ -69,7 +69,15 @@ class="btn btn-primary"><i class="bi bi-download me-1"></i> Download files</a> <a href="{{ as_url(routes.candidate.view, project_name=release.project.name, version_name=release.version) }}" class="btn btn-secondary"><i class="bi bi-eye me-1"></i> View files</a> - <a href="#resolve-vote" class="btn btn-success"><i class="bi bi-clipboard-check me-1"></i> Resolve vote</a> + <form action="{{ as_url(routes.vote.tabulate, project_name=release.project.name, version_name=release.version) }}" + method="post" + class="mb-0"> + {{ hidden_form.hidden_tag() }} + <button type="submit" class="btn btn-success"> + <i class="bi bi-clipboard-check me-1"></i> Resolve vote + </button> + </form> + {% endif %} </div> </div> diff --git a/atr/templates/check-selected-vote-email.html b/atr/templates/check-selected-vote-email.html index 57c6c86..457d87d 100644 --- a/atr/templates/check-selected-vote-email.html +++ b/atr/templates/check-selected-vote-email.html @@ -45,7 +45,6 @@ rel="noopener" target="_blank" title="View vote email thread in the archive (opens in new window)">View archived vote thread <i class="bi bi-box-arrow-up-right ms-1"></i></a> - <a class="btn btn-sm btn-outline-secondary" href="#resolve-vote">Resolve vote</a> </div> {% elif task_mid %} <p class="mt-2 mb-0 text-muted ps-4">Could not retrieve archive URL for this message.</p> diff --git a/atr/templates/vote-tabulate.html b/atr/templates/vote-tabulate.html index b3957b0..bf5a229 100644 --- a/atr/templates/vote-tabulate.html +++ b/atr/templates/vote-tabulate.html @@ -1,11 +1,11 @@ {% extends "layouts/base.html" %} {% block title %} - Tabulated votes ~ ATR + Resolve vote ~ ATR {% endblock title %} {% block description %} - Tabulated votes for a release. + Resolve vote for a release. {% endblock description %} {% block content %} @@ -14,14 +14,12 @@ class="atr-back-link">← Back to Vote for {{ release.short_display_name }}</a> </p> - <h1>Tabulated votes</h1> + <h1>Resolve vote for {{ release.short_display_name }}</h1> + <h2>Tabulated votes</h2> <p> This page attempts to automatically tabulate votes from the vote email thread for you. It is not always possible to parse the votes accurately, so you should check the results carefully. <strong>Do not use this page to decide how to resolve the vote without manual review.</strong> </p> - - <h2>Votes in detail</h2> - {% if tabulated_votes %} <table class="table table-striped"> <thead> diff --git a/playwright/test.py b/playwright/test.py index 618939e..1e365b1 100644 --- a/playwright/test.py +++ b/playwright/test.py @@ -206,11 +206,11 @@ def lifecycle_05_resolve_vote(page: sync_api.Page, credentials: Credentials, ver if not banner_found: logging.warning("Vote initiation banner not detected after 15s, proceeding anyway") - logging.info("Locating the 'Tabulate votes' button/form") + logging.info("Locating the 'Resolve vote' button") tabulate_form_locator = page.locator(f'form[action="/vote/tooling-test-example/{version_name}/tabulate"]') sync_api.expect(tabulate_form_locator).to_be_visible() - tabulate_button_locator = tabulate_form_locator.locator('input[type="submit"][value="Tabulate votes"]') + tabulate_button_locator = tabulate_form_locator.locator('button[type="submit"]:has-text("Resolve vote")') sync_api.expect(tabulate_button_locator).to_be_enabled() logging.info("Clicking 'Tabulate votes' button") tabulate_button_locator.click() --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@tooling.apache.org For additional commands, e-mail: commits-h...@tooling.apache.org