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
55b07cb1
Commit
55b07cb1
authored
Jul 19, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(tests/self-test): fix test for mac os
parent
e35927d1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
8 deletions
+21
-8
CoreManager.cpp
src/components/core/CoreManager.cpp
+2
-0
CoreManager.hpp
src/components/core/CoreManager.hpp
+6
-0
MainViewTest.cpp
src/tests/main-view/MainViewTest.cpp
+1
-1
SelfTest.cpp
src/tests/self-test/SelfTest.cpp
+9
-4
DesktopPopup.qml
ui/modules/Common/Popup/DesktopPopup.qml
+1
-1
Notification.spec.qml
ui/modules/Linphone/Notifications/Notification.spec.qml
+1
-1
ManageAccounts.qml
ui/views/App/Main/Dialogs/ManageAccounts.qml
+1
-1
No files found.
src/components/core/CoreManager.cpp
View file @
55b07cb1
...
...
@@ -63,6 +63,8 @@ CoreManager::CoreManager (QObject *parent, const QString &configPath) :
mInstance
->
mSettingsModel
=
new
SettingsModel
(
mInstance
);
mInstance
->
mAccountSettingsModel
=
new
AccountSettingsModel
(
mInstance
);
mInstance
->
mStarted
=
true
;
emit
mInstance
->
coreStarted
();
});
...
...
src/components/core/CoreManager.hpp
View file @
55b07cb1
...
...
@@ -47,6 +47,10 @@ class CoreManager : public QObject {
public:
~
CoreManager
()
=
default
;
bool
started
()
const
{
return
mStarted
;
}
std
::
shared_ptr
<
linphone
::
Core
>
getCore
()
{
Q_CHECK_PTR
(
mCore
);
return
mCore
;
...
...
@@ -151,6 +155,8 @@ private:
std
::
shared_ptr
<
linphone
::
Core
>
mCore
;
std
::
shared_ptr
<
CoreHandlers
>
mHandlers
;
bool
mStarted
=
false
;
CallsListModel
*
mCallsListModel
=
nullptr
;
ContactsListModel
*
mContactsListModel
=
nullptr
;
SipAddressesModel
*
mSipAddressesModel
=
nullptr
;
...
...
src/tests/main-view/MainViewTest.cpp
View file @
55b07cb1
...
...
@@ -42,7 +42,7 @@ void MainViewTest::showManageAccountsPopup () {
QVERIFY
(
virtualWindowContent
);
QVERIFY
(
!
strncmp
(
virtualWindowContent
->
metaObject
()
->
className
(),
name
,
sizeof
name
-
1
));
QCOMPARE
(
virtualWindowContent
->
objectName
(),
QStringLiteral
(
"manageAccounts"
));
QCOMPARE
(
virtualWindowContent
->
objectName
(),
QStringLiteral
(
"
__
manageAccounts"
));
// Close popup.
QTest
::
mouseClick
(
mainWindow
,
Qt
::
LeftButton
,
Qt
::
KeyboardModifiers
(),
QPoint
(
476
,
392
));
...
...
src/tests/self-test/SelfTest.cpp
View file @
55b07cb1
...
...
@@ -20,6 +20,7 @@
* Author: Ronan Abhamon
*/
#include <QQmlProperty>
#include <QSignalSpy>
#include <QTest>
...
...
@@ -32,12 +33,16 @@
// =============================================================================
void
SelfTest
::
checkAppStartup
()
{
QSignalSpy
spyCoreStarted
(
CoreManager
::
getInstance
()
->
getHandlers
().
get
(),
&
CoreHandlers
::
coreStarted
);
Q
SignalSpy
spyLoaderReady
(
TestUtils
::
getMainLoaderFromMainWindow
(),
SIGNAL
(
loaded
())
);
CoreManager
*
coreManager
=
CoreManager
::
getInstance
(
);
Q
QuickItem
*
mainLoader
=
TestUtils
::
getMainLoaderFromMainWindow
(
);
QVERIFY
(
spyCoreStarted
.
wait
(
5000
));
QSignalSpy
spyCoreStarted
(
coreManager
->
getHandlers
().
get
(),
&
CoreHandlers
::
coreStarted
);
QSignalSpy
spyLoaderReady
(
mainLoader
,
SIGNAL
(
loaded
()));
if
(
spyLoaderReady
.
count
()
!=
1
)
if
(
!
coreManager
->
started
())
QVERIFY
(
spyCoreStarted
.
wait
(
5000
));
if
(
!
QQmlProperty
::
read
(
mainLoader
,
"item"
).
value
<
QObject
*>
())
QVERIFY
(
spyLoaderReady
.
wait
(
1000
));
QVERIFY
(
QTest
::
qWaitForWindowExposed
(
App
::
getInstance
()
->
getMainWindow
()));
...
...
ui/modules/Common/Popup/DesktopPopup.qml
View file @
55b07cb1
...
...
@@ -48,7 +48,7 @@ Item {
id
:
window
// Used for internal purposes only. Like Notifications.
objectName
:
'
internalWindow
'
objectName
:
'
__
internalWindow
'
flags
:
wrapper
.
flags
opacity
:
0
...
...
ui/modules/Linphone/Notifications/Notification.spec.qml
View file @
55b07cb1
...
...
@@ -39,6 +39,6 @@ TestCase {
var
window
=
notification
.
data
[
0
]
compare
(
Utils
.
qmlTypeof
(
window
,
'
QQuickWindowQmlImpl
'
),
true
)
compare
(
window
.
objectName
===
'
internalWindow
'
,
true
)
compare
(
window
.
objectName
===
'
__
internalWindow
'
,
true
)
}
}
ui/views/App/Main/Dialogs/ManageAccounts.qml
View file @
55b07cb1
...
...
@@ -18,7 +18,7 @@ DialogPlus {
]
centeredButtons
:
true
objectName
:
'
manageAccounts
'
objectName
:
'
__
manageAccounts
'
height
:
ManageAccountsStyle
.
height
width
:
ManageAccountsStyle
.
width
...
...
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