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
fbfa00a3
Commit
fbfa00a3
authored
Nov 16, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Notifications/Notification): add spec file
parent
91bb74c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
Notifier.cpp
tests/src/components/notifier/Notifier.cpp
+1
-1
Notification.spec.qml
...s/ui/modules/Linphone/Notifications/Notification.spec.qml
+25
-0
utils.js
tests/ui/scripts/Utils/utils.js
+12
-0
No files found.
tests/src/components/notifier/Notifier.cpp
View file @
fbfa00a3
...
@@ -112,7 +112,7 @@ void Notifier::showCallMessage (
...
@@ -112,7 +112,7 @@ void Notifier::showCallMessage (
);
);
// Destroy it after timeout.
// Destroy it after timeout.
QTimer
::
singleShot
(
timeout
,
this
,
[
object
,
this
]()
{
QTimer
::
singleShot
(
timeout
,
this
,
[
object
,
this
]()
{
delete
object
;
delete
object
;
m_mutex
.
lock
();
m_mutex
.
lock
();
...
...
tests/ui/modules/Linphone/Notifications/Notification.spec.qml
0 → 100644
View file @
fbfa00a3
import
QtTest
1.1
import
Linphone
1.0
import
Utils
1.0
// ===================================================================
// Check defined properties/methods used in `Notifier.cpp`.
TestCase
{
Notification
{
id
:
notification
}
function
test_notificationHeightProperty
()
{
compare
(
Utils
.
isInteger
(
notification
.
notificationHeight
),
true
)
}
function
test_notificationOffsetProperty
()
{
compare
(
Utils
.
isInteger
(
notification
.
notificationOffset
),
true
)
}
function
test_notificationShowMethod
()
{
compare
(
Utils
.
isFunction
(
notification
.
show
),
true
)
}
}
tests/ui/scripts/Utils/utils.js
View file @
fbfa00a3
...
@@ -365,6 +365,18 @@ function isArray (array) {
...
@@ -365,6 +365,18 @@ function isArray (array) {
// -------------------------------------------------------------------
// -------------------------------------------------------------------
function
isFunction
(
func
)
{
return
typeof
func
===
'
function
'
}
// -------------------------------------------------------------------
function
isInteger
(
integer
)
{
return
integer
===
parseInt
(
integer
,
10
)
}
// -------------------------------------------------------------------
function
isString
(
string
)
{
function
isString
(
string
)
{
return
typeof
string
===
'
string
'
||
string
instanceof
String
return
typeof
string
===
'
string
'
||
string
instanceof
String
}
}
...
...
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