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
63482c17
Commit
63482c17
authored
Oct 20, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Dialog/ConfirmDialog): add spec file to test exit statuses
parent
83946431
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
2 deletions
+58
-2
ConfirmDialog.spec.qml
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
+56
-0
utils.js
tests/ui/scripts/Utils/utils.js
+1
-1
utils.spec.qml
tests/ui/scripts/Utils/utils.spec.qml
+1
-1
No files found.
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
0 → 100644
View file @
63482c17
import
QtQuick
2.7
import
QtTest
1.1
// ===================================================================
TestCase
{
id
:
testCase
name
:
'
ConfirmDialogTests
'
function
createDialog
()
{
var
component
=
Qt
.
createComponent
(
'
./ConfirmDialog.qml
'
)
if
(
component
.
status
!==
Component
.
Ready
)
{
if
(
component
.
status
===
Component
.
Error
)
{
fail
(
'
Error:
'
+
component
.
errorString
())
}
else
{
fail
(
'
Dialog not ready.
'
)
}
}
var
dialog
=
component
.
createObject
(
testCase
)
dialog
.
closing
.
connect
(
dialog
.
destroy
.
bind
(
dialog
))
return
dialog
}
function
test_exitStatusViaButtons_data
()
{
return
[
{
button
:
0
,
expectedStatus
:
0
},
{
button
:
1
,
expectedStatus
:
1
},
]
}
function
test_exitStatusViaButtons
(
data
)
{
var
dialog
=
createDialog
()
dialog
.
exitStatus
.
connect
(
function
(
status
)
{
compare
(
status
,
data
.
expectedStatus
)
})
dialog
.
show
()
mouseClick
(
dialog
.
buttons
[
data
.
button
])
}
function
test_exitStatusViaClose
()
{
var
dialog
=
createDialog
()
dialog
.
exitStatus
.
connect
(
function
(
status
)
{
compare
(
status
,
0
)
})
dialog
.
close
()
}
}
tests/ui/scripts/Utils/utils.js
View file @
63482c17
...
...
@@ -21,7 +21,7 @@ function openWindow (window, parent, options) {
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
debug
(
'
Window not ready.
'
)
if
(
component
.
status
===
Component
.
Error
)
{
if
(
component
.
status
===
Component
.
Error
)
{
console
.
debug
(
'
Error:
'
+
component
.
errorString
())
}
return
// Error.
...
...
tests/ui/scripts/Utils/utils.spec.qml
View file @
63482c17
...
...
@@ -17,7 +17,7 @@ TestCase {
{
input
:
'
foo_bar
'
,
output
:
'
fooBar
'
},
{
input
:
'
george_abitbol
'
,
output
:
'
georgeAbitbol
'
},
{
input
:
'
billTremendousAndHubert
'
,
output
:
'
billTremendousAndHubert
'
},
{
input
:
'
foo_bAr_BAZ
'
,
output
:
'
fooBArBAZ
'
}
,
{
input
:
'
foo_bAr_BAZ
'
,
output
:
'
fooBArBAZ
'
}
]
}
...
...
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