Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F18826103
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
View Options
diff --git a/autotests/widgets/messageviewerdialogtest.cpp b/autotests/widgets/messageviewerdialogtest.cpp
index 3202ff8..e6eed82 100644
--- a/autotests/widgets/messageviewerdialogtest.cpp
+++ b/autotests/widgets/messageviewerdialogtest.cpp
@@ -1,41 +1,43 @@
// SPDX-FileCopyrightText: 2023 g10 Code GmbH
// SPDX-FileContributor: Carl Schwan <carl@carlschwan.eu>
// SPDX-License-Identifier: LGPL-2.0-or-later
#include <MimeTreeParserWidgets/MessageViewerDialog>
#include <QLayout>
#include <QTest>
using namespace MimeTreeParser::Widgets;
class MessageViewerDialogTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void messageViewerDialogCreationMultipleTest()
{
MessageViewerDialog dialog(QLatin1String(MAIL_DATA_DIR) + QLatin1Char('/') + QLatin1String("combined.mbox"));
QCOMPARE(dialog.messages().count(), 3);
QCOMPARE(dialog.layout()->count(), 2);
QVERIFY(dialog.layout()->itemAt(1)->layout());
QCOMPARE(dialog.layout()->itemAt(1)->layout()->count(), 2);
const auto actions = dialog.layout()->menuBar()->actions();
QCOMPARE(actions.count(), 2);
}
void messageViewerDialogCreationTest()
{
MessageViewerDialog dialog(QLatin1String(MAIL_DATA_DIR) + QLatin1Char('/') + QLatin1String("plaintext.mbox"));
QCOMPARE(dialog.messages().count(), 1);
- QCOMPARE(dialog.layout()->count(), 1); // no toolbar here
+ QCOMPARE(dialog.layout()->count(), 2);
QVERIFY(dialog.layout()->itemAt(0)->layout());
QCOMPARE(dialog.layout()->itemAt(0)->layout()->count(), 2);
+
+ QVERIFY(!dialog.layout()->itemAt(1)->widget()->isVisible());
}
};
QTEST_MAIN(MessageViewerDialogTest)
#include "messageviewerdialogtest.moc"
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Dec 23, 4:13 PM (20 h, 6 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3b/4a/37f9cd0d84894cb96c28e6c5083f
Attached To
rMTP MIME Tree Parser
Event Timeline
Log In to Comment