sbp commented on code in PR #1186:
URL:
https://github.com/apache/tooling-trusted-releases/pull/1186#discussion_r3125269390
##########
playwright/test.py:
##########
@@ -573,6 +579,46 @@ def test_all(page: Page, credentials: Credentials,
skip_slow: bool) -> None:
logging.info(f"Tests took {round(finish - start, 3)} seconds")
+def test_archive_01_banner_absent_when_active(page: Page, credentials:
Credentials) -> None:
Review Comment:
Heh, yeah, it's the other way around! The e2e tests are better for new
things because we can more easily run subsets of what we add there. We try to
keep Playwright working and compatible only, although it should also absorb any
particularly significant features.
##########
tests/e2e/tokens/helpers.py:
##########
@@ -26,7 +26,7 @@
def delete_token_by_label(page: Page, label: str) -> None:
row = get_token_row_by_label(page, label)
if row.count() > 0:
- row.get_by_role("button", name="Delete").click()
Review Comment:
Ah, okay, no problem. I was only wondering why the tests changed but the
code didn't!
##########
atr/get/projects.py:
##########
@@ -94,28 +95,50 @@ async def add_project(
@get.typed
-async def projects(_session: web.Public, _projects: Literal["projects"]) ->
str:
+async def projects(session: web.Public, _projects: Literal["projects"]) -> str:
"""
URL: /projects
Main project directory page.
"""
async with db.session() as data:
- projects = await
data.project(_committee=True).order_by(sql.Project.name).all()
-
- delete_forms: dict[str, htm.Element] = {}
- for project in projects:
- delete_forms[str(project.key)] = await form.render(
- model_cls=shared.projects.DeleteSelectedProject,
- action=util.as_url(post.projects.delete),
- form_classes=".d-inline-block.m-0",
- submit_classes="btn-sm btn-outline-danger",
- submit_label="Delete project",
- empty=True,
- defaults={"project_key": str(project.key)},
- confirm="Are you sure you want to delete this project? This cannot
be undone.",
- )
+ projects = await data.project(_committee=True,
_releases=True).order_by(sql.Project.name).all()
+
+ committee_project_counts: Counter[str] = Counter(str(p.committee.key) for
p in projects if p.committee)
Review Comment:
I was just thinking about it being consistent with its handler, as part of
the "everything should have `ACTIVE` checks" phase of the review. I think the
idea is the opposite, that we _can't_ archive if there are ongoing releases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]