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 <noreply@anthropic.com>
This commit is contained in:
John Chilton
2026-02-12 14:55:55 -05:00
co-authored by Claude Opus 4.6
parent 4afc538ca1
commit a990788e0e
2 changed files with 6 additions and 7 deletions
+3 -2
View File
@@ -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:
@@ -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()