From 2d664eacb1c569cdcf1fd31e1cb44be642961b00 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Fri, 22 Dec 2023 15:49:35 -0500
Subject: [PATCH] misc: fix QML tests

Moreover, add two accounts (for ChatView testing)

Change-Id: Ifb2a45002dd9e86921868257124561764e9b94c5
---
 src/app/filestosendlistmodel.cpp              |    3 +-
 src/app/mainview/components/ChatView.qml      |    1 +
 .../mainview/components/ChatViewHeader.qml    |    2 +
 .../components/CreateAccountPage.qml          |   18 +-
 tests/qml/main.cpp                            |   49 +-
 tests/qml/resources.qrc                       |    1 -
 tests/qml/src/tst_ChatView.qml                |   55 +
 .../{to_fix => src}/tst_ChatViewFooter.qml    |    0
 .../tst_FilesToSendContainer.qml              |    6 +-
 tests/qml/src/tst_LocalAccount.qml            |   32 -
 .../{to_fix => src}/tst_PresenceIndicator.qml |    0
 .../qml/src/tst_SettingsMaterialTextEdit.qml  |   61 -
 tests/qml/src/tst_WizardView.qml              |  132 +-
 tests/qml/to_fix/tst_WizardView.qml           | 1589 -----------------
 14 files changed, 198 insertions(+), 1751 deletions(-)
 create mode 100644 tests/qml/src/tst_ChatView.qml
 rename tests/qml/{to_fix => src}/tst_ChatViewFooter.qml (100%)
 rename tests/qml/{to_fix => src}/tst_FilesToSendContainer.qml (87%)
 delete mode 100644 tests/qml/src/tst_LocalAccount.qml
 rename tests/qml/{to_fix => src}/tst_PresenceIndicator.qml (100%)
 delete mode 100644 tests/qml/src/tst_SettingsMaterialTextEdit.qml
 delete mode 100644 tests/qml/to_fix/tst_WizardView.qml

diff --git a/src/app/filestosendlistmodel.cpp b/src/app/filestosendlistmodel.cpp
index 75be8ddbf..8b60a2bfe 100644
--- a/src/app/filestosendlistmodel.cpp
+++ b/src/app/filestosendlistmodel.cpp
@@ -50,8 +50,9 @@ Q_INVOKABLE void
 FilesToSendListModel::addToPending(QString filePath)
 {
     auto fileInfo = QFileInfo(filePath);
-    if (!fileInfo.exists())
+    if (!fileInfo.exists()) {
         return;
+    }
 
     // QImageReader will treat .gz file (Jami archive) as svgz image format
     // so decideFormatFromContent is needed
diff --git a/src/app/mainview/components/ChatView.qml b/src/app/mainview/components/ChatView.qml
index 0bb64705f..96ba2492b 100644
--- a/src/app/mainview/components/ChatView.qml
+++ b/src/app/mainview/components/ChatView.qml
@@ -111,6 +111,7 @@ Rectangle {
 
         ChatViewHeader {
             id: chatViewHeader
+            objectName: "chatViewHeader"
 
             Layout.alignment: Qt.AlignHCenter
             Layout.fillWidth: true
diff --git a/src/app/mainview/components/ChatViewHeader.qml b/src/app/mainview/components/ChatViewHeader.qml
index 5b89c34cf..c0b7028fb 100644
--- a/src/app/mainview/components/ChatViewHeader.qml
+++ b/src/app/mainview/components/ChatViewHeader.qml
@@ -224,6 +224,7 @@ Rectangle {
 
         JamiPushButton {
             id: sendContactRequestButton
+            objectName: "sendContactRequestButton"
 
             visible: CurrentConversation.isTemporary || CurrentConversation.isBanned
             source: JamiResources.add_people_24dp_svg
@@ -234,6 +235,7 @@ Rectangle {
 
         JamiPushButton {
             id: detailsButton
+            objectName: "detailsButton"
 
             checkable: true
             checked: extrasPanel.isOpen(ChatView.SwarmDetailsPanel)
diff --git a/src/app/wizardview/components/CreateAccountPage.qml b/src/app/wizardview/components/CreateAccountPage.qml
index b478916a1..611fb5d7c 100644
--- a/src/app/wizardview/components/CreateAccountPage.qml
+++ b/src/app/wizardview/components/CreateAccountPage.qml
@@ -47,7 +47,7 @@ Rectangle {
     }
 
     function clearAllTextFields() {
-        chooseUsernameButton.enabled = true;
+        joinJamiButton.enabled = true;
         encryptButton.enabled = true;
         customizeButton.enabled = true;
         usernameEdit.dynamicText = "";
@@ -220,9 +220,9 @@ Rectangle {
                             }
                         }
 
-                        KeyNavigation.tab: chooseUsernameButton
+                        KeyNavigation.tab: joinJamiButton
                         KeyNavigation.up: usernameEdit
-                        KeyNavigation.down: chooseUsernameButton
+                        KeyNavigation.down: joinJamiButton
                     }
 
                     objectName: "usernameEdit"
@@ -266,7 +266,7 @@ Rectangle {
                 }
 
                 MaterialButton {
-                    id: chooseUsernameButton
+                    id: joinJamiButton
                     z: -1
 
                     TextMetrics {
@@ -274,10 +274,10 @@ Rectangle {
                         font.weight: Font.Bold
                         font.pixelSize: JamiTheme.wizardViewButtonFontPixelSize
                         font.capitalization: Font.AllUppercase
-                        text: chooseUsernameButton.text
+                        text: joinJamiButton.text
                     }
 
-                    objectName: "chooseUsernameButton"
+                    objectName: "joinJamiButton"
 
                     Layout.alignment: Qt.AlignCenter
                     Layout.topMargin: JamiTheme.wizardViewBlocMarginSize
@@ -338,7 +338,7 @@ Rectangle {
                         toolTipText: JamiStrings.encryptWithPassword
 
                         KeyNavigation.tab: customizeButton
-                        KeyNavigation.up: chooseUsernameButton
+                        KeyNavigation.up: joinJamiButton
                         KeyNavigation.down: backButton
                         KeyNavigation.right: customizeButton
 
@@ -371,7 +371,7 @@ Rectangle {
                         toolTipText: JamiStrings.customizeYourProfile
 
                         KeyNavigation.tab: backButton
-                        KeyNavigation.up: chooseUsernameButton
+                        KeyNavigation.up: joinJamiButton
                         KeyNavigation.left: encryptButton
                         KeyNavigation.down: backButton
 
@@ -393,7 +393,7 @@ Rectangle {
                     visible: false
 
                     onJoinClicked: {
-                        chooseUsernameButton.enabled = false;
+                        joinJamiButton.enabled = false;
                         customizeButton.enabled = false;
                         encryptButton.enabled = false;
                     }
diff --git a/tests/qml/main.cpp b/tests/qml/main.cpp
index da9d78fae..69315a274 100644
--- a/tests/qml/main.cpp
+++ b/tests/qml/main.cpp
@@ -22,6 +22,10 @@
 #include "qmlregister.h"
 #include "systemtray.h"
 #include "videoprovider.h"
+#include "api/profile.h"
+#include "api/account.h"
+#include "api/conversationmodel.h"
+#include "api/contactmodel.h"
 
 #include <atomic>
 
@@ -30,6 +34,7 @@
 #include <QQmlEngine>
 #include <QScopedPointer>
 #include <QtQuickTest/quicktest.h>
+#include <QSignalSpy>
 
 #ifdef WITH_WEBENGINE
 #include <QtWebEngineCore>
@@ -40,6 +45,9 @@
 #include <windows.h>
 #endif
 
+#include <thread>
+using namespace std::literals::chrono_literals;
+
 class Setup : public QObject
 {
     Q_OBJECT
@@ -49,6 +57,16 @@ public:
         : muteDaemon_(muteDaemon)
     {}
 
+    ~Setup()
+    {
+        QSignalSpy accountRemovedSpy(&lrcInstance_->accountModel(), &AccountModel::accountRemoved);
+        lrcInstance_->accountModel().removeAccount(aliceId);
+        lrcInstance_->accountModel().removeAccount(bobId);
+        while (accountRemovedSpy.count() != 2) {
+            accountRemovedSpy.wait();
+        }
+    }
+
 public Q_SLOTS:
 
     /*
@@ -69,6 +87,31 @@ public Q_SLOTS:
 
         auto downloadPath = settingsManager_->getValue(Settings::Key::DownloadPath);
         lrcInstance_->accountModel().downloadDirectory = downloadPath.toString() + "/";
+
+        // Create 2 Account
+        QSignalSpy accountStatusChangedSpy(&lrcInstance_->accountModel(),
+                                        &AccountModel::accountStatusChanged);
+
+        QSignalSpy accountAddedSpy(&lrcInstance_->accountModel(), &AccountModel::accountAdded);
+        aliceId = lrcInstance_->accountModel().createNewAccount(profile::Type::JAMI, "Alice");
+        accountAddedSpy.wait(15000);
+        QCOMPARE(accountAddedSpy.count(), 1);
+
+        bobId = lrcInstance_->accountModel().createNewAccount(profile::Type::JAMI, "Bob");
+        accountAddedSpy.wait(15000);
+        QCOMPARE(accountAddedSpy.count(), 2);
+
+        // Create a conversation
+        auto& aliceInfo = lrcInstance_->accountModel().getAccountInfo(aliceId);
+        auto& bobInfo = lrcInstance_->accountModel().getAccountInfo(bobId);
+        ConversationModel* bobCM = bobInfo.conversationModel.get();
+        QSignalSpy conversationReqSpy(&*bobCM, &ConversationModel::newConversation);
+        contact::Info bobContact;
+        bobContact.profileInfo.uri = bobInfo.profileInfo.uri;
+        bobContact.profileInfo.type = profile::Type::TEMPORARY;
+        aliceInfo.contactModel->addContact(bobContact);
+        conversationReqSpy.wait(15000);
+        QCOMPARE(conversationReqSpy.count(), 1);
     }
 
     /*
@@ -83,7 +126,9 @@ public Q_SLOTS:
      */
     void qmlEngineAvailable(QQmlEngine* engine)
     {
-        lrcInstance_->set_currentAccountId();
+        lrcInstance_->set_currentAccountId(aliceId);
+        auto& aliceInfo = lrcInstance_->accountModel().getAccountInfo(aliceId);
+        lrcInstance_->set_selectedConvUid(aliceInfo.conversationModel->getConversations()[0].uid);
 
         // Expose custom types to the QML engine.
         Utils::registerTypes(engine,
@@ -119,6 +164,8 @@ private:
     ScreenInfo screenInfo_;
 
     bool muteDaemon_ {false};
+    QString aliceId;
+    QString bobId;
 };
 
 int
diff --git a/tests/qml/resources.qrc b/tests/qml/resources.qrc
index 969b3a28c..ca3275042 100644
--- a/tests/qml/resources.qrc
+++ b/tests/qml/resources.qrc
@@ -1,6 +1,5 @@
 <RCC>
     <qresource prefix="/">
-        <file>src/tst_LocalAccount.qml</file>
         <file>src/tst_WizardView.qml</file>
         <file>src/tst_NewSwarmPage.qml</file>
         <file>src/tst_MessageOptions.qml</file>
diff --git a/tests/qml/src/tst_ChatView.qml b/tests/qml/src/tst_ChatView.qml
new file mode 100644
index 000000000..e735ba321
--- /dev/null
+++ b/tests/qml/src/tst_ChatView.qml
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2021-2023 Savoir-faire Linux Inc.
+ * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
+import QtQuick
+import QtTest
+
+import net.jami.Adapters 1.1
+import net.jami.Models 1.1
+import net.jami.Constants 1.1
+import net.jami.Enums 1.1
+
+import "../../../src/app/"
+import "../../../src/app/mainview"
+import "../../../src/app/mainview/components"
+import "../../../src/app/commoncomponents"
+
+ListSelectionView {
+    id: viewNode
+    objectName: "ConversationView"
+    managed: false
+
+    leftPaneItem: Rectangle {}
+
+    rightPaneItem: ChatView {
+        id: uut
+
+        inCallView: false
+
+        TestCase {
+            name: "Check basic visibility for header buttons"
+            function test_checkBasicVisibility() {
+                var chatviewHeader = findChild(uut, "chatViewHeader")
+                var detailsButton = findChild(chatviewHeader, "detailsButton")
+                var sendContactRequestButton = findChild(chatviewHeader, "sendContactRequestButton")
+                compare(detailsButton.visible, true)
+                compare(sendContactRequestButton.visible, false)
+            }
+        }
+    }
+}
diff --git a/tests/qml/to_fix/tst_ChatViewFooter.qml b/tests/qml/src/tst_ChatViewFooter.qml
similarity index 100%
rename from tests/qml/to_fix/tst_ChatViewFooter.qml
rename to tests/qml/src/tst_ChatViewFooter.qml
diff --git a/tests/qml/to_fix/tst_FilesToSendContainer.qml b/tests/qml/src/tst_FilesToSendContainer.qml
similarity index 87%
rename from tests/qml/to_fix/tst_FilesToSendContainer.qml
rename to tests/qml/src/tst_FilesToSendContainer.qml
index aabf7bcc9..c305c20f8 100644
--- a/tests/qml/to_fix/tst_FilesToSendContainer.qml
+++ b/tests/qml/src/tst_FilesToSendContainer.qml
@@ -50,15 +50,15 @@ ColumnLayout {
 
             function test_add_remove_file_test() {
                 // Add animated image file
-                uut.filesToSendListModel.addToPending(":/src/app/resources/gif_test.gif")
+                uut.filesToSendListModel.addToPending(":/src/resources/gif_test.gif")
                 compare(uut.filesToSendCount, 1)
 
                 // Add image file
-                uut.filesToSendListModel.addToPending(":/src/app/resources/png_test.png")
+                uut.filesToSendListModel.addToPending(":/src/resources/png_test.png")
                 compare(uut.filesToSendCount, 2)
 
                 // Add normal file
-                uut.filesToSendListModel.addToPending(":/src/app/resources/gz_test.gz")
+                uut.filesToSendListModel.addToPending(":/src/resources/gz_test.gz")
                 compare(uut.filesToSendCount, 3)
 
                 // Flush
diff --git a/tests/qml/src/tst_LocalAccount.qml b/tests/qml/src/tst_LocalAccount.qml
deleted file mode 100644
index 99182e286..000000000
--- a/tests/qml/src/tst_LocalAccount.qml
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2021-2023 Savoir-faire Linux Inc.
- * Author: Albert Babí Oller <albert.babi@savoirfairelinux.com>
- * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-import QtQuick
-import QtTest
-
-import net.jami.Adapters 1.1
-
-TestCase {
-    name: "Local Account Test"
-    when: windowShown
-
-    function test_initially_no_account() {
-        compare(UtilsAdapter.getAccountListSize(), 0)
-    }
-}
diff --git a/tests/qml/to_fix/tst_PresenceIndicator.qml b/tests/qml/src/tst_PresenceIndicator.qml
similarity index 100%
rename from tests/qml/to_fix/tst_PresenceIndicator.qml
rename to tests/qml/src/tst_PresenceIndicator.qml
diff --git a/tests/qml/src/tst_SettingsMaterialTextEdit.qml b/tests/qml/src/tst_SettingsMaterialTextEdit.qml
deleted file mode 100644
index 1200e61c0..000000000
--- a/tests/qml/src/tst_SettingsMaterialTextEdit.qml
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2023 Savoir-faire Linux Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-import QtQuick
-import QtQuick.Controls
-import QtQuick.Layouts
-
-import QtTest
-
-import "../../../src/app/"
-import "../../../src/app/settingsview/components"
-
-ColumnLayout {
-    id: root
-
-    spacing: 0
-    width: 300
-    height: 300
-
-    Item {
-        id: dummy
-    }
-
-    SettingsMaterialTextEdit {
-        id: uut
-
-        property bool focusLeft: false
-        isPassword: true
-
-        TestCase {
-            name: "Test password un-focus"
-            when: windowShown
-
-            function test_unfocusPassword() {
-                // Open the recorder and take a picture
-                uut.forceActiveFocus()
-                dummy.forceActiveFocus()
-                compare(uut.focusLeft, true)
-            }
-        }
-
-        onEditFinished: focusLeft = true
-
-        Layout.fillWidth: true
-        Layout.fillHeight: true
-    }
-}
diff --git a/tests/qml/src/tst_WizardView.qml b/tests/qml/src/tst_WizardView.qml
index 367b407d5..1e2c2f9e3 100644
--- a/tests/qml/src/tst_WizardView.qml
+++ b/tests/qml/src/tst_WizardView.qml
@@ -24,17 +24,14 @@ import net.jami.Models 1.1
 import net.jami.Constants 1.1
 import net.jami.Enums 1.1
 
-import "../../../src/app/"
 import "../../../src/app/wizardview"
 import "../../../src/app/commoncomponents"
 
 WizardView {
     id: uut
 
-    property ViewManager viewManager: ViewManager {}
-    property ViewCoordinator viewCoordinator: ViewCoordinator {
-        viewManager: uut.viewManager
-    }
+    width: 400
+    height: 600
 
     function clearSignalSpy() {
         spyAccountIsReady.clear()
@@ -95,63 +92,80 @@ WizardView {
     }
 
     TestCase {
-        name: "Create Jami account ui flow (no registered name)"
+        name: "WelcomePage to different account creation page and return back"
         when: windowShown
 
-        function test_createEmptyJamiAccountUiFlow() {
-            uut.clearSignalSpy()
-
+        function test_welcomePageStepInStepOut() {
             var controlPanelStackView = findChild(uut, "controlPanelStackView")
 
             var welcomePage = findChild(uut, "welcomePage")
             var createAccountPage = findChild(uut, "createAccountPage")
-
-            var usernameEdit = findChild(createAccountPage, "usernameEdit")
-            var popup = findChild(createAccountPage, "popup")
-            var joinButton = findChild(popup, "joinButton")
-            var createAccountStack = findChild(createAccountPage, "createAccountStack")
-            var chooseUsernameButton = findChild(createAccountPage, "chooseUsernameButton")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
+            var importFromDevicePage = findChild(uut, "importFromDevicePage")
+            var importFromBackupPage = findChild(uut, "importFromBackupPage")
+            var connectToAccountManagerPage = findChild(uut, "connectToAccountManagerPage")
+            var createSIPAccountPage = findChild(uut, "createSIPAccountPage")
 
             // Go to createAccount page
             WizardViewStepModel.startAccountCreationFlow(
                         WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-            compare(createAccountStack.currentIndex, 0)
-
-            compare(usernameEdit.visible, true)
-
-            // This will show the popup because no username
-            compare(popup.visible, false)
-            chooseUsernameButton.clicked()
-            compare(popup.visible, true)
-            compare(joinButton.visible, true)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    createAccountPage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
 
-            // Create jami account
-            joinButton.clicked()
+            // Go to CreateRendezVous page
+            WizardViewStepModel.startAccountCreationFlow(
+                        WizardViewStepModel.AccountCreationOption.CreateRendezVous)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    createAccountPage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
 
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
+            // Go to CreateRendezVous page
+            WizardViewStepModel.startAccountCreationFlow(
+                        WizardViewStepModel.AccountCreationOption.ImportFromDevice)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    importFromDevicePage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
 
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
+            // Go to ImportFromBackup page
+            WizardViewStepModel.startAccountCreationFlow(
+                        WizardViewStepModel.AccountCreationOption.ImportFromBackup)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    importFromBackupPage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
 
-            AccountAdapter.deleteCurrentAccount()
+            // Go to ConnectToAccountManager page
+            WizardViewStepModel.startAccountCreationFlow(
+                        WizardViewStepModel.AccountCreationOption.ConnectToAccountManager)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    connectToAccountManagerPage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
 
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
+            // Go to CreateSipAccount page
+            WizardViewStepModel.startAccountCreationFlow(
+                        WizardViewStepModel.AccountCreationOption.CreateSipAccount)
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    createSIPAccountPage)
+            WizardViewStepModel.previousStep()
+            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
+                    welcomePage)
         }
     }
 
     TestCase {
-        name: "Create SIP account ui flow"
+        name: "Create Sip account ui flow"
         when: windowShown
 
-        function test_createEmptyJamiAccountUiFlow() {
+        function test_createSipAccountUiFlow() {
             uut.clearSignalSpy()
 
             var controlPanelStackView = findChild(uut, "controlPanelStackView")
@@ -159,30 +173,40 @@ WizardView {
             var welcomePage = findChild(uut, "welcomePage")
             var createSIPAccountPage = findChild(uut, "createSIPAccountPage")
 
+            var sipUsernameEdit = findChild(createSIPAccountPage, "sipUsernameEdit")
+            var sipPasswordEdit = findChild(createSIPAccountPage, "sipPasswordEdit")
             var sipServernameEdit = findChild(createSIPAccountPage, "sipServernameEdit")
-            var createAccountStack = findChild(createSIPAccountPage, "createAccountStack")
-            var createSIPAccountButton = findChild(createSIPAccountPage, "createSIPAccountButton")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
+            var createAccountButton = findChild(createSIPAccountPage, "createSIPAccountButton")
 
-            // Go to createAccount page
+            // Go to createSipAccount page
             WizardViewStepModel.startAccountCreationFlow(
                         WizardViewStepModel.AccountCreationOption.CreateSipAccount)
-            compare(createAccountStack.currentIndex, 0)
 
-            compare(sipServernameEdit.visible, true)
+            // Set up paras
+            var userName = "testUserName"
+            var serverName = "testServerName"
+            var password = "testPassword"
+            var proxy = "testProxy"
 
-            // Create SIP Account
-            createSIPAccountButton.clicked()
+            sipUsernameEdit.dynamicText = userName
+            sipPasswordEdit.dynamicText = password
+            sipServernameEdit.dynamicText = serverName
+
+            createAccountButton.clicked()
 
             // Wait until the account creation is finished
             spyAccountIsReady.wait()
             compare(spyAccountIsReady.count, 1)
 
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
+            // Check if paras match with setup
+            compare(CurrentAccount.username, userName)
+            compare(CurrentAccount.hostname, serverName)
+            compare(CurrentAccount.password, password)
+
+            WizardViewStepModel.nextStep()
+
+            spyCloseWizardView.wait()
+            compare(spyCloseWizardView.count, 1)
 
             AccountAdapter.deleteCurrentAccount()
 
diff --git a/tests/qml/to_fix/tst_WizardView.qml b/tests/qml/to_fix/tst_WizardView.qml
deleted file mode 100644
index b10e27935..000000000
--- a/tests/qml/to_fix/tst_WizardView.qml
+++ /dev/null
@@ -1,1589 +0,0 @@
-/*
- * Copyright (C) 2021-2023 Savoir-faire Linux Inc.
- * Author: Mingrui Zhang <mingrui.zhang@savoirfairelinux.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-import QtQuick
-import QtTest
-
-import net.jami.Adapters 1.1
-import net.jami.Models 1.1
-import net.jami.Constants 1.1
-import net.jami.Enums 1.1
-
-import "../../../src/app/wizardview"
-import "../../../src/app/commoncomponents"
-
-WizardView {
-    id: uut
-
-    function clearSignalSpy() {
-        spyAccountIsReady.clear()
-        spyAccountIsRemoved.clear()
-        spyAccountConfigFinalized.clear()
-        spyReportFailure.clear()
-        spyCloseWizardView.clear()
-
-        spyBackButtonVisible.target = undefined
-    }
-
-    SignalSpy {
-        id: spyAccountIsReady
-
-        target: WizardViewStepModel
-        signalName: "accountIsReady"
-    }
-
-    SignalSpy {
-        id: spyAccountIsRemoved
-
-        target: AccountAdapter
-        signalName: "accountRemoved"
-    }
-
-    SignalSpy {
-        id: spyAccountStatusChanged
-
-        target: AccountAdapter
-        signalName: "accountStatusChanged"
-    }
-
-    SignalSpy {
-        id: spyAccountConfigFinalized
-
-        target: AccountAdapter
-        signalName: "accountConfigFinalized"
-    }
-
-    SignalSpy {
-        id: spyReportFailure
-
-        target: AccountAdapter
-        signalName: "reportFailure"
-    }
-
-    SignalSpy {
-        id: spyCloseWizardView
-
-        target: WizardViewStepModel
-        signalName: "closeWizardView"
-    }
-
-    SignalSpy {
-        id: spyBackButtonVisible
-
-        signalName: "visibleChanged"
-    }
-
-    TestCase {
-        name: "WelcomePage to different account creation page and return back"
-        when: windowShown
-
-        function test_welcomePageStepInStepOut() {
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-            var importFromDevicePage = findChild(uut, "importFromDevicePage")
-            var importFromBackupPage = findChild(uut, "importFromBackupPage")
-            var connectToAccountManagerPage = findChild(uut, "connectToAccountManagerPage")
-            var createSIPAccountPage = findChild(uut, "createSIPAccountPage")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    createAccountPage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to CreateRendezVous page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    createAccountPage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to CreateRendezVous page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.ImportFromDevice)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    importFromDevicePage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to ImportFromBackup page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.ImportFromBackup)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    importFromBackupPage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to ConnectToAccountManager page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.ConnectToAccountManager)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    connectToAccountManagerPage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to CreateSipAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateSipAccount)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    createSIPAccountPage)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-        }
-
-        function test_createAccountPageStepInStepOut() {
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-
-            var createAccountStack = findChild(createAccountPage, "createAccountStack")
-            var passwordSetupPage = findChild(createAccountPage, "passwordSetupPage")
-            var nameRegistrationPage = findChild(createAccountPage, "nameRegistrationPage")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-            compare(createAccountPage.isRendezVous, false)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    createAccountPage)
-            compare(createAccountStack.currentIndex, nameRegistrationPage.stackIndex)
-
-            // Go to passwordSetup page
-            WizardViewStepModel.nextStep()
-            compare(createAccountStack.currentIndex, passwordSetupPage.stackIndex)
-
-            // Back
-            WizardViewStepModel.previousStep()
-            compare(createAccountStack.currentIndex, nameRegistrationPage.stackIndex)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to CreateRendezVous page (createAccount)
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-            compare(createAccountPage.isRendezVous, true)
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    createAccountPage)
-            compare(createAccountStack.currentIndex, nameRegistrationPage.stackIndex)
-
-            // Go to passwordSetup page
-            WizardViewStepModel.nextStep()
-            compare(createAccountStack.currentIndex, passwordSetupPage.stackIndex)
-
-            // Back
-            WizardViewStepModel.previousStep()
-            compare(createAccountStack.currentIndex, nameRegistrationPage.stackIndex)
-            WizardViewStepModel.previousStep()
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-        }
-    }
-
-    TestCase {
-        name: "Create Jami account ui flow (no registered name)"
-        when: windowShown
-
-        function test_createJamiAccountUiFlow() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-            var profilePage = findChild(uut, "profilePage")
-            var backupKeysPage = findChild(uut, "backupKeysPage")
-
-            var usernameEdit = findChild(createAccountPage, "usernameEdit")
-            var createAccountStack = findChild(createAccountPage, "createAccountStack")
-            var passwordSwitch = findChild(createAccountPage, "passwordSwitch")
-            var passwordEdit = findChild(createAccountPage, "passwordEdit")
-            var passwordConfirmEdit = findChild(createAccountPage, "passwordConfirmEdit")
-            var createAccountButton = findChild(createAccountPage, "createAccountButton")
-
-            var aliasEdit = findChild(profilePage, "aliasEdit")
-            var saveProfileBtn = findChild(profilePage, "saveProfileBtn")
-
-            var password  = "test110"
-            var aliasText = "test101"
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-            compare(createAccountStack.currentIndex, 0)
-            compare(usernameEdit.focus, true)
-
-            // Go to set up password page
-            WizardViewStepModel.nextStep()
-            compare(createAccountStack.currentIndex, 1)
-            passwordSwitch.checked = true
-            compare(passwordEdit.focus, true)
-            passwordEdit.text = password
-            passwordConfirmEdit.text = password
-            createAccountButton.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Now we are in profile page
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    profilePage)
-            compare(aliasEdit.focus, true)
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            aliasEdit.text = aliasText
-            saveProfileBtn.clicked()
-
-            var showBackup = (WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateJamiAccount
-                              || WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-                              && !AppSettingsManager.getValue(Settings.NeverShowMeAgain)
-            if (showBackup) {
-                compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                        backupKeysPage)
-                WizardViewStepModel.nextStep()
-            }
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            // Check alias text
-            compare(CurrentAccount.alias, aliasText)
-
-            spyAccountStatusChanged.clear()
-
-            // Check if password is set
-            compare(AccountAdapter.savePassword(LRCInstance.currentAccountId, password, "test"),
-                    true)
-
-            // Wait until the account status change is finished
-            spyAccountStatusChanged.wait()
-            verify(spyAccountStatusChanged.count >= 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-
-        function test_createRendezVousAccountUiFlow() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-            var profilePage = findChild(uut, "profilePage")
-            var backupKeysPage = findChild(uut, "backupKeysPage")
-
-            var usernameEdit = findChild(createAccountPage, "usernameEdit")
-            var createAccountStack = findChild(createAccountPage, "createAccountStack")
-            var passwordSwitch = findChild(createAccountPage, "passwordSwitch")
-            var passwordEdit = findChild(createAccountPage, "passwordEdit")
-            var passwordConfirmEdit = findChild(createAccountPage, "passwordConfirmEdit")
-            var createAccountButton = findChild(createAccountPage, "createAccountButton")
-
-            var aliasEdit = findChild(profilePage, "aliasEdit")
-            var saveProfileBtn = findChild(profilePage, "saveProfileBtn")
-
-            var password  = "test110"
-            var aliasText = "test101"
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createRendezVous page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-            compare(createAccountStack.currentIndex, 0)
-            compare(usernameEdit.focus, true)
-
-            // Go to set up password page
-            WizardViewStepModel.nextStep()
-            compare(createAccountStack.currentIndex, 1)
-            passwordSwitch.checked = true
-            compare(passwordEdit.focus, true)
-            passwordEdit.text = password
-            passwordConfirmEdit.text = password
-            createAccountButton.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Now we are in profile page
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    profilePage)
-            compare(aliasEdit.focus, true)
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            // Check if it is a RendezVous acc
-            compare(CurrentAccount.isRendezVous, true)
-
-            aliasEdit.text = aliasText
-            saveProfileBtn.clicked()
-
-            var showBackup = (WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateJamiAccount
-                              || WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-                              && !AppSettingsManager.getValue(Settings.NeverShowMeAgain)
-            if (showBackup) {
-                compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                        backupKeysPage)
-                WizardViewStepModel.nextStep()
-            }
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            // Check alias text
-            compare(CurrentAccount.alias, aliasText)
-
-            spyAccountStatusChanged.clear()
-
-            // Check if password is set
-            compare(AccountAdapter.savePassword(LRCInstance.currentAccountId, password, "test"),
-                    true)
-
-            // Wait until the account status change is finished
-            spyAccountStatusChanged.wait()
-            verify(spyAccountStatusChanged.count >= 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-    }
-
-    TestCase {
-        name: "Create Sip account ui flow"
-        when: windowShown
-
-        function test_createSipAccountUiFlow() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createSIPAccountPage = findChild(uut, "createSIPAccountPage")
-            var profilePage = findChild(uut, "profilePage")
-
-            var sipUsernameEdit = findChild(createSIPAccountPage, "sipUsernameEdit")
-            var sipPasswordEdit = findChild(createSIPAccountPage, "sipPasswordEdit")
-            var sipServernameEdit = findChild(createSIPAccountPage, "sipServernameEdit")
-            var sipProxyEdit = findChild(createSIPAccountPage, "sipProxyEdit")
-            var createAccountButton = findChild(createSIPAccountPage, "createSIPAccountButton")
-
-            var saveProfileBtn = findChild(profilePage, "saveProfileBtn")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createSipAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateSipAccount)
-            compare(sipServernameEdit.focus, true)
-
-            // Set up paras
-            var userName = "testUserName"
-            var serverName = "testServerName"
-            var password = "testPassword"
-            var proxy = "testProxy"
-
-            sipUsernameEdit.text = userName
-            sipPasswordEdit.text = password
-            sipServernameEdit.text = serverName
-            sipProxyEdit.text = proxy
-
-            createAccountButton.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Now we are in profile page
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    profilePage)
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            // Check if paras match with setup
-            compare(CurrentAccount.routeset, proxy)
-            compare(CurrentAccount.username, userName)
-            compare(CurrentAccount.hostname, serverName)
-            compare(CurrentAccount.password, password)
-
-            WizardViewStepModel.nextStep()
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-    }
-
-    TestCase {
-        name: "Create Jami account from backup ui flow"
-        when: windowShown
-
-        function test_createJamiAccountFromBackupUiFlow() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var importFromBackupPage = findChild(uut, "importFromBackupPage")
-            var profilePage = findChild(uut, "profilePage")
-
-            var passwordFromBackupEdit = findChild(importFromBackupPage, "passwordFromBackupEdit")
-            var connectBtn = findChild(importFromBackupPage, "importFromBackupPageConnectBtn")
-            var errorLabel = findChild(importFromBackupPage, "errorLabel")
-            var backButton = findChild(importFromBackupPage, "importFromBackupPageBackButton")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to importFromBackup page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.ImportFromBackup)
-
-            spyBackButtonVisible.target = backButton
-
-            compare(passwordFromBackupEdit.focus, true)
-
-            var fileName = "gz_test.gz"
-            var password = "qqq"
-            importFromBackupPage.filePath = UtilsAdapter.toFileAbsolutepath(
-                        "tests/qml/src/resources/gz_test.gz") + "/" + fileName
-
-            compare(connectBtn.enabled, true)
-
-            // Create without password
-            connectBtn.clicked()
-            spyReportFailure.wait()
-            verify(spyReportFailure.count >= 1)
-            spyBackButtonVisible.wait()
-            verify(spyBackButtonVisible.count >= 2)
-            spyBackButtonVisible.clear()
-
-            compare(importFromBackupPage.errorText, JamiStrings.errorCreateAccount)
-            compare(errorLabel.visible, true)
-
-            // Recreate with password
-            passwordFromBackupEdit.text = password
-            connectBtn.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-    }
-
-    TestCase {
-        name: "Wizardview key navigation"
-        when: windowShown
-
-        function test_welcomePageKeyNavigation() {
-            var welcomePage = findChild(uut, "welcomePage")
-
-            var newAccountButton = findChild(welcomePage, "newAccountButton")
-            var newRdvButton = findChild(welcomePage, "newRdvButton")
-            var fromDeviceButton = findChild(welcomePage, "fromDeviceButton")
-            var fromBackupButton = findChild(welcomePage, "fromBackupButton")
-            var showAdvancedButton = findChild(welcomePage, "showAdvancedButton")
-            var connectAccountManagerButton = findChild(welcomePage, "connectAccountManagerButton")
-            var newSIPAccountButton = findChild(welcomePage, "newSIPAccountButton")
-            var welcomePageBackButton = findChild(welcomePage, "welcomePageBackButton")
-
-            welcomePageBackButton.visible = true
-
-            // ShowAdvanced is false
-            keyClick(Qt.Key_Tab)
-            compare(newAccountButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(newRdvButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(fromDeviceButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(fromBackupButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(showAdvancedButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(welcomePageBackButton.focus, true)
-
-            // Set showAdvanced to true
-            keyClick(Qt.Key_Up)
-            compare(showAdvancedButton.focus, true)
-
-            keyClick(Qt.Key_Enter)
-            compare(showAdvancedButton.showAdvanced, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(connectAccountManagerButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(newSIPAccountButton.focus, true)
-
-            // Use down button
-            keyClick(Qt.Key_Down)
-            compare(welcomePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(newAccountButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(newRdvButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(fromDeviceButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(fromBackupButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(showAdvancedButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(connectAccountManagerButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(newSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(welcomePageBackButton.focus, true)
-
-            // Use up button
-            keyClick(Qt.Key_Up)
-            compare(newSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(connectAccountManagerButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(showAdvancedButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(fromBackupButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(fromDeviceButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(newRdvButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(newAccountButton.focus, true)
-        }
-
-        function test_createAccountPageKeyNavigation() {
-            uut.clearSignalSpy()
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-
-            var newAccountButton = findChild(welcomePage, "newAccountButton")
-
-            var usernameEdit = findChild(createAccountPage, "usernameEdit")
-            var chooseUsernameButton = findChild(createAccountPage,
-                                                 "chooseUsernameButton")
-            var nameRegistrationPageSkipButton = findChild(createAccountPage,
-                                                           "nameRegistrationPageSkipButton")
-            var passwordEdit = findChild(createAccountPage, "passwordEdit")
-            var passwordSwitch = findChild(createAccountPage, "passwordSwitch")
-            var passwordConfirmEdit = findChild(createAccountPage, "passwordConfirmEdit")
-            var createAccountButton = findChild(createAccountPage,
-                                                "createAccountButton")
-            var createAccountPageBackButton = findChild(createAccountPage,
-                                                        "createAccountPageBackButton")
-
-            // To createAccountPage - nameRegistrationPage
-            keyClick(Qt.Key_Tab)
-            compare(newAccountButton.focus, true)
-
-            keyClick(Qt.Key_Enter)
-            compare(usernameEdit.focus, true)
-
-            // No username
-            keyClick(Qt.Key_Tab)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(usernameEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(usernameEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(usernameEdit.focus, true)
-
-            // With username
-            usernameEdit.nameRegistrationState =
-                    UsernameTextEdit.NameRegistrationState.FREE
-
-            keyClick(Qt.Key_Tab)
-            compare(chooseUsernameButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(usernameEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(chooseUsernameButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(usernameEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(nameRegistrationPageSkipButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(chooseUsernameButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(usernameEdit.focus, true)
-
-            // To createAccountPage - passwordSetupPage
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Tab)
-            compare(passwordSwitch.focus, true)
-
-            // No password
-            keyClick(Qt.Key_Tab)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordSwitch.focus, true)
-
-            // With password - no text entered
-            keyClick(Qt.Key_Enter)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordSwitch.focus, true)
-
-            // With password - with text entered
-            passwordEdit.text = "test"
-            passwordConfirmEdit.text = "test"
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordSwitch.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createAccountButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordConfirmEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordSwitch.focus, true)
-
-            passwordEdit.text = ""
-            passwordConfirmEdit.text = ""
-
-            // Check lineEdit enter key press corrspond correctly
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Enter)
-            compare(passwordConfirmEdit.focus, true)
-
-            passwordEdit.text = "test"
-            passwordConfirmEdit.text = "test"
-
-            keyClick(Qt.Key_Enter)
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Go back to welcomePage
-            WizardViewStepModel.nextStep()
-
-            var showBackup = (WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateJamiAccount
-                              || WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-                              && !AppSettingsManager.getValue(Settings.NeverShowMeAgain)
-            if (showBackup) {
-                WizardViewStepModel.nextStep()
-            }
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-
-        function test_importFromDevicePageKeyNavigation() {
-            uut.clearSignalSpy()
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var importFromDevicePage = findChild(uut, "importFromDevicePage")
-
-            var fromDeviceButton = findChild(welcomePage, "fromDeviceButton")
-
-            var pinFromDevice = findChild(importFromDevicePage, "pinFromDevice")
-            var importFromDevicePageConnectBtn = findChild(importFromDevicePage,
-                                                           "importFromDevicePageConnectBtn")
-            var passwordFromDevice = findChild(importFromDevicePage, "passwordFromDevice")
-            var importFromDevicePageBackButton = findChild(importFromDevicePage,
-                                                           "importFromDevicePageBackButton")
-
-            // To importFromDevicePage
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            compare(fromDeviceButton.focus, true)
-
-            keyClick(Qt.Key_Enter)
-            compare(pinFromDevice.focus, true)
-
-            // No device pin
-            keyClick(Qt.Key_Tab)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(pinFromDevice.focus, true)
-
-            // With device pin
-            pinFromDevice.text = "test"
-
-            keyClick(Qt.Key_Tab)
-            compare(importFromDevicePageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromDevicePageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromDevicePageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromDevicePageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(pinFromDevice.focus, true)
-
-            // Account creation in process
-            importFromDevicePageConnectBtn.spinnerTriggered = true
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(pinFromDevice.focus, true)
-
-            importFromDevicePageConnectBtn.spinnerTriggered = false
-
-            // Check lineEdit enter key press corrspond correctly
-            keyClick(Qt.Key_Enter)
-            compare(pinFromDevice.focus, true)
-
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Enter)
-            compare(pinFromDevice.focus, true)
-
-            pinFromDevice.text = "test"
-            keyClick(Qt.Key_Enter)
-
-            spyReportFailure.wait(15000)
-            verify(spyReportFailure.count >= 1)
-
-            // Go back to welcomePage
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Enter)
-        }
-
-        function test_importFromBackupPageKeyNavigation() {
-            uut.clearSignalSpy()
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var importFromBackupPage = findChild(uut, "importFromBackupPage")
-
-            var fromBackupButton = findChild(welcomePage, "fromBackupButton")
-
-            var passwordFromBackupEdit = findChild(importFromBackupPage, "passwordFromBackupEdit")
-            var importFromBackupPageBackButton = findChild(importFromBackupPage,
-                                                           "importFromBackupPageBackButton")
-            var importFromBackupPageConnectBtn = findChild(importFromBackupPage,
-                                                           "importFromBackupPageConnectBtn")
-            var fileImportBtn = findChild(importFromBackupPage, "fileImportBtn")
-
-            // To importFromBackupPage
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            compare(fromBackupButton.focus, true)
-
-            keyClick(Qt.Key_Enter)
-            compare(passwordFromBackupEdit.focus, true)
-
-            // No filePath loaded
-            keyClick(Qt.Key_Tab)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromBackupEdit.focus, true)
-
-            // With filePath loaded
-            importFromBackupPage.filePath = "test"
-
-            keyClick(Qt.Key_Tab)
-            compare(importFromBackupPageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromBackupPageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromBackupPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(importFromBackupPageConnectBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromBackupEdit.focus, true)
-
-            // Account creation in process
-            importFromBackupPageConnectBtn.spinnerTriggered = true
-
-            keyClick(Qt.Key_Tab)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(passwordFromBackupEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(fileImportBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(passwordFromBackupEdit.focus, true)
-
-            importFromBackupPageConnectBtn.spinnerTriggered = false
-
-            // Check lineEdit enter key press corrspond correctly
-            var fileName = "gz_test.gz"
-            var wrongPassword = "ccc"
-            importFromBackupPage.filePath = UtilsAdapter.toFileAbsolutepath(
-                        "tests/qml/src/resources/gz_test.gz") + "/" + fileName
-            passwordFromBackupEdit.text = wrongPassword
-
-            keyClick(Qt.Key_Enter)
-
-            spyReportFailure.wait(15000)
-            verify(spyReportFailure.count >= 1)
-
-            // Go back to welcomePage
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Enter)
-        }
-
-        function test_createSIPAccountPageKeyNavigation() {
-            uut.clearSignalSpy()
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createSIPAccountPage = findChild(uut, "createSIPAccountPage")
-
-            var showAdvancedButton = findChild(welcomePage, "showAdvancedButton")
-
-            var newSIPAccountButton = findChild(welcomePage, "newSIPAccountButton")
-
-            var sipServernameEdit = findChild(createSIPAccountPage, "sipServernameEdit")
-            var sipProxyEdit = findChild(createSIPAccountPage, "sipProxyEdit")
-            var sipUsernameEdit = findChild(createSIPAccountPage, "sipUsernameEdit")
-            var sipPasswordEdit = findChild(createSIPAccountPage, "sipPasswordEdit")
-            var createSIPAccountButton = findChild(createSIPAccountPage, "createSIPAccountButton")
-            var createSIPAccountPageBackButton = findChild(createSIPAccountPage,
-                                                           "createSIPAccountPageBackButton")
-
-            // To connectToAccountManagerPage
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Up)
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            compare(newSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Enter)
-            compare(sipServernameEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(sipProxyEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(sipUsernameEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(sipPasswordEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(createSIPAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(sipServernameEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(sipProxyEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(sipUsernameEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(sipPasswordEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(createSIPAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(sipServernameEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createSIPAccountPageBackButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(createSIPAccountButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(sipPasswordEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(sipUsernameEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(sipProxyEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(sipServernameEdit.focus, true)
-
-            // Check lineEdit enter key press corrspond correctly
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Enter)
-            keyClick(Qt.Key_Enter)
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            spyAccountStatusChanged.wait()
-            verify(spyAccountStatusChanged.count >= 1)
-
-            WizardViewStepModel.nextStep()
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-
-            // Hide advanced options
-            showAdvancedButton.clicked()
-        }
-
-        function test_profilePageKeyNavigation() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-            var profilePage = findChild(uut, "profilePage")
-            var backupKeysPage = findChild(uut, "backupKeysPage")
-
-            var createAccountButton = findChild(createAccountPage, "createAccountButton")
-
-            var aliasEdit = findChild(profilePage, "aliasEdit")
-            var saveProfileBtn = findChild(profilePage, "saveProfileBtn")
-            var setAvatarWidget = findChild(profilePage, "setAvatarWidget")
-            var skipProfileSavingButton = findChild(profilePage, "skipProfileSavingButton")
-
-            var photoboothImportFromFileDialog = findChild(setAvatarWidget,
-                                                           "photoboothImportFromFileDialog")
-            var takePhotoButton = findChild(setAvatarWidget, "takePhotoButton")
-            var photoboothViewClearButton = findChild(setAvatarWidget,
-                                                      "photoboothViewClearButton")
-            var photoboothViewImportButton = findChild(setAvatarWidget,
-                                                       "photoboothViewImportButton")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-
-            // Go to set up password page
-            WizardViewStepModel.nextStep()
-            createAccountButton.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Now we are in profile page
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    profilePage)
-            compare(aliasEdit.focus, true)
-
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            // Navigation test
-            keyClick(Qt.Key_Tab)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(photoboothViewImportButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(photoboothViewImportButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(photoboothViewImportButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(aliasEdit.focus, true)
-
-            // Set up photo from fake JamiFileDialog imported file
-            spyAccountStatusChanged.clear()
-            photoboothViewImportButton.focusAfterFileDialogClosed = true
-            photoboothImportFromFileDialog.file = UtilsAdapter.toFileAbsolutepath(
-                        "tests/qml/src/resources/png_test.png") + "/" + "png_test.png"
-            photoboothImportFromFileDialog.accepted()
-
-            spyAccountStatusChanged.wait()
-            verify(spyAccountStatusChanged.count >= 1)
-            compare(photoboothViewImportButton.focus, true)
-            compare(photoboothViewClearButton.visible, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(photoboothViewImportButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(photoboothViewImportButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(photoboothViewImportButton.focus, true)
-
-            // Clear photo
-            keyClick(Qt.Key_Up)
-            compare(photoboothViewClearButton.focus, true)
-            keyClick(Qt.Key_Enter)
-            compare(takePhotoButton.focus, true)
-
-            // Taking photo focus test
-            setAvatarWidget.isPreviewing = true
-
-            keyClick(Qt.Key_Tab)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Tab)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Down)
-            compare(takePhotoButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(skipProfileSavingButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(saveProfileBtn.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(aliasEdit.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(photoboothViewClearButton.focus, true)
-
-            keyClick(Qt.Key_Up)
-            compare(takePhotoButton.focus, true)
-
-            setAvatarWidget.isPreviewing = false
-
-            // Check lineEdit enter key press corrspond correctly
-            var aliasName = "test"
-            aliasEdit.text = aliasName
-            spyAccountStatusChanged.clear()
-
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Tab)
-            keyClick(Qt.Key_Enter)
-
-            var showBackup = (WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateJamiAccount
-                              || WizardViewStepModel.accountCreationOption ===
-                              WizardViewStepModel.AccountCreationOption.CreateRendezVous)
-                              && !AppSettingsManager.getValue(Settings.NeverShowMeAgain)
-            if (showBackup) {
-                compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                        backupKeysPage)
-                WizardViewStepModel.nextStep()
-            }
-
-            spyAccountStatusChanged.wait()
-            verify(spyAccountStatusChanged.count >= 1)
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            // Check alias text
-            compare(CurrentAccount.alias, aliasName)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-
-        function test_backupKeysPageNavigation() {
-            uut.clearSignalSpy()
-
-            var controlPanelStackView = findChild(uut, "controlPanelStackView")
-
-            var welcomePage = findChild(uut, "welcomePage")
-            var createAccountPage = findChild(uut, "createAccountPage")
-            var profilePage = findChild(uut, "profilePage")
-            var backupKeysPage = findChild(uut, "backupKeysPage")
-
-            var createAccountButton = findChild(createAccountPage, "createAccountButton")
-            var skipProfileSavingButton = findChild(profilePage, "skipProfileSavingButton")
-
-            // WelcomePage initially
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    welcomePage)
-
-            // Go to createAccount page
-            WizardViewStepModel.startAccountCreationFlow(
-                        WizardViewStepModel.AccountCreationOption.CreateJamiAccount)
-
-            // Go to set up password page
-            WizardViewStepModel.nextStep()
-            createAccountButton.clicked()
-
-            // Wait until the account creation is finished
-            spyAccountIsReady.wait()
-            compare(spyAccountIsReady.count, 1)
-
-            // Now we are in profile page
-            compare(controlPanelStackView.children[controlPanelStackView.currentIndex],
-                    profilePage)
-            spyAccountConfigFinalized.wait()
-            compare(spyAccountConfigFinalized.count, 1)
-
-            skipProfileSavingButton.clicked()
-
-            spyCloseWizardView.wait()
-            compare(spyCloseWizardView.count, 1)
-
-            AccountAdapter.deleteCurrentAccount()
-
-            // Wait until the account removal is finished
-            spyAccountIsRemoved.wait()
-            compare(spyAccountIsRemoved.count, 1)
-        }
-    }
-}
-- 
GitLab