Add qml test for chatdocumenthandler
This commit is contained in:
34
autotests/chatdocumenthelpertest.qml
Normal file
34
autotests/chatdocumenthelpertest.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
|
||||
// SPDX-License-Identifier: LGPL-2.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtTest
|
||||
|
||||
import org.kde.neochat.libneochat as LibNeoChat
|
||||
|
||||
TestCase {
|
||||
name: "ChatDocumentHandlerTest"
|
||||
|
||||
LibNeoChat.ChatDocumentHandler {
|
||||
id: documentHandler
|
||||
}
|
||||
|
||||
TextEdit {
|
||||
id: TextEdit
|
||||
}
|
||||
|
||||
function test_empty(): void {
|
||||
compare(documentHandler.type, LibNeoChat.ChatBarType.None);
|
||||
compare(documentHandler.room, null);
|
||||
compare(documentHandler.textItem, null);
|
||||
compare(documentHandler.completionModel instanceof LibNeoChat.CompletionModel, true);
|
||||
compare(documentHandler.atFirstLine, false);
|
||||
compare(documentHandler.atLastLine, false);
|
||||
compare(documentHandler.bold, false);
|
||||
compare(documentHandler.italic, false);
|
||||
compare(documentHandler.underline, false);
|
||||
compare(documentHandler.strikethrough, false);
|
||||
compare(documentHandler.style, 0);
|
||||
compare(documentHandler.currentListStyle, 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user