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 0b84f02 Add a browser test to check that tooling cards exist
0b84f02 is described below
commit 0b84f029b5a0db85a18a5e7fe873b804dc863c5b
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Apr 14 15:45:23 2025 +0100
Add a browser test to check that tooling cards exist
---
playwright/test.py | 62 ++++++++++++++++++++++++++++++++----------------------
1 file changed, 37 insertions(+), 25 deletions(-)
diff --git a/playwright/test.py b/playwright/test.py
index 30eb2cd..f278e0c 100644
--- a/playwright/test.py
+++ b/playwright/test.py
@@ -389,6 +389,43 @@ def test_login(page: sync_api.Page, credentials:
Credentials) -> None:
logging.info("Login actions completed successfully")
+def test_projects(page: sync_api.Page) -> None:
+ test_projects_01_update(page)
+ test_projects_02_check_directory(page)
+
+
+def test_projects_01_update(page: sync_api.Page) -> None:
+ logging.info("Navigating to the admin update projects page")
+ go_to_path(page, "/admin/projects/update")
+ logging.info("Admin update projects page loaded")
+
+ logging.info("Locating and activating the button to update projects")
+ update_button_locator = page.get_by_role("button", name="Update projects")
+ sync_api.expect(update_button_locator).to_be_enabled()
+ update_button_locator.click()
+
+ logging.info("Waiting for project update completion message")
+ success_message_locator = page.locator("div.status-message.success")
+ sync_api.expect(success_message_locator).to_contain_text(
+ re.compile(
+ r"Successfully added \d+ and updated \d+ committees and projects
\(PMCs and PPMCs\) with membership data"
+ )
+ )
+ logging.info("Project update completed successfully")
+
+
+def test_projects_02_check_directory(page: sync_api.Page) -> None:
+ logging.info("Navigating to the project directory page")
+ go_to_path(page, "/projects")
+ logging.info("Project directory page loaded")
+
+ logging.info("Checking for the Apache Tooling project card")
+ h3_locator = page.get_by_text("Apache Tooling", exact=True)
+ tooling_card_locator =
h3_locator.locator("xpath=ancestor::div[contains(@class, 'project-card')]")
+ sync_api.expect(tooling_card_locator).to_be_visible()
+ logging.info("Apache Tooling project card found successfully")
+
+
def test_tidy_up(page: sync_api.Page) -> None:
logging.info("Navigating to the admin delete release page")
go_to_path(page, "/admin/delete-release")
@@ -432,30 +469,5 @@ def wait_for_path(page: sync_api.Page, path: str) -> None:
logging.info(f"Current URL: {page.url}")
-def test_projects(page: sync_api.Page) -> None:
- test_projects_01_update(page)
-
-
-def test_projects_01_update(page: sync_api.Page) -> None:
- logging.info("Navigating to the admin update projects page")
- go_to_path(page, "/admin/projects/update")
- logging.info("Admin update projects page loaded")
-
- logging.info("Locating and activating the button to update projects")
- update_button_locator = page.get_by_role("button", name="Update projects")
- sync_api.expect(update_button_locator).to_be_enabled()
- update_button_locator.click()
-
- logging.info("Waiting for project update completion message")
- # Wait for a message that matches the pattern, allowing for different
numbers
- success_message_locator = page.locator("div.status-message.success")
- sync_api.expect(success_message_locator).to_contain_text(
- re.compile(
- r"Successfully added \d+ and updated \d+ committees and projects
\(PMCs and PPMCs\) with membership data"
- )
- )
- logging.info("Project update completed successfully")
-
-
if __name__ == "__main__":
main()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]