Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
32dc8354
Commit
32dc8354
authored
Oct 20, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(utils.spec.qml): add test on `openConfirmDialog`
parent
91ddaaa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
test_qml
tests/tools/test_qml
+3
-2
utils.js
tests/ui/scripts/Utils/utils.js
+3
-1
utils.spec.qml
tests/ui/scripts/Utils/utils.spec.qml
+19
-0
No files found.
tests/tools/test_qml
View file @
32dc8354
...
...
@@ -7,6 +7,7 @@
RESOURCES_FILE
=
'resources.qrc'
TEST_RUNNER
=
'qmltestrunner-qt5'
TEST_FILE_EXTENSION
=
'spec.qml'
MODULES_PATH
=
'./ui/modules'
RED
=
'\e[1;31m'
GREEN
=
'\e[1;32m'
...
...
@@ -20,7 +21,7 @@ cd $SCRIPT_DIR/..
printf
"
${
BLUE
}
Testing scripts lib...
${
NC
}
\n
"
so_far_so_good
=
0
$TEST_RUNNER
-input
'./ui/scripts/Utils/utils.spec.qml'
$TEST_RUNNER
-i
mport
$MODULES_PATH
-i
nput
'./ui/scripts/Utils/utils.spec.qml'
if
[[
$?
==
0
]]
;
then
printf
"
${
GREEN
}
Done. No error found in scripts lib.
\n
"
...
...
@@ -42,7 +43,7 @@ do
if
[
-f
$spec_qml_file
]
;
then
printf
"
${
BLUE
}
Running unit qml tests of '
${
qml_file
}
'...
${
NC
}
\n
"
$TEST_RUNNER
-import
'./ui/modules/'
-input
"
$spec_qml_file
"
$TEST_RUNNER
-import
$MODULES_PATH
-input
"
$spec_qml_file
"
if
[[
$?
==
0
]]
;
then
printf
"
${
GREEN
}
All unit tests have succeeded for '
${
spec_qml_file
}
'.
\n
"
...
...
tests/ui/scripts/Utils/utils.js
View file @
32dc8354
...
...
@@ -48,12 +48,14 @@ function openWindow (window, parent, options) {
}
object
.
show
()
return
object
}
// Display a simple ConfirmDialog component.
// Wrap the openWindow function.
function
openConfirmDialog
(
parent
,
options
)
{
openWindow
(
return
openWindow
(
'
import QtQuick 2.7;
'
+
'
import Common 1.0;
'
+
'
ConfirmDialog {
'
+
...
...
tests/ui/scripts/Utils/utils.spec.qml
View file @
32dc8354
...
...
@@ -12,6 +12,25 @@ TestCase {
name
:
'
UtilsTests
'
// Test only if a confirm dialog can be opened.
// The other tests are launched by `ConfirmDialog.spec.qml`.
function
test_openConfirmDialog
()
{
var
dialog
try
{
dialog
=
Utils
.
openConfirmDialog
(
testCase
,
{
descriptionText
:
''
,
title
:
''
})
}
catch
(
e
)
{
fail
(
e
)
}
dialog
.
close
()
}
// -----------------------------------------------------------------
function
test_snakeToCamel_data
()
{
return
[
{
input
:
'
foo_bar
'
,
output
:
'
fooBar
'
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment