diff --git a/tests/ui/qml/main.qml b/tests/ui/qml/main.qml index c610ab80ab..d5ef2584f5 100644 --- a/tests/ui/qml/main.qml +++ b/tests/ui/qml/main.qml @@ -81,17 +81,25 @@ ApplicationWindow { } */ Button { - text: "Show Long Error" + // Replicates message box that pops up after selecting new avatar. Includes title. + text: "Confirm Avatar" onClicked: { - desktop.messageBox({ - informativeText: "Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds ", - text: "Baloney", - icon: OriginalDialogs.StandardIcon.Warning, - detailedText: "sakjd;laskj dksa;dl jka;lsd j;lkjas ;dlkaj s;dlakjd ;alkjda; slkjda; lkjda;lksjd ;alksjd; alksjd ;alksjd; alksjd; alksdjas;ldkjas;lkdja ;kj ;lkasjd; lkj as;dlka jsd;lka jsd;laksjd a" + var messageBox = desktop.messageBox({ + title: "Set Avatar", + text: "Would you like to use 'Albert' for your avatar?", + icon: OriginalDialogs.StandardIcon.Question, + //icon: OriginalDialogs.StandardIcon.Information, // Test informaton icon + //icon: OriginalDialogs.StandardIcon.Warning, // Test warning icon + //icon: OriginalDialogs.StandardIcon.Critical, // Test critical icon + buttons: OriginalDialogs.StandardButton.Ok + OriginalDialogs.StandardButton.Cancel }); + messageBox.selected.connect(function(button) { + console.log("You clicked " + button) + }) } } Button { + // Message without title. text: "Show Error" onClicked: { var messageBox = desktop.messageBox({ @@ -103,6 +111,20 @@ ApplicationWindow { }) } } + Button { + // detailedText is not currently used anywhere in Interface but it is easier to leave in and style good enough. + text: "Show Long Error" + onClicked: { + desktop.messageBox({ + informativeText: "Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds Diagnostic cycle will be complete in 30 seconds ", + text: "Baloney", + icon: OriginalDialogs.StandardIcon.Warning, + detailedText: "sakjd;laskj dksa;dl jka;lsd j;lkjas ;dlkaj s;dlakjd ;alkjda; slkjda; lkjda;lksjd ;alksjd; alksjd ;alksjd; alksjd; alksdjas;ldkjas;lkdja ;kj ;lkasjd; lkj as;dlka jsd;lka jsd;laksjd a" + }); + } + } + /* + // There is no such desktop.queryBox() function; may need to update test to cover QueryDialog.qml? Button { text: "Show Query" onClicked: { @@ -120,6 +142,7 @@ ApplicationWindow { }) } } + */ Button { text: "Open Directory" property var builder: Component {