Commit bcbf8441 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more autotest

parent dea59d1b
......@@ -53,6 +53,7 @@ void ExportAddressbookJobInterface::start()
void ExportAddressbookJobInterface::slotCheckBackupResource()
{
mAkonadiInstanceInfo = listOfResource();
setProgressDialogLabel(i18n("Backing up resources..."));
increaseProgressDialog();
exportArchiveResource();
......
......@@ -48,7 +48,6 @@ QVector<Utils::AkonadiInstanceInfo> ExportAddressbookJobInterfaceImpl::listOfRes
void ExportAddressbookJobInterfaceImpl::exportArchiveResource()
{
mAkonadiInstanceInfo = listOfResource();
QTimer::singleShot(0, this, &ExportAddressbookJobInterfaceImpl::slotWriteNextArchiveResource);
}
......
......@@ -107,6 +107,7 @@ void ExportAlarmJobInterface::slotWriteNextArchiveResource()
void ExportAlarmJobInterface::slotCheckBackupResource()
{
mAkonadiInstanceInfo = listOfResource();
setProgressDialogLabel(i18n("Backing up resources..."));
increaseProgressDialog();
exportArchiveResource();
......
......@@ -48,7 +48,6 @@ QVector<Utils::AkonadiInstanceInfo> ExportAlarmJobInterfaceImpl::listOfResource(
void ExportAlarmJobInterfaceImpl::exportArchiveResource()
{
mAkonadiInstanceInfo = listOfResource();
QTimer::singleShot(0, this, &ExportAlarmJobInterfaceImpl::slotWriteNextArchiveResource);
}
......
[Event/receivednotes]
Action=Sound|Popup
Execute=
Logfile=
Sound=
TTS=
[Defaults]
Profile=Default
[PROFILE_Default]
EmailAddress=
FullName=laurent
Organization=
ReplyAddr=
ServerType=
[General]
Default Identity=1578759321
[Identity #0]
Default Domain=linux-zym0
Disable Fcc=false
Identity=laurent
Image Location=
Inline Signature=
Name=laurent
Signature Enabled=false
uoid=1578759321
[Network]
KnownHosts=199.168.1.13
NoteHostDialogSize=596,334
Port=12
SenderID=VV
[SelectNoteFolder]
DefaultFolder=31
[$Version]
update_info=noteglobalsettings.upd:initial-noteagent-migration,noteglobalsettings.upd:selectcollection-noteagent-migration
[AgentTypeDialog]
Size=979,637
[Display]
width=260
[DownloadDialog Settings]
Height 1080=522
Width 1920=700
[Editor]
titlefont=Liberation Sans,12,-1,5,50,0,0,0,0,0,Regular
[KFileDialog Settings]
Height 1080=540
Width 1920=960
[KNoteDeleteSelectedNotesDialog]
Size=300,200
[KNoteFindDialog]
Size=461,270
[KNotePrintSelectedNotesDialog]
Size=960,656
[KNoteSimpleConfigDialog]
Size=600,400
[KNotesKeyDialog]
Size=1120,685
[KPimPrintPreviewDialog]
Size=1054,732
[Migratekde4]
Version=1
[Misc]
SystemTrayShowNotes=true
[SelectedNotefolderDialog]
Size=600,400
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
configs/akonadi_notes_agent.notifyrc
[Event/receivednotes]
Action=Sound|Popup
Execute=
Logfile=
Sound=
TTS=
[Network]
KnownHosts=199.168.1.13
NoteHostDialogSize=596,334
Port=12
SenderID=VV
[SelectNoteFolder]
DefaultFolder=foo/bla bla/bli31
[$Version]
update_info=noteglobalsettings.upd:initial-noteagent-migration,noteglobalsettings.upd:selectcollection-noteagent-migration
[AgentTypeDialog]
Size=979,637
[Display]
width=260
[DownloadDialog Settings]
Height 1080=522
Width 1920=700
[Editor]
titlefont=Liberation Sans,12,-1,5,50,0,0,0,0,0,Regular
[KFileDialog Settings]
Height 1080=540
Width 1920=960
[KNoteDeleteSelectedNotesDialog]
Size=300,200
[KNoteFindDialog]
Size=461,270
[KNotePrintSelectedNotesDialog]
Size=960,656
[KNoteSimpleConfigDialog]
Size=600,400
[KNotesKeyDialog]
Size=1120,685
[KPimPrintPreviewDialog]
Size=1054,732
[Migratekde4]
Version=1
[Misc]
SystemTrayShowNotes=true
[SelectedNotefolderDialog]
Size=600,400
[Defaults]
Profile=Default
[PROFILE_Default]
EmailAddress=
FullName=laurent
Organization=
ReplyAddr=
ServerType=
[General]
Default Identity=1578759321
[Identity #0]
Default Domain=linux-zym0
Disable Fcc=false
Identity=laurent
Image Location=
Inline Signature=
Name=laurent
Signature Enabled=false
uoid=1578759321
[Network]
KnownHosts=199.168.1.13
NoteHostDialogSize=596,334
Port=12
SenderID=VV
[SelectNoteFolder]
DefaultFolder=31
[$Version]
update_info=noteglobalsettings.upd:initial-noteagent-migration,noteglobalsettings.upd:selectcollection-noteagent-migration
[AgentTypeDialog]
Size=979,637
[Display]
width=260
[DownloadDialog Settings]
Height 1080=522
Width 1920=700
[Editor]
titlefont=Liberation Sans,12,-1,5,50,0,0,0,0,0,Regular
[KFileDialog Settings]
Height 1080=540
Width 1920=960
[KNoteDeleteSelectedNotesDialog]
Size=300,200
[KNoteFindDialog]
Size=461,270
[KNotePrintSelectedNotesDialog]
Size=960,656
[KNoteSimpleConfigDialog]
Size=600,400
[KNotesKeyDialog]
Size=1120,685
[KPimPrintPreviewDialog]
Size=1054,732
[Migratekde4]
Version=1
[Misc]
SystemTrayShowNotes=true
[SelectedNotefolderDialog]
Size=600,400
configs/globalnotesettings
configs/knotesrc
information/VERSION_2
information/exportdatatype.xml
[Network]
KnownHosts=199.168.1.13
NoteHostDialogSize=596,334
Port=12
SenderID=VV
[SelectNoteFolder]
DefaultFolder=foo/bla bla/bli31
[$Version]
update_info=noteglobalsettings.upd:initial-noteagent-migration,noteglobalsettings.upd:selectcollection-noteagent-migration
[AgentTypeDialog]
Size=979,637
[Display]
width=260
[DownloadDialog Settings]
Height 1080=522
Width 1920=700
[Editor]
titlefont=Liberation Sans,12,-1,5,50,0,0,0,0,0,Regular
[KFileDialog Settings]
Height 1080=540
Width 1920=960
[KNoteDeleteSelectedNotesDialog]
Size=300,200
[KNoteFindDialog]
Size=461,270
[KNotePrintSelectedNotesDialog]
Size=960,656
[KNoteSimpleConfigDialog]
Size=600,400
[KNotesKeyDialog]
Size=1120,685
[KPimPrintPreviewDialog]
Size=1054,732
[Migratekde4]
Version=1
[Misc]
SystemTrayShowNotes=true
[SelectedNotefolderDialog]
Size=600,400
......@@ -47,11 +47,16 @@ void ExportNotesJobInterfaceTestImpl::exportArchiveResource()
slotWriteNextArchiveResource();
}
void ExportNotesJobInterfaceTestImpl::setListOfResource(const QVector<Utils::AkonadiInstanceInfo> &instanceInfoList)
{
mAkonadiInstanceInfo = instanceInfoList;
}
QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResource()
{
qDebug() << " QVector<Utils::AkonadiInstanceInfo> ExportNotesJobInterfaceTestImpl::listOfResource()";
//TODO
return {};
return mListAkonadiInstanceInfo;
}
void ExportNotesJobInterfaceTestImpl::exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier)
......@@ -94,8 +99,8 @@ void ExportNotesJobInterfaceTest::exportNoteConfigAndResource_data()
{
QTest::addColumn<QByteArray>("configpath");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/export/");
QTest::newRow("test1") << pathConfig + QByteArray("test1/");
QTest::newRow("full") << pathConfig + QByteArray("full/");
QTest::newRow("test1resource") << pathConfig + QByteArray("test1resource/");
QTest::newRow("fullresource") << pathConfig + QByteArray("fullresource/");
}
void ExportNotesJobInterfaceTest::exportNoteConfigAndResource()
......
......@@ -31,12 +31,16 @@ public:
explicit ExportNotesJobInterfaceTestImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep);
~ExportNotesJobInterfaceTestImpl();
void setListOfResource(const QVector<Utils::AkonadiInstanceInfo> &instanceInfoList);
protected:
void exportArchiveResource() override;
void convertCollectionIdsToRealPath(KConfigGroup &selectFolderNoteGroup, const QString &selectFolderNoteGroupStr) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) override;
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
private:
QVector<Utils::AkonadiInstanceInfo> mListAkonadiInstanceInfo;
};
class ExportNotesJobInterfaceTest : public QObject
......
......@@ -99,6 +99,7 @@ void ExportCalendarJobInterface::start()
void ExportCalendarJobInterface::slotCheckBackupResource()
{
mAkonadiInstanceInfo = listOfResource();
setProgressDialogLabel(i18n("Backing up resources..."));
increaseProgressDialog();
exportArchiveResource();
......
......@@ -50,7 +50,6 @@ QVector<Utils::AkonadiInstanceInfo> ExportCalendarJobInterfaceImpl::listOfResour
void ExportCalendarJobInterfaceImpl::exportArchiveResource()
{
mAkonadiInstanceInfo = listOfResource();
QTimer::singleShot(0, this, &ExportCalendarJobInterfaceImpl::slotWriteNextArchiveResource);
}
......
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