2 * Copyright 2015 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19import "../../../qml/Components"
20import Unity.Test 0.1 as UT
21import Ubuntu.Components 1.3
22import Ubuntu.Components.Popups 1.3
32 ListElement { icon: "../../tests/graphics/applicationIcons/facebook.png"; name: "Facebook" }
33 ListElement { icon: "../../tests/graphics/applicationIcons/gmail.png"; name: "Mail" }
36 function openWarning() {
37 return PopupUtils.open(Qt.resolvedUrl("../../../qml/Components/ModeSwitchWarningDialog.qml"), root, { model: fakeModel });
41 anchors.centerIn: parent
42 text: "trigger warning"
50 signalName: "forceClose"
54 name: "ModeSwitchWarning"
57 function test_labelChangesOnClick() {
58 var popup = openWarning();
59 var reconnectLabel = findChild(popup, "reconnectLabel");
60 tryCompare(reconnectLabel, "text", reconnectLabel.notClickedText)
61 mouseClick(reconnectLabel, reconnectLabel.width / 2, reconnectLabel.height / 2)
62 tryCompare(reconnectLabel, "text", reconnectLabel.clickedText)
65 function test_closeButtonEmitsSignal() {
66 var popup = openWarning();
69 var closeButton = findChild(popup, "forceCloseButton");
70 mouseClick(closeButton, closeButton.width / 2, closeButton.height / 2)
71 tryCompare(spy, "count", 1)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list