[frameworks/kirigami] autotests: Fix tst_menudialog not actually doing anything

Volker Krause <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 6a3f7a50832bc31978c8aa87dad3be9ab099aa50 by Volker Krause.
Committed on 05/08/2026 at 16:40.
Pushed by vkrause into branch 'master'.

Fix tst_menudialog not actually doing anything

To the extend possible, the close signal this expects is apparently not
emitted.

M  +5    -4    autotests/tst_menudialog.qml

https://invent.kde.org/frameworks/kirigami/-/commit/6a3f7a50832bc31978c8aa87dad3be9ab099aa50

diff --git a/autotests/tst_menudialog.qml b/autotests/tst_menudialog.qml
index 1efebc331..5acbbd3a3 100644
--- a/autotests/tst_menudialog.qml
+++ b/autotests/tst_menudialog.qml
@@ -51,17 +51,17 @@ TestCase {
         return null;
     }
 
-    function testClosed() {
-        const dialog = createTemporaryObject(this, menuDialogComponent);
+    function test_closed() {
+        const dialog = createTemporaryObject(menuDialogComponent, this);
         verify(dialog);
 
         const { actionA } = dialog;
 
-        const dialogClosedSpy = createTemporaryObject(this, spyComponent, {
+        const dialogClosedSpy = createTemporaryObject(spyComponent, this, {
             target: dialog,
             signalName: "closed",
         });
-        const actionSpy = createTemporaryObject(this, spyComponent, {
+        const actionSpy = createTemporaryObject(spyComponent, this, {
             target: actionA,
             signalName: "triggered",
         });
@@ -74,6 +74,7 @@ TestCase {
 
         mouseClick(delegate);
         compare(actionSpy.count, 1);
+        expectFailContinue("", "closed signal is not actually emitted")
         compare(dialogClosedSpy.count, 1);
         tryVerify(() => !dialog.visible);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.