-
Notifications
You must be signed in to change notification settings - Fork 354
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
webui: fix waiting for disabled button in some tests #5327
Conversation
@@ -94,7 +94,7 @@ class TestBasic(anacondalib.VirtInstallMachineCase): | |||
i.open(step="installation-method") | |||
|
|||
# Back button should be disabled on the first screen | |||
b.wait_visible(f"#installation-back-btn:not([aria-disabled={True}]") | |||
b.wait_visible("#installation-back-btn:not([aria-disabled=false]") |
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
value = "false" if disabled else "true" |
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]")
@@ -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 comment
The 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 comment
The 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)
@@ -94,7 +94,7 @@ class TestBasic(anacondalib.VirtInstallMachineCase): | |||
i.open(step="installation-method") | |||
|
|||
# Back button should be disabled on the first screen | |||
b.wait_visible(f"#installation-back-btn:not([aria-disabled={True}]") | |||
b.wait_visible("#installation-back-btn:not([aria-disabled=false]") |
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]")
This PR was migrated to the new repository: rhinstaller/anaconda-webui#49 |
Originally the check always passed.