Files
voculinux/tests
Jatin K MalikandGitHub 8c4f743e82 fix(ui): first-run dialog response without Gtk.Dialog.do_response (#580)
* fix(ui): use Gtk response signal for first-run dialog

Overriding do_response and calling Gtk.Dialog.do_response() breaks on
modern PyGObject with "Class GtkDialog doesn't implement response".
Connect to the response signal instead so dialog.run() still works.

Fixes #566

* test(ui): cover first-run dialog response handler

Exercise connect("response") wiring and _on_response mapping so
codecov/patch is green for the #566 Gtk.Dialog.do_response fix.

* test(ui): isolate first-run dialog response coverage

Load first_run_dialog under a unique module name with a real Gtk.Dialog
stand-in so _on_response and connect("response") run under full-suite
import pollution without clobbering other tests' gi mocks.

* test(ui): cover _on_response via SimpleNamespace

Call FirstRunDialog._on_response on a stand-in object instead of
constructing Gtk.Dialog; enough for codecov/patch on the handler body.

* test(ui): map first-run responses via SimpleNamespace

Exercise FirstRunDialog._on_response for YES/NO/LATER/unknown without
constructing Gtk.Dialog.

* test(ui): collapse first-run response cases into one table

One loop covers YES/NO/LATER/unknown instead of four copy-pasted tests.

* test(ui): restore isolated first-run dialog coverage load

SimpleNamespace calls against vocalinux.ui.first_run_dialog.FirstRunDialog
fail under the full suite when earlier tests leave the class as a MagicMock.
Reload the source under a unique module name with a real Gtk.Dialog stand-in
(as in 680c5ed) so _on_response and connect("response") stay green on CI.
2026-07-24 00:44:47 -07:00
..