Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libksieve
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
libksieve
Commits
ac549cb7
Commit
ac549cb7
authored
Jul 22, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add autotest
parent
55af3801
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
111 additions
and
3 deletions
+111
-3
src/ksieveui/CMakeLists.txt
src/ksieveui/CMakeLists.txt
+1
-0
src/ksieveui/editor/webengine/autotests/CMakeLists.txt
src/ksieveui/editor/webengine/autotests/CMakeLists.txt
+13
-0
src/ksieveui/editor/webengine/autotests/sieveeditorhelphtmlwidgettest.cpp
...tor/webengine/autotests/sieveeditorhelphtmlwidgettest.cpp
+58
-0
src/ksieveui/editor/webengine/autotests/sieveeditorhelphtmlwidgettest.h
...ditor/webengine/autotests/sieveeditorhelphtmlwidgettest.h
+35
-0
src/ksieveui/editor/webengine/sieveeditorhelphtmlwidget.cpp
src/ksieveui/editor/webengine/sieveeditorhelphtmlwidget.cpp
+4
-3
No files found.
src/ksieveui/CMakeLists.txt
View file @
ac549cb7
...
...
@@ -22,6 +22,7 @@ if(BUILD_TESTING)
add_subdirectory
(
sievescriptdebugger/tests
)
add_subdirectory
(
autocreatescripts/autotests/
)
add_subdirectory
(
editor/webengine/findbar/autotests/
)
add_subdirectory
(
editor/webengine/autotests/
)
endif
()
set
(
ksieveui_vacation_LIB_SRCS
...
...
src/ksieveui/editor/webengine/autotests/CMakeLists.txt
0 → 100644
View file @
ac549cb7
set
(
libksieveui_sieveeditorhelphtmlwidgettest_source sieveeditorhelphtmlwidgettest.cpp
../sieveeditorhelphtmlwidget.cpp
../sieveeditorwebengineview.cpp
../sieveeditorhelphtmlwidget.cpp
../sieveeditorloadprogressindicator.cpp
../findbar/findbarbase.cpp
../findbar/findbarwebengineview.cpp
)
add_executable
(
sieveeditorhelphtmlwidgettest
${
libksieveui_sieveeditorhelphtmlwidgettest_source
}
)
add_test
(
sieveeditorhelphtmlwidgettest sieveeditorhelphtmlwidgettest
)
ecm_mark_as_test
(
sieveeditorhelphtmlwidgettest
)
target_link_libraries
(
sieveeditorhelphtmlwidgettest Qt5::Test KF5::Completion KF5::PimCommon KF5::IconThemes Qt5::Gui Qt5::Widgets KF5::ConfigWidgets KF5::I18n KF5::PimTextEdit Qt5::WebEngineWidgets
)
set_property
(
TARGET sieveeditorhelphtmlwidgettest PROPERTY INCLUDE_DIRECTORIES
${
CMAKE_SOURCE_DIR
}
/src/ksieveui/editor/webengine/
${
CMAKE_SOURCE_DIR
}
/src/ksieveui/editor/webengine/findbar
${
CMAKE_BINARY_DIR
}
/src/ksieveui/
)
src/ksieveui/editor/webengine/autotests/sieveeditorhelphtmlwidgettest.cpp
0 → 100644
View file @
ac549cb7
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "sieveeditorhelphtmlwidgettest.h"
#include "../sieveeditorhelphtmlwidget.h"
#include <QTest>
#include "../findbar/findbarwebengineview.h"
#include "../sieveeditorloadprogressindicator.h"
#include "../sieveeditorwebengineview.h"
#include <kpimtextedit/slidecontainer.h>
SieveEditorHelpHtmlWidgetTest
::
SieveEditorHelpHtmlWidgetTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
}
SieveEditorHelpHtmlWidgetTest
::~
SieveEditorHelpHtmlWidgetTest
()
{
}
void
SieveEditorHelpHtmlWidgetTest
::
shouldHaveDefaultValue
()
{
KSieveUi
::
SieveEditorHelpHtmlWidget
w
;
KSieveUi
::
SieveEditorLoadProgressIndicator
*
mProgressIndicator
=
w
.
findChild
<
KSieveUi
::
SieveEditorLoadProgressIndicator
*>
(
QStringLiteral
(
"progressindicator"
));
QVERIFY
(
mProgressIndicator
);
KSieveUi
::
SieveEditorWebEngineView
*
mWebView
=
w
.
findChild
<
KSieveUi
::
SieveEditorWebEngineView
*>
(
QStringLiteral
(
"webview"
));
QVERIFY
(
mWebView
);
KPIMTextEdit
::
SlideContainer
*
mSliderContainer
=
w
.
findChild
<
KPIMTextEdit
::
SlideContainer
*>
(
QStringLiteral
(
"slidercontainer"
));
QVERIFY
(
mSliderContainer
);
KSieveUi
::
FindBarWebEngineView
*
mFindBar
=
w
.
findChild
<
KSieveUi
::
FindBarWebEngineView
*>
(
QStringLiteral
(
"findbar"
));
QVERIFY
(
mFindBar
);
}
QTEST_MAIN
(
SieveEditorHelpHtmlWidgetTest
)
src/ksieveui/editor/webengine/autotests/sieveeditorhelphtmlwidgettest.h
0 → 100644
View file @
ac549cb7
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef SIEVEEDITORHELPHTMLWIDGETTEST_H
#define SIEVEEDITORHELPHTMLWIDGETTEST_H
#include <QObject>
class
SieveEditorHelpHtmlWidgetTest
:
public
QObject
{
Q_OBJECT
public:
explicit
SieveEditorHelpHtmlWidgetTest
(
QObject
*
parent
=
Q_NULLPTR
);
~
SieveEditorHelpHtmlWidgetTest
();
private
Q_SLOTS
:
void
shouldHaveDefaultValue
();
};
#endif // SIEVEEDITORHELPHTMLWIDGETTEST_H
src/ksieveui/editor/webengine/sieveeditorhelphtmlwidget.cpp
View file @
ac549cb7
...
...
@@ -39,25 +39,26 @@ SieveEditorHelpHtmlWidget::SieveEditorHelpHtmlWidget(QWidget *parent)
:
QWidget
(
parent
),
mZoomFactor
(
100
)
{
QVBoxLayout
*
lay
=
new
QVBoxLayout
(
this
);
mProgressIndicator
=
new
SieveEditorLoadProgressIndicator
(
this
);
mProgressIndicator
->
setObjectName
(
QStringLiteral
(
"progressindicator"
));
connect
(
mProgressIndicator
,
&
SieveEditorLoadProgressIndicator
::
pixmapChanged
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotPixmapChanged
);
connect
(
mProgressIndicator
,
&
SieveEditorLoadProgressIndicator
::
loadFinished
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotLoadFinished
);
mWebView
=
new
SieveEditorWebEngineView
;
mWebView
->
setObjectName
(
QStringLiteral
(
"webview"
));
connect
(
mWebView
,
&
SieveEditorWebEngineView
::
titleChanged
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotTitleChanged
);
connect
(
mWebView
,
&
SieveEditorWebEngineView
::
loadStarted
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotLoadStarted
);
connect
(
mWebView
,
&
SieveEditorWebEngineView
::
loadFinished
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotFinished
);
connect
(
mWebView
,
&
SieveEditorWebEngineView
::
selectionChanged
,
this
,
&
SieveEditorHelpHtmlWidget
::
slotSelectionChanged
);
QVBoxLayout
*
lay
=
new
QVBoxLayout
;
lay
->
addWidget
(
mWebView
);
mSliderContainer
=
new
KPIMTextEdit
::
SlideContainer
(
this
);
mSliderContainer
->
setObjectName
(
QStringLiteral
(
"slidercontainer"
));
lay
->
addWidget
(
mSliderContainer
);
mFindBar
=
new
KSieveUi
::
FindBarWebEngineView
(
mWebView
,
this
);
mFindBar
->
setObjectName
(
QStringLiteral
(
"findbar"
));
connect
(
mFindBar
,
&
KSieveUi
::
FindBarWebEngineView
::
hideFindBar
,
mSliderContainer
,
&
KPIMTextEdit
::
SlideContainer
::
slideOut
);
mSliderContainer
->
setContent
(
mFindBar
);
setLayout
(
lay
);
}
SieveEditorHelpHtmlWidget
::~
SieveEditorHelpHtmlWidget
()
...
...
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