-
Notifications
You must be signed in to change notification settings - Fork 49
Create QML test automation target (qml/test/test_bitcoin-qt) #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
johnny9
wants to merge
20
commits into
bitcoin-core:main
Choose a base branch
from
johnny9:qmltest
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
59af85b
qml: add makefile for qmltest target
3e229de
qml: add test harness for onboarding qml tests
6096e62
qml: add QtQuickTest library to qmltest target
325808c
qml: add first qml testcase
6186017
qml: add imageprovider to test setup
0cf1f3d
qml: remove double linkage in Makefile.qmltest.include
c8b15a4
qml/test: have OnboardingCover fill parent
a75059e
qml/test: add fake qt.bitcoincore.org module
8401964
qml: extract OnboardingWizard from main.qml
eb2eb8d
qml/test: add test_all_continue_buttons
2ef6479
qmltest: configure to only compile with qml and tests enabled
332ed16
qmltest: rename testimageprovider
3909a63
qml/test: add include guards to headers
dcfba81
gitignore: add output from qmltest
953ce9a
qmltest: don't compile if qml isn't enabled
ad9038f
qmltest: rename onboardingtests to setup
d41e3b3
qmltest: add/fix copyright comments
e309568
qmltest: remove extra flags/link aguments from makefile
9176f79
qmltest: fix build and don't build when static linking
ed8222b
qmltest: remove from TESTS until able to run in ci
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright (c) 2023 The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
bin_PROGRAMS += qml/test/test_bitcoin-qt | ||
|
||
TEST_QML_MOC_CPP = qml/test/moc_setup.cpp | ||
|
||
TEST_QML_H = qml/test/setup.h qml/test/testimageprovider.h | ||
|
||
qml_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) \ | ||
$(QT_INCLUDES) $(QT_QMLTEST_INCLUDES) $(BOOST_CPPFLAGS) | ||
|
||
qml_test_test_bitcoin_qt_SOURCES = \ | ||
qml/bitcoin_qml.qrc \ | ||
qml/test/setup.cpp \ | ||
qml/test/testimageprovider.cpp \ | ||
$(TEST_QML_H) | ||
|
||
nodist_qml_test_test_bitcoin_qt_SOURCES = $(TEST_QML_MOC_CPP) $(QML_QRC_CPP) | ||
|
||
qml_test_test_bitcoin_qt_LDADD = $(QT_LIBS) $(QT_QUICKTEST_LIBS) | ||
qml_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) | ||
qml_test_test_bitcoin_qt_CXXFLAGS = $(AM_CXXFLAGS) $(QT_PIE_FLAGS) | ||
|
||
CLEAN_BITCOIN_QML_TEST = $(TEST_QML_MOC_CPP) | ||
|
||
CLEANFILES += $(CLEAN_BITCOIN_QML_TEST) | ||
|
||
test_bitcoin_qt_qml: qml/test/test_bitcoin-qt$(EXEEXT) | ||
|
||
test_bitcoin_qt_qml_clean: FORCE | ||
rm -f $(CLEAN_BITCOIN_QML_TEST) $(qml_test_test_bitcoin_qt_OBJECTS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
import QtQuick 2.15 | ||
import QtQuick.Controls 2.15 | ||
|
||
SwipeView { | ||
id: swipeView | ||
property bool finished: false | ||
interactive: false | ||
|
||
OnboardingCover {} | ||
OnboardingStrengthen {} | ||
OnboardingBlockclock {} | ||
OnboardingStorageLocation {} | ||
OnboardingStorageAmount {} | ||
OnboardingConnection {} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
pragma Singleton | ||
johnny9 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import QtQuick 2.15 | ||
|
||
Item { | ||
property bool isDesktop: true | ||
property bool isMobile: false | ||
enum Mode { | ||
DESKTOP, | ||
MOBILE | ||
} | ||
property string state: "MOBILE" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
module org.bitcoincore.qt | ||
singleton AppMode 1.0 AppMode.qml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#include <qml/test/setup.h> | ||
|
||
#if defined(HAVE_CONFIG_H) | ||
#include <config/bitcoin-config.h> | ||
#endif | ||
|
||
#include <QtQuickTest> | ||
#include <QtTest> | ||
#include <QtTest/qtestcase.h> | ||
#include <QQmlEngine> | ||
#include <QQmlContext> | ||
#include <qml/test/testimageprovider.h> | ||
|
||
void Setup::qmlEngineAvailable(QQmlEngine * engine) { | ||
engine->addImageProvider(QStringLiteral("images"), new TestImageProvider()); | ||
} | ||
|
||
QUICK_TEST_MAIN_WITH_SETUP(onboarding, Setup) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2023 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
#ifndef BITCOIN_QML_TEST_SETUP_H | ||
#define BITCOIN_QML_TEST_SETUP_H | ||
|
||
#include <QObject> | ||
#include <QQmlEngine> | ||
|
||
class Setup : public QObject | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
Setup() = default; | ||
~Setup() = default; | ||
|
||
public Q_SLOTS: | ||
void qmlEngineAvailable(QQmlEngine * engine); | ||
}; | ||
|
||
#endif // BITCOIN_QML_TEST_SETUP_H |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.