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

Fix import akregator autotest

parent dd25a544
......@@ -51,22 +51,28 @@ ImportAkregatorJobInterfaceTest::ImportAkregatorJobInterfaceTest(QObject *parent
{
}
void ImportAkregatorJobInterfaceTest::importCalendarConfig_data()
void ImportAkregatorJobInterfaceTest::importAkegator_data()
{
QTest::addColumn<QString>("zipFilePath");
QTest::addColumn<QString>("testPath");
QTest::addColumn<Utils::StoredTypes>("options");
const QByteArray pathConfig(QByteArray(PIMDATAEXPORTER_DIR) + "/import/");
QTest::newRow("test1") << QString::fromLatin1(pathConfig) << QStringLiteral("/test1/");
Utils::StoredTypes options = {Utils::StoredType::Config};
QTest::newRow("test1") << QString::fromLatin1(pathConfig) << QStringLiteral("/test1/") << options;
options = {Utils::StoredType::Config|Utils::StoredType::Resources};
QTest::newRow("test1resource") << QString::fromLatin1(pathConfig) << QStringLiteral("/test1resource/") << options;
}
void ImportAkregatorJobInterfaceTest::importCalendarConfig()
void ImportAkregatorJobInterfaceTest::importAkegator()
{
QFETCH(QString, zipFilePath);
QFETCH(QString, testPath);
QFETCH(Utils::StoredTypes, options);
TestImportFile *file = new TestImportFile(zipFilePath + testPath, this);
file->setPathConfig(zipFilePath + testPath);
file->setExtractPath(QDir::tempPath() + testPath);
ImportAkregatorJobInterfaceTestImpl *impl = new ImportAkregatorJobInterfaceTestImpl(this, {Utils::StoredType::Config}, file->archiveStorage(), 1);
ImportAkregatorJobInterfaceTestImpl *impl = new ImportAkregatorJobInterfaceTestImpl(this, options, file->archiveStorage(), 1);
file->setAbstractImportExportJob(impl);
file->start();
delete impl;
......
......@@ -43,8 +43,8 @@ public:
explicit ImportAkregatorJobInterfaceTest(QObject *parent = nullptr);
~ImportAkregatorJobInterfaceTest() = default;
private Q_SLOTS:
void importCalendarConfig();
void importCalendarConfig_data();
void importAkegator_data();
void importAkegator();
};
#endif // IMPORTAKREGATORJOBINTERFACETEST_H
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