Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some test fixes #1834

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions test/check-application
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}")')

Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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')
Expand All @@ -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]

Expand Down Expand Up @@ -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')
Expand Down