2
* This file is part of Checkbox
4
* Copyright 2014 Canonical Ltd.
7
* - Maciej Kisielewski <maciej.kisielewski@canonical.com>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; version 3.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
24
import Ubuntu.Components 0.1
25
import "../../components"
30
This test checks if only one latchedClicked is emited even when
31
multiple clicked calls are made to the underlaying button
37
tc_test_latching.counter++
41
property var counter: 0
43
function test_latching() {
44
for (var i = 0; i < 10; i++) {
48
"latchedClicked should be signalled signalled 1 time. Got " +
54
This test checks if latchedClicked signal is emited next time button
55
is clicked after unlatch method was called.
61
tc_test_unlatching.counter++
64
id: tc_test_unlatching
65
property var counter: 0
67
function test_unlatching() {
68
for (var i = 0; i < 3; i++) {
69
lb_unlatching.clicked()
71
lb_unlatching.unlatch()
72
for (var i = 0; i < 3; i++) {
73
lb_unlatching.clicked()
76
"latchedClicked should be signalled signalled 2 times. Got "
77
+ counter + " times.")