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

test: Wait for image search to be over in CreateContainer tests #1885

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

mvollmer
Copy link
Member

No description provided.

@mvollmer mvollmer removed the no-test label Oct 18, 2024
@mvollmer mvollmer marked this pull request as ready for review October 18, 2024 07:54
Comment on lines 2803 to 2804
b.wait_in_text(".pf-v5-c-select__menu-list", "No images found")
b.click('button.pf-v5-c-toggle-group__button:contains("Local")')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember much of the history here, but switching to the "Local" filter is also useful coverage -- that seems to have gone now?

Could you do both, first wait for the "All registries" view to update, and then switch to Local and ensure that this works as well?

Unless of course we cover this somewhere else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you do both, first wait for the "All registries" view to update, and then switch to Local and ensure that this works as well?

Yes, let's do this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember much of the history here, but switching to the "Local" filter is also useful coverage -- that seems to have gone now?

I remember you made these changes when we introduced BiDi, but could only find https://github.com/cockpit-project/cockpit-podman/pull/1834/files#diff-e86755442bc7d21f0414014b3c356b54d6650e8ed9bffcc4f5858d1154df80e1R1801

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, there are two instances of this pattern. I'll change the second one as well.

@martinpitt martinpitt changed the title test: Wait for image search to be over in CreateContainer tests @mvollmer test: Wait for image search to be over in CreateContainer tests Oct 18, 2024
@mvollmer mvollmer force-pushed the dbg-create-container branch 2 times, most recently from 4e99a71 to c4b718a Compare October 18, 2024 09:16
For example, one test was typing into the image name input and then
immmediately proceeded to select an image from the dropdown. The
selected image would already be in the dropdown from the start and
thus it would be selected without waiting for the search to reveal it.

The actual search would only start 300ms later and would at that point
reset the image selection. If the test wasn't already done with the
dialog at that point, the "Create button" would then be disabled.

Let's just wait for the searching to be done before continuing, by
observing unmatched images disappear from the list.
@mvollmer
Copy link
Member Author

Looks pretty good now. TestApplication.testHealthcheckUser on ubuntu-2204 flakes, but that's for another day/PR, I'd say.

Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, danke! And yes, the ubuntu healthcheck flake has been around forever, and is unrelated.

@martinpitt martinpitt merged commit c9d3eca into cockpit-project:main Oct 18, 2024
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants