Commit 11bb6945 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more autotest (fix signature addseparator support)

parent 83c26ec4
......@@ -126,7 +126,18 @@ void RichTextComposerNgTest::shouldAddSignature()
KIdentityManagement::Signature newSignature(QStringLiteral("Signature"));
newSignature.setEnabledSignature(true);
richtextComposerNg.insertSignature(newSignature, KIdentityManagement::Signature::Start, KIdentityManagement::Signature::AddSeparator);
QString expected = QStringLiteral("Signaturefoo bla, bli\nbb");
QString expected = QStringLiteral("-- \nSignaturefoo bla, bli\nbb");
QCOMPARE(richtextComposerNg.toPlainText(), expected);
richtextComposerNg.setPlainText(QStringLiteral("foo bla, bli\nbb"));
richtextComposerNg.insertSignature(newSignature, KIdentityManagement::Signature::Start, KIdentityManagement::Signature::AddNewLines);
expected = QStringLiteral("\n\nSignature\nfoo bla, bli\nbb");
QCOMPARE(richtextComposerNg.toPlainText(), expected);
richtextComposerNg.setPlainText(QStringLiteral("foo bla, bli\nbb"));
richtextComposerNg.insertSignature(newSignature, KIdentityManagement::Signature::Start, KIdentityManagement::Signature::AddNewLines);
expected = QStringLiteral("\n\nSignature\nfoo bla, bli\nbb");
QCOMPARE(richtextComposerNg.toPlainText(), expected);
}
......
Supports Markdown
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