diff --git a/test/check-application b/test/check-application index 4ebd8a7cb..0c6bd26af 100755 --- a/test/check-application +++ b/test/check-application @@ -1732,14 +1732,13 @@ class TestApplication(testlib.MachineCase): # Local results found b.set_input_text("#create-image-image-select-typeahead", "registry") + b.wait_text("button.pf-v5-c-select__menu-item", IMG_REGISTRY_LATEST) if auth: b.assert_pixels(".pf-v5-c-modal-box", "image-select", skip_layouts=["rtl"]) - b.click('button.pf-v5-c-toggle-group__button:contains("Local")') - b.wait_text("button.pf-v5-c-select__menu-item", IMG_REGISTRY_LATEST) # Local registry - b.set_input_text("#create-image-image-select-typeahead", "my-busybox") b.click('button.pf-v5-c-toggle-group__button:contains("localhost:5000")') + b.set_input_text("#create-image-image-select-typeahead", "my-busybox") b.wait_text("button.pf-v5-c-select__menu-item:not(.pf-m-disabled)", "localhost:5000/my-busybox") # Select image @@ -1799,6 +1798,11 @@ class TestApplication(testlib.MachineCase): b.set_input_text("#run-image-dialog-name", container_name) b.set_input_text("#create-image-image-select-typeahead", IMG_BUSYBOX) + # we want to switch to "Local", but to make waiting for IMG_BUSYBOX race-free, we first need to + # switch to another view; different images have different registries, so don't assume their name, just + # that at least one more exists + b.click('.image-search-footer .pf-v5-c-toggle-group__item:nth-of-type(3) button') + b.wait_in_text(".pf-v5-c-select__menu-list", "No images found") b.click('button.pf-v5-c-toggle-group__button:contains("Local")') b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_BUSYBOX}")') @@ -1865,7 +1869,7 @@ class TestApplication(testlib.MachineCase): if auth: # Check that the checkbox is enabled when clicked on the field b.wait_visible("#run-image-dialog-cpu-priority-checkbox:not(:checked)") - b.click('#run-image-cpu-priority') + b.mouse('#run-image-cpu-priority button[aria-label="Decrease CPU shares"]', "click") b.wait_visible("#run-image-dialog-cpu-priority-checkbox:checked") b.set_checked("#run-image-dialog-cpu-priority-checkbox", False) @@ -1952,10 +1956,8 @@ class TestApplication(testlib.MachineCase): b.wait_not_present('#run-image-dialog-volume-0-selinux') b.set_file_autocomplete_val("#run-image-dialog-volume-0 .pf-v5-c-select", rodir) - b.key("Enter") b.set_input_text('#run-image-dialog-volume-0-container-path', '/tmp/ro') ro_label = m.execute(f"ls -dZ {rodir}").split(" ")[0] - b.key("Enter") b.click('.volume-form .btn-add') b.wait_visible('#run-image-dialog-volume-1') b.click('#run-image-dialog-volume-1-btn-close') @@ -1973,7 +1975,6 @@ class TestApplication(testlib.MachineCase): b.wait_not_present('#run-image-dialog-volume-2-selinux') b.set_file_autocomplete_val("#run-image-dialog-volume-2 .pf-v5-c-select", rwdir) - b.key("Enter") b.set_input_text('#run-image-dialog-volume-2-container-path', '/tmp/rw') rw_label = m.execute(f"ls -dZ {rwdir}").split(" ")[0] @@ -2734,6 +2735,11 @@ class TestApplication(testlib.MachineCase): b.set_input_text("#run-image-dialog-name", container_name) b.set_input_text("#create-image-image-select-typeahead", IMG_BUSYBOX_LATEST) + # we want to switch to "Local", but to make waiting for IMG_BUSYBOX race-free, we first need to + # switch to another view; different images have different registries, so don't assume their name, just + # that at least one more exists + b.click('.image-search-footer .pf-v5-c-toggle-group__item:nth-of-type(3) button') + b.wait_in_text(".pf-v5-c-select__menu-list", "No images found") b.click('button.pf-v5-c-toggle-group__button:contains("Local")') b.click(f'button.pf-v5-c-select__menu-item:contains("{IMG_BUSYBOX_LATEST}")') b.click('.pf-v5-c-modal-box__footer #create-image-create-run-btn')