diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,7 @@ # frontends add_subdirectory(zanshin) +add_subdirectory(renku) # modules add_subdirectory(akonadi) diff --git a/src/renku/CMakeLists.txt b/src/renku/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/renku/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(app) +add_subdirectory(kontact) + diff --git a/src/renku/app/CMakeLists.txt b/src/renku/app/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/renku/app/CMakeLists.txt @@ -0,0 +1,22 @@ +set(app_SRCS + aboutdata.cpp + dependencies.cpp + main.cpp +) + +kde4_add_executable(renku ${app_SRCS}) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") +target_link_libraries(renku + ${KDE4_KDEUI_LIBS} + akonadi + domain + presentation + scripting + utils + widgets + ${KDEPIM_STATIC_LIBS} +) + +install(TARGETS renku DESTINATION ${BIN_INSTALL_DIR}) +install(PROGRAMS renku.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) +install(FILES renku.appdata.xml DESTINATION share/appdata) diff --git a/src/renku/app/aboutdata.h b/src/renku/app/aboutdata.h new file mode 100644 --- /dev/null +++ b/src/renku/app/aboutdata.h @@ -0,0 +1,35 @@ +/* This file is part of Renku Notes + + Copyright 2011-2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef APP_ABOUTDATA_H +#define APP_ABOUTDATA_H + +#include + +namespace App +{ + KAboutData getAboutData(); +} + +#endif + diff --git a/src/renku/app/aboutdata.cpp b/src/renku/app/aboutdata.cpp new file mode 100644 --- /dev/null +++ b/src/renku/app/aboutdata.cpp @@ -0,0 +1,44 @@ +/* This file is part of Renku Notes + + Copyright 2011-2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "aboutdata.h" + +KAboutData App::getAboutData() +{ + KAboutData about("renku", "renku", + ki18n("Renku Notes"), "0.2.50", + ki18n("A note taking application which aims at getting your mind like water"), + KAboutData::License_GPL_V3, + ki18n("Copyright 2008-2015, Kevin Ottens ")); + + about.addAuthor(ki18n("Kevin Ottens"), + ki18n("Lead Developer"), + "ervin@kde.org"); + + about.addAuthor(ki18n("Mario Bensi"), + ki18n("Developer"), + "nef@ipsquad.net"); + + return about; +} + diff --git a/src/renku/app/dependencies.h b/src/renku/app/dependencies.h new file mode 100644 --- /dev/null +++ b/src/renku/app/dependencies.h @@ -0,0 +1,33 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef APP_DEPENDENCIES_H +#define APP_DEPENDENCIES_H + +namespace App +{ + void initializeDependencies(); +} + +#endif + diff --git a/src/renku/app/dependencies.cpp b/src/renku/app/dependencies.cpp new file mode 100644 --- /dev/null +++ b/src/renku/app/dependencies.cpp @@ -0,0 +1,139 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "dependencies.h" + +#include "akonadi/akonadiartifactqueries.h" +#include "akonadi/akonadicontextqueries.h" +#include "akonadi/akonadicontextrepository.h" +#include "akonadi/akonadidatasourcequeries.h" +#include "akonadi/akonadidatasourcerepository.h" +#include "akonadi/akonadinotequeries.h" +#include "akonadi/akonadinoterepository.h" +#include "akonadi/akonadiprojectqueries.h" +#include "akonadi/akonadiprojectrepository.h" +#include "akonadi/akonaditagqueries.h" +#include "akonadi/akonaditagrepository.h" +#include "akonadi/akonaditaskqueries.h" +#include "akonadi/akonaditaskrepository.h" + +#include "akonadi/akonadimessaging.h" +#include "akonadi/akonadimonitorimpl.h" +#include "akonadi/akonadiserializer.h" +#include "akonadi/akonadistorage.h" + +#include "presentation/noteapplicationmodel.h" + +#include "scripting/scripthandler.h" + +#include "utils/dependencymanager.h" + +void App::initializeDependencies() +{ + auto &deps = Utils::DependencyManager::globalInstance(); + + deps.add(); + deps.add(); + deps.add(); + deps.add(); + + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + deps.add(); + + + deps.add(); + + deps.add(); +} diff --git a/src/renku/app/main.cpp b/src/renku/app/main.cpp new file mode 100644 --- /dev/null +++ b/src/renku/app/main.cpp @@ -0,0 +1,115 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "widgets/applicationcomponents.h" +#include "widgets/availablepagesview.h" +#include "widgets/availablesourcesview.h" +#include "widgets/datasourcecombobox.h" +#include "widgets/editorview.h" +#include "widgets/pageview.h" + +#include "presentation/applicationmodel.h" + +#include "utils/dependencymanager.h" + +#include "dependencies.h" + +#include + +int main(int argc, char **argv) +{ + App::initializeDependencies(); + + QApplication app(argc, argv); + + KComponentData mainComponentData("renku"); + + auto widget = new QWidget; + auto components = new Widgets::ApplicationComponents(widget); + components->setModel(Utils::DependencyManager::globalInstance().create()); + + auto layout = new QVBoxLayout; + + auto hbox = new QHBoxLayout; + hbox->addWidget(components->defaultTaskSourceCombo()); + hbox->addWidget(components->defaultNoteSourceCombo()); + + layout->addLayout(hbox); + layout->addWidget(components->pageView()); + + widget->setLayout(layout); + + auto sourcesDock = new QDockWidget(QObject::tr("Sources")); + sourcesDock->setObjectName("sourcesDock"); + sourcesDock->setWidget(components->availableSourcesView()); + + auto pagesDock = new QDockWidget(QObject::tr("Pages")); + pagesDock->setObjectName("pagesDock"); + pagesDock->setWidget(components->availablePagesView()); + + auto editorDock = new QDockWidget(QObject::tr("Editor")); + editorDock->setObjectName("editorDock"); + editorDock->setWidget(components->editorView()); + + auto configureMenu = new QMenu(widget); + foreach (QAction *action, components->configureActions()) { + configureMenu->addAction(action); + } + + auto configureButton = new QToolButton(widget); + configureButton->setIcon(QIcon::fromTheme("configure")); + configureButton->setText(QObject::tr("Settings")); + configureButton->setToolTip(configureButton ->text()); + configureButton->setPopupMode(QToolButton::InstantPopup); + configureButton->setMenu(configureMenu); + + auto window = new KMainWindow; + window->resize(1024, 600); + window->setAutoSaveSettings("MainWindow"); + window->setCentralWidget(widget); + + QToolBar *mainToolBar = window->addToolBar(QObject::tr("Main")); + mainToolBar->setObjectName("mainToolBar"); + mainToolBar->addWidget(configureButton); + + window->addDockWidget(Qt::RightDockWidgetArea, editorDock); + window->addDockWidget(Qt::LeftDockWidgetArea, pagesDock); + window->addDockWidget(Qt::LeftDockWidgetArea, sourcesDock); + + window->show(); + + return app.exec(); +} diff --git a/src/renku/app/renku.appdata.xml b/src/renku/app/renku.appdata.xml new file mode 100644 --- /dev/null +++ b/src/renku/app/renku.appdata.xml @@ -0,0 +1,29 @@ + + + renku.desktop + CC0-1.0 + GPL-3.0+ + Renku + Note Taking Application + +

+ Renku is an efficient and simple application for managing your notes. + It helps you organize the knowledge you accumulate and acts as a personal wiki. + You'll never forget anything anymore, getting your mind like water. +

+

Features:

+
    +
  • Collects notes
  • +
  • Organize notes in topics
  • +
  • Akonadi-enabled application allowing to get the data from virtually anywhere (local, imap, web service...)
  • +
+
+ http://zanshin.kde.org + https://bugs.kde.org/enter_bug.cgi?format=guided&product=zanshin + + + http://kde.org/images/screenshots/zanshin.png + + + KDE +
diff --git a/src/renku/app/renku.desktop b/src/renku/app/renku.desktop new file mode 100755 --- /dev/null +++ b/src/renku/app/renku.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Type=Application +Categories=Qt;KDE;Utility;X-KDE-Utilities-PIM; +Exec=renku +Name=Renku +Icon=knotes +GenericName=Note Taking Application diff --git a/src/renku/kontact/CMakeLists.txt b/src/renku/kontact/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/src/renku/kontact/CMakeLists.txt @@ -0,0 +1,35 @@ +set(part_SRCS + ../app/aboutdata.cpp + ../app/dependencies.cpp + part.cpp +) + +kde4_add_plugin(renku_part ${part_SRCS}) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}") +target_link_libraries(renku_part + ${KDE4_KPARTS_LIBS} + akonadi + domain + presentation + scripting + utils + widgets + ${KDEPIM_STATIC_LIBS} +) + +install(TARGETS renku_part DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES renku_part.desktop DESTINATION ${SERVICES_INSTALL_DIR}) + +########################## + +set(kontact_SRCS + kontact_plugin.cpp +) + +kde4_add_plugin(kontact_renkuplugin ${kontact_SRCS}) +target_link_libraries(kontact_renkuplugin ${KDE4_KPARTS_LIBS} ${KDEPIMLIBS_KONTACTINTERFACE_LIBS}) + +install(TARGETS kontact_renkuplugin DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES renku_plugin.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kontact) +install(FILES renku_part.rc DESTINATION ${DATA_INSTALL_DIR}/renku) + diff --git a/src/renku/kontact/kontact_plugin.h b/src/renku/kontact/kontact_plugin.h new file mode 100644 --- /dev/null +++ b/src/renku/kontact/kontact_plugin.h @@ -0,0 +1,43 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef RENKU_KONTACT_PLUGIN_H +#define RENKU_KONTACT_PLUGIN_H + +#include + +class Plugin : public KontactInterface::Plugin +{ + Q_OBJECT + +public: + Plugin(KontactInterface::Core *core, const QVariantList &); + + int weight() const Q_DECL_OVERRIDE { return 449; } + +protected: + KParts::ReadOnlyPart *createPart() Q_DECL_OVERRIDE; +}; + +#endif + diff --git a/src/renku/kontact/kontact_plugin.cpp b/src/renku/kontact/kontact_plugin.cpp new file mode 100644 --- /dev/null +++ b/src/renku/kontact/kontact_plugin.cpp @@ -0,0 +1,40 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "kontact_plugin.h" + +#include + +EXPORT_KONTACT_PLUGIN(Plugin, renku) + +Plugin::Plugin(KontactInterface::Core *core, const QVariantList&) + : KontactInterface::Plugin(core, core, "renku") +{ + setComponentData(KontactPluginFactory::componentData()); +} + +KParts::ReadOnlyPart *Plugin::createPart() +{ + return loadPart(); +} + diff --git a/src/renku/kontact/part.h b/src/renku/kontact/part.h new file mode 100644 --- /dev/null +++ b/src/renku/kontact/part.h @@ -0,0 +1,42 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#ifndef RENKU_PART_H +#define RENKU_PART_H + +#include + +class Part : public KParts::ReadOnlyPart +{ + Q_OBJECT + +public: + Part(QWidget *parentWidget, QObject *parent, const QVariantList &); + ~Part(); + +protected: + virtual bool openFile() Q_DECL_OVERRIDE; +}; + +#endif + diff --git a/src/renku/kontact/part.cpp b/src/renku/kontact/part.cpp new file mode 100644 --- /dev/null +++ b/src/renku/kontact/part.cpp @@ -0,0 +1,87 @@ +/* This file is part of Renku Notes + + Copyright 2015 Kevin Ottens + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License or (at your option) version 3 or any later version + accepted by the membership of KDE e.V. (or its successor approved + by the membership of KDE e.V.), which shall act as a proxy + defined in Section 14 of version 3 of the license. + + This program 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + USA. +*/ + +#include "part.h" + +#include +#include +#include + +#include +#include +#include + +#include "../app/aboutdata.h" +#include "../app/dependencies.h" + +#include "presentation/applicationmodel.h" + +#include "widgets/applicationcomponents.h" +#include "widgets/availablepagesview.h" +#include "widgets/availablesourcesview.h" +#include "widgets/datasourcecombobox.h" +#include "widgets/editorview.h" +#include "widgets/pageview.h" + +#include "utils/dependencymanager.h" + +K_PLUGIN_FACTORY(PartFactory, registerPlugin();) +K_EXPORT_PLUGIN(PartFactory(App::getAboutData())) + +Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &) + : KParts::ReadOnlyPart(parent) +{ + App::initializeDependencies(); + + setComponentData(PartFactory::componentData()); + + auto splitter = new QSplitter(parentWidget); + auto sidebar = new QSplitter(Qt::Vertical, parentWidget); + + auto components = new Widgets::ApplicationComponents(parentWidget); + components->setModel(Utils::DependencyManager::globalInstance().create()); + + sidebar->addWidget(components->availablePagesView()); + sidebar->addWidget(components->availableSourcesView()); + + splitter->addWidget(sidebar); + splitter->addWidget(components->pageView()); + splitter->addWidget(components->editorView()); + setWidget(splitter); + + foreach (QAction *action, components->configureActions()) { + actionCollection()->addAction(action->objectName(), action); + } + + setXMLFile(KStandardDirs::locate("data", "renku/renku_part.rc")); +} + +Part::~Part() +{ +} + +bool Part::openFile() +{ + return false; +} + diff --git a/src/renku/kontact/renku_part.desktop b/src/renku/kontact/renku_part.desktop new file mode 100644 --- /dev/null +++ b/src/renku/kontact/renku_part.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Renku Part +X-KDE-ServiceTypes=KParts/ReadOnlyPart +X-KDE-Library=renku_part +Type=Service +Icon=knotes + diff --git a/src/renku/kontact/renku_part.rc b/src/renku/kontact/renku_part.rc new file mode 100644 --- /dev/null +++ b/src/renku/kontact/renku_part.rc @@ -0,0 +1,12 @@ + + + + + + Configure Renku + + + + + + diff --git a/src/renku/kontact/renku_plugin.desktop b/src/renku/kontact/renku_plugin.desktop new file mode 100644 --- /dev/null +++ b/src/renku/kontact/renku_plugin.desktop @@ -0,0 +1,20 @@ +[Desktop Entry] +Type=Service +Icon=knotes +X-KDE-ServiceTypes=Kontact/Plugin,KPluginInfo + +X-KDE-Library=kontact_renkuplugin +X-KDE-KontactPluginVersion=9 +X-KDE-KontactPartLibraryName=renku_part +X-KDE-KontactPartExecutableName=renku +X-KDE-KontactPartLoadOnStart=false +X-KDE-KontactPluginHasSummary=false + +X-KDE-PluginInfo-Name=kontact_renkuplugin +X-KDE-PluginInfo-Version=0.1 +X-KDE-PluginInfo-License=GPL +X-KDE-PluginInfo-EnabledByDefault=true +X-KDE-PluginInfo-AllowEmptySettings=true + +Comment=Kontact Renku Plugin +Name=Notes diff --git a/tests/features/CMakeLists.txt b/tests/features/CMakeLists.txt --- a/tests/features/CMakeLists.txt +++ b/tests/features/CMakeLists.txt @@ -2,8 +2,9 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND) add_subdirectory(zanshin) + add_subdirectory(renku) include(CucumberTests.cmake) - cucumber_tests(zanshin) + cucumber_tests(zanshin renku) endif() diff --git a/tests/features/renku/CMakeLists.txt b/tests/features/renku/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tests/features/renku/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(features) diff --git a/tests/features/renku/features/CMakeLists.txt b/tests/features/renku/features/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(step_definitions) diff --git a/tests/features/renku/features/inbox/inbox-display.feature b/tests/features/renku/features/inbox/inbox-display.feature new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/inbox/inbox-display.feature @@ -0,0 +1,12 @@ +Feature: Inbox content + As someone collecting notes + I can display the Inbox + In order to see the notes (e.g. any note not associated to tag) + + Scenario: Unorganized notes appear in the inbox + Given I display the "Inbox" page + And I look at the central list + When I list the items + Then the list is: + | display | + | 21/04/2014 14:49 | diff --git a/tests/features/renku/features/pages/pages-display.feature b/tests/features/renku/features/pages/pages-display.feature new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/pages/pages-display.feature @@ -0,0 +1,15 @@ +Feature: Available pages content + As someone collecting notes + I can see all the pages available to me + In order to display them and add notes to them + + Scenario: Inbox and tags appear in the list + Given I display the available pages + When I list the items + Then the list is: + | display | icon | + | Inbox | mail-folder-inbox | + | Tags | folder | + | Tags / Philosophy | view-pim-tasks | + | Tags / Physics | view-pim-tasks | + diff --git a/tests/features/renku/features/step_definitions/CMakeLists.txt b/tests/features/renku/features/step_definitions/CMakeLists.txt new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/step_definitions/CMakeLists.txt @@ -0,0 +1,28 @@ +include_directories(${Boost_INCLUDE_DIRS}) +include_directories(${CMAKE_SOURCE_DIR}/3rdparty/cucumber-cpp/include) + +# Because cucumber-cpp exhibits plenty of warnings +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") + +set(steps_SRCS + main.cpp + ../../../cuke-steps.cpp + ${CMAKE_SOURCE_DIR}/src/renku/app/dependencies.cpp +) + +kde4_add_executable(renku-cuke-steps ${steps_SRCS}) +target_link_libraries(renku-cuke-steps + cucumber-cpp + ${Boost_REGEX_LIBRARY} + ${Boost_SYSTEM_LIBRARY} + ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} + ${QT_QTTEST_LIBRARY} + ${QT_QTSCRIPT_LIBRARY} + + testlib + akonadi + domain + presentation + scripting + utils +) diff --git a/tests/features/renku/features/step_definitions/cucumber.wire b/tests/features/renku/features/step_definitions/cucumber.wire new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/step_definitions/cucumber.wire @@ -0,0 +1,2 @@ +host: localhost +port: 3902 diff --git a/tests/features/renku/features/step_definitions/main.cpp b/tests/features/renku/features/step_definitions/main.cpp new file mode 100644 --- /dev/null +++ b/tests/features/renku/features/step_definitions/main.cpp @@ -0,0 +1,10 @@ +#include "renku/app/dependencies.h" + +namespace CukeSteps +{ + void initializeAppDependencies() + { + App::initializeDependencies(); + } +} // namespace CukeSteps +