cf12defd28
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
41 lines
956 B
QML
41 lines
956 B
QML
// SPDX-FileCopyrightText: 2024 Carl Schwan <carl@carlschwan.eu>
|
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls as QQC2
|
|
import org.kde.kirigami as Kirigami
|
|
import QtTest
|
|
import KirigamiTestUtils
|
|
|
|
TestCase {
|
|
name: "Action"
|
|
|
|
Kirigami.Action {
|
|
id: normalAction
|
|
}
|
|
|
|
function test_normal(): void {
|
|
compare(normalAction.text, '');
|
|
compare(normalAction.enabled, true);
|
|
}
|
|
|
|
Kirigami.Action {
|
|
id: enabledAction
|
|
fromQAction: ActionData.enabledAction
|
|
}
|
|
|
|
function test_enabledAction(): void {
|
|
compare(enabledAction.text, 'Enabled Action');
|
|
compare(enabledAction.enabled, true);
|
|
}
|
|
|
|
Kirigami.Action {
|
|
id: disabledAction
|
|
fromQAction: ActionData.disabledAction
|
|
}
|
|
|
|
function test_disabledAction(): void {
|
|
compare(disabledAction.text, 'Disabled Action');
|
|
compare(disabledAction.enabled, false);
|
|
}
|
|
} |