From a990788e0e7a23abd854ff3c4562c32fa29a3fcf Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 11 Feb 2026 13:06:12 -0500 Subject: [PATCH] migrate US-008: test_workflow_sharing.py - Remove @selenium_only from redirect tests - Fix PlaywrightElement.text: use inner_text() instead of text_content() for Selenium-compatible whitespace normalization - Fix external Galaxy password handling in redirect tests Co-Authored-By: Claude Opus 4.6 --- lib/galaxy/selenium/playwright_element.py | 5 +++-- lib/galaxy_test/selenium/test_workflow_sharing.py | 8 +++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/selenium/playwright_element.py b/lib/galaxy/selenium/playwright_element.py index 2dd6fcfc340..a683cee7086 100644 --- a/lib/galaxy/selenium/playwright_element.py +++ b/lib/galaxy/selenium/playwright_element.py @@ -40,9 +40,10 @@ class PlaywrightElement: """ Get the visible text content of the element. - Maps to Playwright's text_content() method. + Uses Playwright's inner_text() to match Selenium's .text behavior + which returns rendered text with normalized whitespace. """ - content = self._element.text_content() + content = self._element.inner_text() return content.strip() if content is not None else "" def click(self) -> None: diff --git a/lib/galaxy_test/selenium/test_workflow_sharing.py b/lib/galaxy_test/selenium/test_workflow_sharing.py index d7c27c8744d..974b159a50f 100644 --- a/lib/galaxy_test/selenium/test_workflow_sharing.py +++ b/lib/galaxy_test/selenium/test_workflow_sharing.py @@ -1,6 +1,6 @@ from galaxy_test.base.workflow_fixtures import WORKFLOW_SIMPLE_CAT_TWICE from .framework import ( - selenium_only, + GALAXY_TEST_SELENIUM_USER_PASSWORD, selenium_test, SeleniumTestCase, UsesWorkflowAssertions, @@ -10,7 +10,6 @@ from .framework import ( class TestWorkflowSharingRedirect(SeleniumTestCase): ensure_registered = True - @selenium_only("Not yet migrated to support Playwright backend") @selenium_test def test_share_workflow_with_login_redirect(self): user_email = self.get_user_email() @@ -20,11 +19,10 @@ class TestWorkflowSharingRedirect(SeleniumTestCase): self.assert_error_message(contains="Must be logged in to manage Galaxy items") self.sleep_for(self.wait_types.UX_RENDER) self.components._.messages.require_login.wait_for_and_click() - self.fill_login_and_submit(user_email) + self.fill_login_and_submit(user_email, password=GALAXY_TEST_SELENIUM_USER_PASSWORD) self.wait_for_logged_in() self.wait_for_selector(".make-accessible") - @selenium_only("Not yet migrated to support Playwright backend") @selenium_test def test_export_workflow_with_login_redirect(self): user_email = self.get_user_email() @@ -34,7 +32,7 @@ class TestWorkflowSharingRedirect(SeleniumTestCase): self.assert_error_message(contains="Workflow is neither importable, nor owned by or shared with current user") self.sleep_for(self.wait_types.UX_RENDER) self.components._.messages.require_login.wait_for_and_click() - self.fill_login_and_submit(user_email) + self.fill_login_and_submit(user_email, password=GALAXY_TEST_SELENIUM_USER_PASSWORD) self.wait_for_logged_in()