Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Akonadi Contacts
Commits
4e7135d2
Commit
4e7135d2
authored
Feb 02, 2016
by
Laurent Montel
😁
Browse files
Add autotests
parent
aac8bb0e
Changes
6
Hide whitespace changes
Inline
Side-by-side
akonadi-contact/CMakeLists.txt
View file @
4e7135d2
...
...
@@ -31,6 +31,7 @@ ecm_setup_version(${KDEPIMLIBS_VERSION} VARIABLE_PREFIX AKONADICONTACT
SOVERSION 5
)
set
(
QT_REQUIRED_VERSION
"5.5.0"
)
find_package
(
Qt5
${
QT_REQUIRED_VERSION
}
CONFIG REQUIRED Widgets Test WebKitWidgets
)
########### Find packages ###########
find_package
(
KF5KIO
${
KF5_VERSION
}
CONFIG REQUIRED
)
...
...
akonadi-contact/src/editor/addresseditor/addresseslocationgrantleeformater.cpp
View file @
4e7135d2
...
...
@@ -63,7 +63,7 @@ void AddressesLocationGrantleeFormater::changeGrantleePath(const QString &path)
mTemplateLoader
->
setTemplateDirs
(
QStringList
()
<<
path
);
mEngine
->
addTemplateLoader
(
mTemplateLoader
);
mSelfcontainedTemplate
=
mEngine
->
loadByName
(
QStringLiteral
(
"
sss"
));
//TODO
mSelfcontainedTemplate
=
mEngine
->
loadByName
(
QStringLiteral
(
"
addresseslocation.html"
));
if
(
mSelfcontainedTemplate
->
error
())
{
mErrorMessage
+=
mSelfcontainedTemplate
->
errorString
()
+
QLatin1String
(
"<br>"
);
}
...
...
akonadi-contact/src/editor/addresseditor/autotests/CMakeLists.txt
View file @
4e7135d2
set
(
QT_REQUIRED_VERSION
"5.4.0"
)
find_package
(
Qt5Test
${
QT_REQUIRED_VERSION
}
CONFIG REQUIRED
)
set
(
addresseslocationviewer_SRCS addresseslocationviewertest.cpp
)
set
(
addresseslocationviewer_SRCS addresseslocationviewertest.cpp
../addresseslocationviewer.cpp ../addresseslocationgrantleeformater.cpp ../addressgrantleeobject.cpp
)
add_executable
(
addresseslocationviewer
${
addresseslocationviewer_SRCS
}
)
add_test
(
addresseslocationviewer addresseslocationviewer
)
ecm_mark_as_test
(
addresseslocationviewer
)
target_link_libraries
(
addresseslocationviewer Qt5::Test Qt5::Widgets KF5::AkonadiContact KF5::Contacts KF5::I18n
)
target_link_libraries
(
addresseslocationviewer Qt5::Test Qt5::Widgets KF5::AkonadiContact KF5::Contacts KF5::I18n
Qt5::WebKitWidgets Grantlee5::Templates
)
set
(
addresslocationwidget_SRCS addresslocationwidgettest.cpp ../addresslocationwidget.cpp
)
...
...
akonadi-contact/src/editor/addresseditor/autotests/addresseslocationviewertest.cpp
View file @
4e7135d2
...
...
@@ -21,6 +21,7 @@
*/
#include "addresseslocationviewertest.h"
#include "../addresseslocationviewer.h"
#include <QTest>
AddressesLocationViewerTest
::
AddressesLocationViewerTest
(
QObject
*
parent
)
...
...
@@ -34,4 +35,10 @@ AddressesLocationViewerTest::~AddressesLocationViewerTest()
}
void
AddressesLocationViewerTest
::
shouldHaveDefaultValue
()
{
AddressesLocationViewer
w
;
QVERIFY
(
w
.
addresses
().
isEmpty
());
}
QTEST_MAIN
(
AddressesLocationViewerTest
)
akonadi-contact/src/editor/addresseditor/autotests/addresseslocationviewertest.h
View file @
4e7135d2
...
...
@@ -31,6 +31,8 @@ class AddressesLocationViewerTest : public QObject
public:
explicit
AddressesLocationViewerTest
(
QObject
*
parent
=
Q_NULLPTR
);
~
AddressesLocationViewerTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // ADDRESSESLOCATIONVIEWERTEST_H
akonadi-contact/src/editor/addresseditor/html/addresseslocation.html
0 → 100644
View file @
4e7135d2
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