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
b8218a33
Commit
b8218a33
authored
Oct 21, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(Dialog/ConfirmDialog.spec.qml): use `SignalSpy`
parent
3a8bf11f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
14 deletions
+28
-14
ConfirmDialog.spec.qml
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
+28
-14
No files found.
tests/ui/modules/Common/Dialog/ConfirmDialog.spec.qml
View file @
b8218a33
...
...
@@ -11,14 +11,28 @@ TestCase {
Component
{
id
:
builder
ConfirmDialog
{}
Item
{
ConfirmDialog
{
id
:
confirmDialog
}
SignalSpy
{
id
:
spy
signalName
:
'
exitStatus
'
target
:
confirmDialog
}
}
}
function
buildConfirmDialog
()
{
var
dialog
=
builder
.
createObject
(
testCase
)
verify
(
dialog
)
var
container
=
builder
.
createObject
(
testCase
)
verify
(
container
)
var
dialog
=
container
.
data
[
0
]
dialog
.
closing
.
connect
(
dialog
.
destroy
.
bind
(
dialog
))
return
dialog
return
container
}
function
test_exitStatusViaButtons_data
()
{
...
...
@@ -29,22 +43,22 @@ TestCase {
}
function
test_exitStatusViaButtons
(
data
)
{
var
dialog
=
buildConfirmDialog
()
dialog
.
exitStatus
.
connect
(
function
(
status
)
{
compare
(
status
,
data
.
expectedStatus
)
})
var
container
=
buildConfirmDialog
()
var
dialog
=
container
.
data
[
0
]
var
spy
=
container
.
data
[
1
]
mouseClick
(
dialog
.
buttons
[
data
.
button
])
spy
.
wait
(
100
)
compare
(
spy
.
signalArguments
[
0
][
0
],
data
.
expectedStatus
)
}
function
test_exitStatusViaClose
()
{
var
dialog
=
buildConfirmDialog
()
dialog
.
exitStatus
.
connect
(
function
(
status
)
{
compare
(
status
,
0
)
})
var
container
=
buildConfirmDialog
()
var
dialog
=
container
.
data
[
0
]
var
spy
=
container
.
data
[
1
]
dialog
.
close
()
spy
.
wait
(
100
)
compare
(
spy
.
signalArguments
[
0
][
0
],
0
)
}
}
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