Skip to content
Snippets Groups Projects
Verified Commit adda8601 authored by Burak Hançerli's avatar Burak Hançerli :headphones:
Browse files

tests: fix more tests

parent 1f93165b
No related branches found
No related tags found
1 merge request!79QDS-14556 Extend tests
Pipeline #79843 passed
...@@ -261,7 +261,7 @@ void Backend::runProject(const QString &id, const QByteArray &projectData) ...@@ -261,7 +261,7 @@ void Backend::runProject(const QString &id, const QByteArray &projectData)
QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectStopped", Q_ARG(QString, id)); QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectStopped", Q_ARG(QString, id));
else { else {
QMetaObject::invokeMethod(m_projectManager.get(), "showAppWindow"); QMetaObject::invokeMethod(m_projectManager.get(), "showAppWindow");
QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectRunning", Q_ARG(QString, id)); QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectStarted", Q_ARG(QString, id));
} }
emit popupClose(); emit popupClose();
......
...@@ -50,6 +50,7 @@ int main(int argc, char *argv[]) ...@@ -50,6 +50,7 @@ int main(int argc, char *argv[])
#ifdef Q_OS_ANDROID #ifdef Q_OS_ANDROID
view.showMaximized(); view.showMaximized();
#else #else
QApplication::setWindowIcon(QIcon(QStringLiteral(":/images/appicon.svg")));
view.show(); view.show();
#endif #endif
......
...@@ -287,6 +287,8 @@ bool ProjectManager::runProjectInternal(const QByteArray &project) ...@@ -287,6 +287,8 @@ bool ProjectManager::runProjectInternal(const QByteArray &project)
qDebug() << "Setting up the quickWindow"; qDebug() << "Setting up the quickWindow";
m_quickWindow.reset(qobject_cast<QQuickWindow *>(topLevel)); m_quickWindow.reset(qobject_cast<QQuickWindow *>(topLevel));
m_quickWindow->setVisible(false);
if (m_quickWindow) { if (m_quickWindow) {
qDebug() << "Running with incubator controller"; qDebug() << "Running with incubator controller";
m_qmlEngine->setIncubationController(m_quickWindow->incubationController()); m_qmlEngine->setIncubationController(m_quickWindow->incubationController());
...@@ -388,7 +390,7 @@ void ProjectManager::showAppWindow() ...@@ -388,7 +390,7 @@ void ProjectManager::showAppWindow()
void ProjectManager::stopProject() void ProjectManager::stopProject()
{ {
if (!m_quickWindow || !m_quickWindow->isVisible()) if (!m_quickWindow)
return; return;
qDebug("Stopping the QML app window"); qDebug("Stopping the QML app window");
......
...@@ -44,6 +44,8 @@ void TestProjectManager::testStopProject() ...@@ -44,6 +44,8 @@ void TestProjectManager::testStopProject()
projectManager.stopProject(); projectManager.stopProject();
QVERIFY(projectManager.sessionId().isEmpty()); QVERIFY(projectManager.sessionId().isEmpty());
QVERIFY(projectManager.m_quickWindow.isNull()); QVERIFY(projectManager.m_quickWindow.isNull());
QVERIFY(projectManager.m_qmlEngine.isNull());
QVERIFY(projectManager.m_qmlComponent.isNull());
} }
void TestProjectManager::testRegisterResource() void TestProjectManager::testRegisterResource()
...@@ -119,7 +121,7 @@ void TestProjectManager::testRunProjectInternal() ...@@ -119,7 +121,7 @@ void TestProjectManager::testRunProjectInternal()
QVERIFY(projectManager.m_qmlEngine); QVERIFY(projectManager.m_qmlEngine);
QVERIFY(projectManager.m_qmlComponent); QVERIFY(projectManager.m_qmlComponent);
QVERIFY(projectManager.m_quickWindow); QVERIFY(projectManager.m_quickWindow);
QVERIFY(projectManager.m_quickWindow->isVisible()); QVERIFY(projectManager.m_quickWindow->isVisible() == false);
} }
void TestProjectManager::testFindFile() void TestProjectManager::testFindFile()
...@@ -202,6 +204,8 @@ void TestProjectManager::testShowAppWindow() ...@@ -202,6 +204,8 @@ void TestProjectManager::testShowAppWindow()
ProjectManager projectManager; ProjectManager projectManager;
projectManager.runProject(m_projectThatCanRun, true, "sessionId"); projectManager.runProject(m_projectThatCanRun, true, "sessionId");
QVERIFY(projectManager.m_quickWindow->isVisible() == false);
projectManager.showAppWindow();
QVERIFY(projectManager.m_quickWindow->isVisible()); QVERIFY(projectManager.m_quickWindow->isVisible());
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment