test: move select_pf5 from cockpit-files to Cockpit
The new PatternFly Select uses a Menu component for the entries so the selectors changed. This test function comes from cockpit-files.
This commit is contained in:
parent
038d7836fe
commit
086c24c43e
|
@ -556,6 +556,11 @@ class Browser:
|
|||
else:
|
||||
self.wait_text(f"{selector} .pf-v5-c-select__toggle-text", value)
|
||||
|
||||
def select_PF5(self, selector_button: str, selector: str, value):
|
||||
self.click(f"{selector_button}:not([disabled]):not([aria-disabled=true])")
|
||||
select_entry = f"{selector} ul button:contains('{value}')"
|
||||
self.click(select_entry)
|
||||
|
||||
def set_input_text(self, selector: str, val: str, append: bool = False, value_check: bool = True, blur: bool = True):
|
||||
self.focus(selector)
|
||||
if not append:
|
||||
|
|
|
@ -6,3 +6,4 @@ Browser.get_checked
|
|||
# kept as being potentially useful in the future
|
||||
Browser.upload_file
|
||||
Browser.wait_attr_not_contains
|
||||
Browser.select_PF5
|
||||
|
|
Loading…
Reference in New Issue