-
Notifications
You must be signed in to change notification settings - Fork 352
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
webui: fix waiting for disabled button in some tests #5327
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,8 +109,8 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers): | |
s.modify_storage() | ||
# Run the tool | ||
b.click("#modify-storage-modal-modify-btn") | ||
b.wait_visible(f"#modify-storage-modal-modify-btn:not([aria-disabled={True}]") | ||
b.wait_visible(f"#storage-modified-modal-rescan-btn") | ||
b.wait_visible("#modify-storage-modal-modify-btn:not([aria-disabled=false]") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is pretty useless. Before clicking the button should be always enabled, then get disabled and then re-enabled. So now you 're checking either the pre-disabled state, or the post-disabled state. this is not deterministic, I think we can drop it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is checking the disabled state (I read it disabled is not false) |
||
b.wait_visible("#storage-modified-modal-rescan-btn") | ||
b.click("#storage-modified-modal-ignore-btn") | ||
# The disk is still selected | ||
s.check_single_disk_destination(disk, "16.1 GB") | ||
|
@@ -120,8 +120,8 @@ class TestStorage(anacondalib.VirtInstallMachineCase, StorageHelpers): | |
|
||
s.modify_storage() | ||
b.click("#modify-storage-modal-modify-btn") | ||
b.wait_visible(f"#modify-storage-modal-modify-btn:not([aria-disabled={True}]") | ||
b.wait_visible(f"#storage-modified-modal-rescan-btn") | ||
b.wait_visible("#modify-storage-modal-modify-btn:not([aria-disabled=false]") | ||
b.wait_visible("#storage-modified-modal-rescan-btn") | ||
b.click("#storage-modified-modal-rescan-btn") | ||
# The disk is still selected | ||
s.check_single_disk_destination(disk, "16.1 GB") | ||
|
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 does not allign now with the comment in the line above.
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 think it actually does (and I tested it), I was surprised by that as well, but:
anaconda/ui/webui/test/helpers/installer.py
Line 113 in 1c1cce6
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 was just confused by the double negation.
Can you please iron it out a bit:
b.wait_visible(f"#installation-back-btn[aria-disabled=true]")