Commit eeb073e9 authored by Ronan Abhamon's avatar Ronan Abhamon

fix(UnitTests): add a `Units` mock

parent b9353adc
...@@ -9,6 +9,7 @@ TEST_RUNNER='qmltestrunner' ...@@ -9,6 +9,7 @@ TEST_RUNNER='qmltestrunner'
RESOURCES_FILE='resources.qrc' RESOURCES_FILE='resources.qrc'
TEST_FILE_EXTENSION='spec.qml' TEST_FILE_EXTENSION='spec.qml'
DEV_MODULES_PATH='./ui/dev-modules'
MODULES_PATH='./ui/modules' MODULES_PATH='./ui/modules'
SCRIPTS_PATH='./ui/scripts' SCRIPTS_PATH='./ui/scripts'
...@@ -41,7 +42,7 @@ do ...@@ -41,7 +42,7 @@ do
if [ -f $spec_file ]; then if [ -f $spec_file ]; then
printf "${BLUE}Running unit qml tests of '${source_file}'...${NC}\n" printf "${BLUE}Running unit qml tests of '${source_file}'...${NC}\n"
$TEST_RUNNER -import $MODULES_PATH -import $SCRIPTS_PATH -input "$spec_file" $TEST_RUNNER -import $DEV_MODULES_PATH -import $MODULES_PATH -import $SCRIPTS_PATH -input "$spec_file"
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
printf "${GREEN}All unit tests have succeeded for '${spec_file}'.\n" printf "${GREEN}All unit tests have succeeded for '${spec_file}'.\n"
......
...@@ -18,7 +18,7 @@ cd $SCRIPT_DIR/.. ...@@ -18,7 +18,7 @@ cd $SCRIPT_DIR/..
echo '<!DOCTYPE RCC><RCC version="1.0"> echo '<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/">' > $RESOURCES_FILE <qresource prefix="/">' > $RESOURCES_FILE
for filename in $(find ui/ assets/ -type f | sort) for filename in $(find ui/modules/ ui/scripts/ ui/views/ assets/ -type f | sort)
do do
basename="${filename##*/}" basename="${filename##*/}"
extension="${filename##*.}" extension="${filename##*.}"
......
pragma Singleton
import QtQml 2.2
// =============================================================================
QtObject {
property real dp: 1.0
}
# ==============================================================================
# Units component to export.
# ==============================================================================
module Units
singleton Units 1.0 Units.qml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment