Commit 89e348e1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement autotest

parent 60f5c13f
configs/akonadi_notes_agent.notifyrc
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
Orientation=2
[Journalprint]
JournalsInRange=false
[Print day]
End time=2019,9,11,20,0,0
Exclude confidential=true
Exclude private=true
Exclude time=true
FromDate=2019,9,9,9,49,52
Include all events=false
Include description=true
Include todos=false
Note Lines=false
Print type=1
PrintFooter=false
Single line limit=false
Start time=2019,9,11,8,0,0
ToDate=2019,9,15,9,49,52
UseColors=false
[Print incidence]
FromDate=2019,9,9,9,49,52
Note Lines=true
PrintFooter=true
Show Options=true
Show Subitems and Notes=true
ToDate=2019,9,15,9,49,52
Use Attachments=true
Use Attendees=true
UseColors=true
[Print journal]
FromDate=2019,9,9,9,49,53
PrintFooter=true
ToDate=2019,9,15,9,49,53
UseColors=true
[Print month]
Exclude confidential=true
Exclude private=true
FromDate=2019,9,1,9,49,52
Include description=true
Include todos=false
Note Lines=true
Print daily incidences=true
Print week numbers=true
Print weekly incidences=true
PrintFooter=true
Single line limit=true
ToDate=2019,9,1,9,49,52
UseColors=true
[Print to-dos]
Connect subtodos=true
Exclude confidential=true
Exclude private=true
FromDate=2020,4,10,9,49,53
Include description=true
Include due date=true
Include percentage completed=true
Include priority=true
Page title=To-do list
Print type=0
PrintFooter=true
Sort direction=0
Sort field=0
Strike out completed summaries=true
ToDate=2020,4,16,9,49,53
UseColors=true
[Print week]
End time=2019,9,11,20,0,0
Exclude Time=false
Exclude confidential=false
Exclude private=false
FromDate=2019,9,9,9,49,52
Include Description=false
Include todos=false
Note Lines=false
Print type=2
PrintFooter=false
Single line limit=false
Start time=2019,9,11,8,0,0
ToDate=2019,9,15,9,49,52
UseColors=false
[Print year]
FromDate=2019,9,9,9,49,53
PrintFooter=true
ToDate=2019,9,15,9,49,53
UseColors=true
[Yearprint]
Pages=1
ShowHolidaysAs=1
ShowSubDayEventsAs=2
Year=2019
[Agenda View]
agendaViewItemIcons=\x01\x01\x00\x01\x01\x01\x00\x00\x00\x00
[Internal Settings]
Decorations At Agenda View Bottom=thisdayinhistory,picoftheday
Decorations At Agenda View Top=datenums
[KOrganizer Plugins]
SelectedPlugins=datenums
[Month View]
monthViewItemIcons=\x01\x01\x01\x00\x00\x01\x00\x00\x00\x00
[Resources Colors]
115=248,43,164
1252=58,212,197
1390=81,42,19
1472=30,184,12
1479=103,115,227
2110=255,85,0
2118=0,255,255
2209=85,255,0
2333=129,52,253
2334=10,179,166
2367=7,41,100
2502=110,39,127
2503=190,165,13
2519=119,197,150
2522=113,101,228
2523=203,83,247
2563=64,96,220
2737=179,35,181
2762=61,205,154
3096=203,33,161
3841=171,152,184
3845=136,205,247
3846=19,37,172
4054=112,22,169
6=110,9,184
[Timescale]
Timescale Timezones=Europe/Paris
[Todo View]
Full View Todo=false
This diff is collapsed.
configs/korganizerrc
configs/eventviewsrc
configs/korgacrc
configs/calendar_printing.rc
information/VERSION_2
information/exportdatatype.xml
Orientation=2
[Journalprint]
JournalsInRange=false
[Print day]
End time=2019,9,11,20,0,0
Exclude confidential=true
Exclude private=true
Exclude time=true
FromDate=2019,9,9,9,49,52
Include all events=false
Include description=true
Include todos=false
Note Lines=false
Print type=1
PrintFooter=false
Single line limit=false
Start time=2019,9,11,8,0,0
ToDate=2019,9,15,9,49,52
UseColors=false
[Print incidence]
FromDate=2019,9,9,9,49,52
Note Lines=true
PrintFooter=true
Show Options=true
Show Subitems and Notes=true
ToDate=2019,9,15,9,49,52
Use Attachments=true
Use Attendees=true
UseColors=true
[Print journal]
FromDate=2019,9,9,9,49,53
PrintFooter=true
ToDate=2019,9,15,9,49,53
UseColors=true
[Print month]
Exclude confidential=true
Exclude private=true
FromDate=2019,9,1,9,49,52
Include description=true
Include todos=false
Note Lines=true
Print daily incidences=true
Print week numbers=true
Print weekly incidences=true
PrintFooter=true
Single line limit=true
ToDate=2019,9,1,9,49,52
UseColors=true
[Print to-dos]
Connect subtodos=true
Exclude confidential=true
Exclude private=true
FromDate=2020,4,10,9,49,53
Include description=true
Include due date=true
Include percentage completed=true
Include priority=true
Page title=To-do list
Print type=0
PrintFooter=true
Sort direction=0
Sort field=0
Strike out completed summaries=true
ToDate=2020,4,16,9,49,53
UseColors=true
[Print week]
End time=2019,9,11,20,0,0
Exclude Time=false
Exclude confidential=false
Exclude private=false
FromDate=2019,9,9,9,49,52
Include Description=false
Include todos=false
Note Lines=false
Print type=2
PrintFooter=false
Single line limit=false
Start time=2019,9,11,8,0,0
ToDate=2019,9,15,9,49,52
UseColors=false
[Print year]
FromDate=2019,9,9,9,49,53
PrintFooter=true
ToDate=2019,9,15,9,49,53
UseColors=true
[Yearprint]
Pages=1
ShowHolidaysAs=1
ShowSubDayEventsAs=2
Year=2019
[Agenda View]
agendaViewItemIcons=\x01\x01\x00\x01\x01\x01\x00\x00\x00\x00
[Internal Settings]
Decorations At Agenda View Bottom=thisdayinhistory,picoftheday
Decorations At Agenda View Top=datenums
[KOrganizer Plugins]
SelectedPlugins=datenums
[Month View]
monthViewItemIcons=\x01\x01\x01\x00\x00\x01\x00\x00\x00\x00
[Resources Colors]
foo/bla bla/bli115=248,43,164
foo/bla bla/bli1252=58,212,197
foo/bla bla/bli1390=81,42,19
foo/bla bla/bli1472=30,184,12
foo/bla bla/bli1479=103,115,227
foo/bla bla/bli2110=255,85,0
foo/bla bla/bli2118=0,255,255
foo/bla bla/bli2209=85,255,0
foo/bla bla/bli2333=129,52,253
foo/bla bla/bli2334=10,179,166
foo/bla bla/bli2367=7,41,100
foo/bla bla/bli2502=110,39,127
foo/bla bla/bli2503=190,165,13
foo/bla bla/bli2519=119,197,150
foo/bla bla/bli2522=113,101,228
foo/bla bla/bli2523=203,83,247
foo/bla bla/bli2563=64,96,220
foo/bla bla/bli2737=179,35,181
foo/bla bla/bli2762=61,205,154
foo/bla bla/bli3096=203,33,161
foo/bla bla/bli3841=171,152,184
foo/bla bla/bli3845=136,205,247
foo/bla bla/bli3846=19,37,172
foo/bla bla/bli4054=112,22,169
foo/bla bla/bli6=110,9,184
[Timescale]
Timescale Timezones=Europe/Paris
[Todo View]
Full View Todo=false
configs/korganizerrc
configs/eventviewsrc
configs/korgacrc
configs/calendar_printing.rc
information/VERSION_2
information/exportdatatype.xml
configs/kmail2rc
information/VERSION_2
information/exportdatatype.xml
configs/foldermailarchiverc
configs/templatesconfigurationrc
......@@ -42,11 +42,13 @@ Akonadi::Collection::Id ImportMailJobInterfaceTestImpl::convertFolderPathToColle
void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{
qDebug() << " void ImportMailJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)" << lst;
//TODO
}
QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)
{
qDebug() << " QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
//TODO
return {};
}
......
......@@ -43,13 +43,17 @@ Akonadi::Collection::Id ImportNotesJobInterfaceTestImpl::convertFolderPathToColl
QString ImportNotesJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
{
qDebug() << " QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings)" << resources << " name " << name << " settings " << settings;
//TODO
return {};
}
void ImportNotesJobInterfaceTestImpl::synchronizeResource(const QStringList &lst)
{
//TODO
//TODO log it!
qDebug() << " void ImportNotesJobInterfaceTestImpl::synchronizeResource(const QStringList &lst) TODO IMPLEMENT" << lst;
slotNextStep();
}
ImportNotesJobInterfaceTest::ImportNotesJobInterfaceTest(QObject *parent)
......@@ -69,7 +73,7 @@ void ImportNotesJobInterfaceTest::importNoteConfig()
{
QFETCH(QString, zipFilePath);
QFETCH(QString, testPath);
TestImportFile *file = new TestImportFile(zipFilePath, this);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
ImportNotesJobInterfaceTestImpl *impl = new ImportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
......@@ -78,3 +82,28 @@ void ImportNotesJobInterfaceTest::importNoteConfig()
delete impl;
delete file;
}
void ImportNotesJobInterfaceTest::importNoteConfigAndResources_data()
{
QTest::addColumn<QString>("zipFilePath");
QTest::addColumn<QString>("testPath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/import/");
QTest::newRow("test1") << QString::fromLatin1(pathConfig) << QStringLiteral("/test1/");
}
void ImportNotesJobInterfaceTest::importNoteConfigAndResources()
{
QFETCH(QString, zipFilePath);
QFETCH(QString, testPath);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
ImportNotesJobInterfaceTestImpl *impl = new ImportNotesJobInterfaceTestImpl(this, {Utils::StoredType::Config|Utils::StoredType::Resources}, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
delete impl;
delete file;
}
......@@ -46,6 +46,8 @@ public:
private Q_SLOTS:
void importNoteConfig();
void importNoteConfig_data();
void importNoteConfigAndResources();
void importNoteConfigAndResources_data();
};
#endif // IMPORTNOTESJOBINTERFACETEST_H
......@@ -26,7 +26,7 @@
#include <QDir>
#include <QSignalSpy>
#include <QTest>
#define REMOVE_CREATED_ZIP_FILE 1
//#define REMOVE_CREATED_ZIP_FILE 1
TestExportFile::TestExportFile(QObject *parent)
: QObject(parent)
......
......@@ -25,12 +25,13 @@
#include <QSignalSpy>
#include <QTest>
#define REMOVE_TEMPORARY_DIR 1
//#define REMOVE_TEMPORARY_DIR 1
TestImportFile::TestImportFile(const QString &archivePath, QObject *parent)
: QObject(parent)
, mArchivePath(archivePath + QStringLiteral("archive.zip"))
{
//qDebug() << " mArchivePath " << mArchivePath;
mArchiveStorage = new ArchiveStorage(mArchivePath, this);
Q_ASSERT(mArchiveStorage->openArchive(false));
}
......
......@@ -35,7 +35,6 @@ public:
protected:
virtual Q_REQUIRED_RESULT QString createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree = false) = 0;
virtual void synchronizeResource(const QStringList &lst) = 0;
private:
void slotNextStep() override;
private:
void importKNoteGlobalSettings(const KArchiveFile *kmailsnippet, const QString &kmail2rc, const QString &filename, const QString &prefix);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment