Commit 3a4a042b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to fix mail import autotest

parent 17994fc4
......@@ -48,6 +48,13 @@ void LogCreatingResource::logSynchronizeResource(const QStringList &lst)
}
}
void LogCreatingResource::logRegisterSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId)
{
QTextStream stream(mTmpLogFile);
stream << "Special Collection : " << type << " colId " << colId << '\n';
stream << "--------------------------\n";
}
QString LogCreatingResource::logPath() const
{
return mTmpLogFile->fileName();
......
......@@ -21,6 +21,7 @@
#define LOGCREATINGRESOURCE_H
#include <QObject>
#include <Akonadi/KMime/SpecialMailCollections>
class QTemporaryFile;
class LogCreatingResource : public QObject
{
......@@ -32,6 +33,7 @@ public:
Q_REQUIRED_RESULT QString logPath() const;
Q_REQUIRED_RESULT QString logCreateResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree);
void logSynchronizeResource(const QStringList &lst);
void logRegisterSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId);
private:
QTemporaryFile *mTmpLogFile = nullptr;
int mResourceIndex = 0;
......
......@@ -56,6 +56,7 @@ QString ImportMailJobInterfaceTestImpl::createResource(const QString &resources,
void ImportMailJobInterfaceTestImpl::registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId)
{
mLogCreateResource->logRegisterSpecialCollection(type, colId);
qDebug() << "void ImportMailJobInterfaceTestImpl::registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId) not implemented yet ";
}
......@@ -107,7 +108,7 @@ void ImportMailJobInterfaceTest::importMail()
QFETCH(Utils::StoredTypes, options);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
file->setExtractPath(QDir::tempPath() + QLatin1Char('/') + testPath);
file->setExcludePath(Utils::mailsPath()); // ???
ImportMailJobInterfaceTestImpl *impl = new ImportMailJobInterfaceTestImpl(this, options, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
......
......@@ -53,7 +53,7 @@ Akonadi::Collection::Id ResourceConverterTest::convertFolderPathToCollectionId(c
QString ResourceConverterTest::changeResourcePath(QString url) const
{
qDebug() << " need to fix " << url;
qDebug() << " need to fix " << url << " mTestPath " << mTestPath;
if (!url.isEmpty()) {
url.replace(QLatin1String("[TEST_PATH]"), mTestPath);
}
......
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