Files
John ChiltonandClaude Opus 5 45a66ad642 Run integration_selenium suite under Playwright
Switch the Integration Selenium job to GALAXY_TEST_DRIVER_BACKEND=playwright
and port the five files that still reached past the driver abstraction.

Most of it was already portable - only one @selenium_only in the whole
directory. The rest used self.driver directly where a protocol method
already existed: find_element_by_link_text, find_element_by_selector,
refresh, and NavigatesGalaxy.get. test_admin_dependencies and
test_toolbox_filters were already calling find_element_by_link_text a line
away from the raw By.LINK_TEXT calls.

Running the suite turned up three real gaps in the Playwright driver:

- No select_by_visible_text. The protocol only had select_by_value, which
  keys off the value attribute rather than the text shown to the user, so
  the TRS version dropdowns had nothing to call.
- switch_to_frame returned None while the Selenium side returns the frame,
  so test_allowlist_sanitization's `assert self.switch_to_frame()` failed
  against a working frame switch.
- _wait_on_condition_count was an explicit NotImplementedError; implemented
  with locator.count(), mirroring _wait_on_condition_clickable.

test_toolbox_filters asserted NoSuchElementException to show a filtered
section was gone. That is a Selenium type, and link text does not translate
faithfully - Selenium matches an anchor's rendered text, while Playwright's
text= engine matches a substring of any element, and the section title is a
span inside the anchor. It now reads the tool panel's section titles and
asserts the name is absent, which is what the test means anyway.

run_tests.sh only installed Playwright browsers when -playwright picked the
test type, so it now also installs them when the backend comes from the
environment.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 01:42:58 -04:00

31 lines
1.2 KiB
Python

from .framework import (
selenium_test,
SeleniumIntegrationTestCase,
)
class TestAdminDependencyContainers(SeleniumIntegrationTestCase):
run_as_admin = True
@selenium_test
def test_admin_containers_display(self):
admin_component = self.components.admin
self.admin_login()
self.admin_open()
self.screenshot("admin_landing")
admin_component.index.dependencies.wait_for_and_click()
self.sleep_for(self.wait_types.UX_RENDER)
# Make sure the tabs are visible
self.find_element_by_link_text("Dependencies")
self.find_element_by_link_text("Unused")
containers_link = self.find_element_by_link_text("Containers")
# Ensure that #manage-resolver-type is visible.
admin_component.manage_dependencies.resolver_type.wait_for_visible()
self.screenshot("admin_dependencies_landing")
self.move_to_and_click(containers_link)
self.sleep_for(self.wait_types.UX_RENDER)
# Ensure that #manage-container-type is visible.
self.sleep_for(self.wait_types.UX_TRANSITION)
admin_component.manage_dependencies.container_type.wait_for_visible()
self.screenshot("admin_dependencies_containers")