~aacid/unity8/fix_testDash

« back to all changes in this revision

Viewing changes to tests/qmltests/Stages/tst_SpreadDelegate.qml

  • Committer: CI bot
  • Author(s): Andrea Cimitan
  • Date: 2014-12-02 09:26:30 UTC
  • mfrom: (1459.2.3 spread-dash)
  • Revision ID: ps-jenkins@lists.canonical.com-20141202092630-0f6lung4yg2rb32e
Different drag behaviour for not closable apps in spread Fixes: #1368287
Approved by: Albert Astals Cid

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
                {tag: "swipeToClose=true closeable=true -> appWindow moves away",
111
111
                 swipeToClose: true, closeable: true },
112
112
 
113
 
                {tag: "swipeToClose=true closeable=alse -> appWindow bounces back",
 
113
                {tag: "swipeToClose=true closeable=false -> appWindow bounces back",
114
114
                 swipeToClose: true, closeable: false },
115
115
 
116
116
                {tag: "swipeToClose=false -> appWindow stays put",
134
134
                touchX /* fromX */,  fromY, touchX /* toX */,  toY,
135
135
                true /* beginTouch */, false /* endTouch */, dragArea.minSpeedToClose * 1.1 /* speed */);
136
136
 
137
 
 
138
137
            if (data.swipeToClose) {
139
138
                verify(appWindowWithShadow.y < 0);
140
139
                var threshold = findChild(spreadDelegateLoader.item, "dragArea").threshold
141
 
                // Verify that the delegate started moving exactly "threshold" after the finger movement
142
 
                // and did not jump up to the finger, but lags the threshold behind
143
 
                compare(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance), threshold);
 
140
                if (data.closeable) {
 
141
                    // Verify that the delegate started moving exactly "threshold" after the finger movement
 
142
                    // and did not jump up to the finger, but lags the threshold behind
 
143
                    compare(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance), threshold);
 
144
                } else {
 
145
                    verify(Math.abs(Math.abs(appWindowWithShadow.y) - dragDistance) > threshold);
 
146
                }
144
147
 
145
148
                touchRelease(spreadDelegateLoader.item, touchX, toY - units.gu(1));
146
149