-
Notifications
You must be signed in to change notification settings - Fork 39
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
QApplication
is stale in functional tests
#2273
Comments
cfm
added a commit
that referenced
this issue
Oct 29, 2024
… of one or more sources This is a complete rewrite of this test, which now (a) distinguishes between single- and multi-select behavior and (b) checks that the individual sources selected for deletion are confirmed and deleted, not only the *number* of sources selected. This includes a workaround for #2273. Here we also change securedrop_client.gui.widgets.BatchActionToolbar.on_action_triggered() to call QDialog.open(), which is modal with QDialog.setModal(), rather than QDialog.exec(), which is modal *and* blocking, which blocks pytest timers as well as the main event loop.
cfm
added a commit
that referenced
this issue
Oct 29, 2024
… of one or more sources This is a complete rewrite of this test, which now (a) distinguishes between single- and multi-select behavior and (b) checks that the individual sources selected for deletion are confirmed and deleted, not only the *number* of sources selected. This includes a workaround for #2273. Here we also change securedrop_client.gui.widgets.BatchActionToolbar.on_action_triggered() to call QDialog.open(), which is modal with QDialog.setModal(), rather than QDialog.exec(), which is modal *and* blocking, which blocks pytest timers as well as the main event loop.
cfm
added a commit
that referenced
this issue
Oct 29, 2024
… of one or more sources This is a complete rewrite of this test, which now (a) distinguishes between single- and multi-select behavior and (b) checks that the individual sources selected for deletion are confirmed and deleted, not only the *number* of sources selected. This includes a workaround for #2273. Here we also change securedrop_client.gui.widgets.BatchActionToolbar.on_action_triggered() to call QDialog.open(), which is modal with QDialog.setModal(), rather than QDialog.exec(), which is modal *and* blocking, which blocks pytest timers as well as the main event loop.
cfm
added a commit
that referenced
this issue
Oct 29, 2024
… of one or more sources This is a complete rewrite of this test, which now (a) distinguishes between single- and multi-select behavior and (b) checks that the individual sources selected for deletion are confirmed and deleted, not only the *number* of sources selected. This includes a workaround for #2273. Here we also change securedrop_client.gui.widgets.BatchActionToolbar.on_action_triggered() to call QDialog.open(), which is modal with QDialog.setModal(), rather than QDialog.exec(), which is modal *and* blocking, which blocks pytest timers as well as the main event loop.
cfm
added a commit
that referenced
this issue
Oct 29, 2024
… of one or more sources This is a complete rewrite of this test, which now (a) distinguishes between single- and multi-select behavior and (b) checks that the individual sources selected for deletion are confirmed and deleted, not only the *number* of sources selected. This includes a workaround for #2273. Here we also change securedrop_client.gui.widgets.BatchActionToolbar.on_action_triggered() to call QDialog.open(), which is modal with QDialog.setModal(), rather than QDialog.exec(), which is modal *and* blocking, which blocks pytest timers as well as the main event loop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given—
securedrop-client/client/securedrop_client/gui/base/dialogs.py
Line 52 in 56f1c0d
—after calling
open()
on some subclass ofModalDialog
, it should be possible to retrieve it in a test withQApplication.instance().activeModalWidget()
, but this method always returnsNone
.Even iterating through
QApplication.topLevelWidgets()
orQApplication.allWidgets()
returns can return a stale instance of the modal dialog.The text was updated successfully, but these errors were encountered: