mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-13 23:28:49 +00:00
This is required to control the resource consumption in case of no usage of wallet connect Hence we load the WebEngineView only if we have active pairings and such that SDK events are expected from the paired dapps. Also: - Moved the generic WebEngineView communication bridge to StatusQ - Added basic tests for WebEngineLoader - Add a way to know when wallet is loaded (`walletReady`) - Add storybook support for mock of nim sections as context properties Updates: #12639
36 lines
853 B
C++
36 lines
853 B
C++
#include <QtQuickTest/quicktest.h>
|
|
#include <QQmlEngine>
|
|
|
|
#include <QtWebEngine>
|
|
|
|
#include "TestHelpers/MonitorQtOutput.h"
|
|
|
|
class RunBeforeQApplicationIsInitialized {
|
|
public:
|
|
RunBeforeQApplicationIsInitialized()
|
|
{
|
|
QtWebEngine::initialize();
|
|
}
|
|
};
|
|
|
|
static RunBeforeQApplicationIsInitialized runBeforeQApplicationIsInitialized;
|
|
|
|
class TestSetup : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public slots:
|
|
void qmlEngineAvailable(QQmlEngine *engine)
|
|
{
|
|
engine->addImportPath(QStringLiteral(STATUSQ_MODULE_IMPORT_PATH));
|
|
engine->addImportPath(QStringLiteral(QUICK_TEST_SOURCE_DIR) + "/qml/");
|
|
|
|
// TODO: Alternative to not yet supported QML_ELEMENT
|
|
qmlRegisterType<MonitorQtOutput>("StatusQ.TestHelpers", 0, 1, "MonitorQtOutput");
|
|
}
|
|
};
|
|
|
|
QUICK_TEST_MAIN_WITH_SETUP(TestStatusQ, TestSetup)
|
|
|
|
#include "main.moc"
|