Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Verbruggen <erik@verbruggen.consulting>2021-12-17 13:07:14 +0300
committerHannah von Reth <vonreth@kde.org>2021-12-17 18:29:08 +0300
commite50d270838b5dc1646d15930486f20f88b578f9b (patch)
tree6fbc639c48310e50f249f651febed9a97a6cd07a
parentf3d9a6ae9227b2edaa4b5c60e04c75e12e114c59 (diff)
Fix unstable test
-rw-r--r--test/testallfilesdeleted.cpp6
-rw-r--r--test/testutils/syncenginetestutils.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/test/testallfilesdeleted.cpp b/test/testallfilesdeleted.cpp
index e3ad69995..3f2db16b3 100644
--- a/test/testallfilesdeleted.cpp
+++ b/test/testallfilesdeleted.cpp
@@ -300,8 +300,10 @@ private slots:
}
void testSelectiveSyncNoPopup() {
+ const auto original = FileInfo::A12_B12_C12_S12();
+
// Unselecting all folder should not cause the popup to be shown
- FakeFolder fakeFolder{FileInfo::A12_B12_C12_S12()};
+ FakeFolder fakeFolder(original);
int aboutToRemoveAllFilesCalled = 0;
QObject::connect(&fakeFolder.syncEngine(), &SyncEngine::aboutToRemoveAllFiles,
@@ -319,7 +321,7 @@ private slots:
QVERIFY(fakeFolder.syncOnce());
QCOMPARE(fakeFolder.currentLocalState(), FileInfo{}); // all files should be one localy
- QCOMPARE(fakeFolder.currentRemoteState(), FileInfo::A12_B12_C12_S12()); // Server not changed
+ QCOMPARE(fakeFolder.currentRemoteState(), original); // Server not changed
QCOMPARE(aboutToRemoveAllFilesCalled, 0); // But we did not show the popup
}
diff --git a/test/testutils/syncenginetestutils.h b/test/testutils/syncenginetestutils.h
index 61b258b4a..344fedc5c 100644
--- a/test/testutils/syncenginetestutils.h
+++ b/test/testutils/syncenginetestutils.h
@@ -628,7 +628,7 @@ inline void addFiles(QStringList &dest, const FileInfo &fi)
for (const auto &fi : fi.children)
addFiles(dest, fi);
} else {
- dest += QStringLiteral("%1 - %2 %3-bytes").arg(fi.path()).arg(fi.contentSize).arg(fi.contentChar);
+ dest += QStringLiteral("%1 - %2 %3-bytes (%4)").arg(fi.path(), QString::number(fi.contentSize), QChar::fromLatin1(fi.contentChar), fi.lastModifiedInUtc().toString());
}
}