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)
QMetaObject::invokeMethod(m_dsManager.get(), "sendProjectStopped", Q_ARG(QString, id));
else {
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();
......
......@@ -50,6 +50,7 @@ int main(int argc, char *argv[])
#ifdef Q_OS_ANDROID
view.showMaximized();
#else
QApplication::setWindowIcon(QIcon(QStringLiteral(":/images/appicon.svg")));
view.show();
#endif
......
......@@ -287,6 +287,8 @@ bool ProjectManager::runProjectInternal(const QByteArray &project)
qDebug() << "Setting up the quickWindow";
m_quickWindow.reset(qobject_cast<QQuickWindow *>(topLevel));
m_quickWindow->setVisible(false);
if (m_quickWindow) {
qDebug() << "Running with incubator controller";
m_qmlEngine->setIncubationController(m_quickWindow->incubationController());
......@@ -388,7 +390,7 @@ void ProjectManager::showAppWindow()
void ProjectManager::stopProject()
{
if (!m_quickWindow || !m_quickWindow->isVisible())
if (!m_quickWindow)
return;
qDebug("Stopping the QML app window");
......
......@@ -44,6 +44,8 @@ void TestProjectManager::testStopProject()
projectManager.stopProject();
QVERIFY(projectManager.sessionId().isEmpty());
QVERIFY(projectManager.m_quickWindow.isNull());
QVERIFY(projectManager.m_qmlEngine.isNull());
QVERIFY(projectManager.m_qmlComponent.isNull());
}
void TestProjectManager::testRegisterResource()
......@@ -119,7 +121,7 @@ void TestProjectManager::testRunProjectInternal()
QVERIFY(projectManager.m_qmlEngine);
QVERIFY(projectManager.m_qmlComponent);
QVERIFY(projectManager.m_quickWindow);
QVERIFY(projectManager.m_quickWindow->isVisible());
QVERIFY(projectManager.m_quickWindow->isVisible() == false);
}
void TestProjectManager::testFindFile()
......@@ -202,6 +204,8 @@ void TestProjectManager::testShowAppWindow()
ProjectManager projectManager;
projectManager.runProject(m_projectThatCanRun, true, "sessionId");
QVERIFY(projectManager.m_quickWindow->isVisible() == false);
projectManager.showAppWindow();
QVERIFY(projectManager.m_quickWindow->isVisible());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment