-
Notifications
You must be signed in to change notification settings - Fork 74
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: add checks for avoiding a timing issue, that is the path dropdown list needs more time to load #1727
Merged
Merged
test: add checks for avoiding a timing issue, that is the path dropdown list needs more time to load #1727
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I'm sceptical about:
set_input_text
already waits until the input has the expected value, so this is entirely redundant. Either that existing wait in testlib.py isn't enough -- then we should fix it there for all cases. Or it is redundant, then this is nothing more than a hidden "sleep(0.1)", and the real fix is to wait for something else.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, set_input_text already waits until the input has the expected value. But, there will be a dropdown list for file path prompt as the input there is a FileAutoComplete. This line aims to make sure the input text is shown in the dropdown list. We don't check the dropdown list in set_input_text. And it seems that, if I don't add this line, the dropdown list is still there after b.click("#vm-subVmTest1-filesystems-modal-source button:nth-child(1)"). Here is also a picture if I remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late answer, I've been sick for two weeks 😢 Yes, I understand the "wait for /tmp to be in dropdown" approach. But the wait_in_text() is not specific enough for that -- it covers the whole input group, i.e. including the input line. Doesn't it also catch that
/tmp
there? I.e. my question is, this selector needs to be more specific to the select, with.pf-v5-c-menu
or similar.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked with cockpit-machines-316-1.fc40.noarch. #vm-subVmTest1-filesystems-modal-source doesn't include the input line, and the input line is actual in another div, and the id of the input line is "pf-select-toggle-id-26-select-typeahead", which is automatically generated. However, #vm-subVmTest1-filesystems-modal-source-group contains both of them that mentioned above, Maybe you means that? Are there some changes about the input line and the expand list in the newest vision?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, there are no changes. The main thing is that the selectors are not understandable, and could use some comments what they actually refer to.
Thanks for the explanation! Yes, please rebase, and let's get this in.