53
|
1 |
/*
|
60
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* WLAN Wizard manual IAP addition cases.
|
|
16 |
*/
|
53
|
17 |
|
|
18 |
// System includes
|
60
|
19 |
|
|
20 |
#include <QGraphicsWidget>
|
|
21 |
#include <QObjectList>
|
|
22 |
#include <QtCore>
|
|
23 |
#include <QTest>
|
|
24 |
#include <QDebug>
|
|
25 |
#include <QList>
|
|
26 |
|
53
|
27 |
#include <HbApplication>
|
|
28 |
#include <HbDocumentLoader>
|
|
29 |
#include <HbStackedWidget>
|
|
30 |
#include <HbRadioButtonList>
|
|
31 |
#include <HbAction>
|
|
32 |
#include <HbLineEdit>
|
|
33 |
#include <HbLabel>
|
60
|
34 |
|
53
|
35 |
#include <cmmanagerdefines_shim.h>
|
|
36 |
|
|
37 |
// User includes
|
60
|
38 |
|
53
|
39 |
#include "testwlanwizardmanual.h"
|
|
40 |
#include "testwlanwizardmanual_conf.h"
|
|
41 |
#include "hbautotest.h"
|
|
42 |
#include "wlanwizard.h"
|
|
43 |
#include "wlanwizard_p.h"
|
|
44 |
#include "wlanwizardpagessid.h"
|
|
45 |
#include "wlanqtutils_context.h"
|
|
46 |
#include "wlanqtutils.h"
|
|
47 |
#include "wlanqtutilsap.h"
|
|
48 |
|
|
49 |
// External function prototypes
|
|
50 |
|
|
51 |
// Local constants
|
|
52 |
|
|
53 |
|
|
54 |
// ======== LOCAL FUNCTIONS ========
|
|
55 |
|
|
56 |
// ======== MEMBER FUNCTIONS ========
|
|
57 |
|
|
58 |
|
|
59 |
// ---------------------------------------------------------
|
|
60 |
// TEST CASES
|
|
61 |
// ---------------------------------------------------------
|
|
62 |
|
|
63 |
|
|
64 |
void TestWlanWizardManual::tcStartWizard()
|
|
65 |
{
|
|
66 |
qDebug("Start TestWlanWizardManual");
|
|
67 |
}
|
|
68 |
|
|
69 |
/*!
|
|
70 |
*
|
|
71 |
*/
|
|
72 |
void TestWlanWizardManual::tc_open_scan_results_received_at_scan_page()
|
|
73 |
{
|
|
74 |
#ifdef tc_open_scan_results_received_at_scan_page_enabled
|
|
75 |
|
|
76 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
77 |
|
|
78 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
79 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
80 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
81 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
82 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
83 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
84 |
|
|
85 |
mWlanQtUtilsContext->setImmediateApScanResult(false);
|
|
86 |
mView->showWizard();
|
|
87 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
88 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
89 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
90 |
QTest::qWait(WaitTimeForUi);
|
|
91 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
92 |
QTest::qWait(WaitTimeForUi);
|
|
93 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
94 |
QTest::qWait(WaitTimeForUi);
|
|
95 |
QCOMPARE( mouseClickNext(), true );
|
|
96 |
|
|
97 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
98 |
mWlanQtUtilsContext->emitScanApReady();
|
|
99 |
mWlanQtUtilsContext->setImmediateApScanResult(true);
|
|
100 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
101 |
|
|
102 |
#endif
|
|
103 |
}
|
|
104 |
|
|
105 |
/*!
|
|
106 |
*
|
|
107 |
*/
|
|
108 |
void TestWlanWizardManual::tc_attempt_to_input_too_long_ssid()
|
|
109 |
{
|
|
110 |
#ifdef tc_attempt_to_input_too_long_ssid_enabled
|
|
111 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
112 |
|
|
113 |
mWlanQtUtilsContext->setScanWlanDirectResult("12345678901234567890123456789012", mApList->List());
|
|
114 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
115 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
116 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
117 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
118 |
|
|
119 |
mView->showWizard();
|
|
120 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
121 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
122 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
123 |
QTest::qWait(WaitTimeForUi);
|
|
124 |
QCOMPARE( insertTextToObject("lineEditKey", "1234567890123456789012345678901234567890"), true );
|
|
125 |
QTest::qWait(WaitTimeForUi);
|
|
126 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
127 |
QTest::qWait(WaitTimeForUi);
|
|
128 |
QCOMPARE( mouseClickNext(), true );
|
|
129 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "12345678901234567890123456789012"), true );
|
|
130 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
131 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
132 |
#endif
|
|
133 |
}
|
|
134 |
|
|
135 |
/*!
|
|
136 |
*
|
|
137 |
*/
|
|
138 |
void TestWlanWizardManual::tc_scan_succesful_press_cancel_at_summary()
|
|
139 |
{
|
|
140 |
#ifdef tc_scan_succesful_press_cancel_at_summary_enabled
|
|
141 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
142 |
|
|
143 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
144 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
145 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
146 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
147 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
148 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
149 |
|
|
150 |
mView->showWizard();
|
|
151 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
152 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
153 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
154 |
QTest::qWait(WaitTimeForUi);
|
|
155 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
156 |
QTest::qWait(WaitTimeForUi);
|
|
157 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
158 |
QTest::qWait(WaitTimeForUi);
|
|
159 |
QCOMPARE( mouseClickNext(), true );
|
|
160 |
|
|
161 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
162 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
163 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
164 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
165 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
166 |
// Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
|
|
167 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
168 |
|
|
169 |
QCOMPARE( mouseClickCancel(), true );
|
|
170 |
|
|
171 |
QTest::qWait(WaitTimeForUi);
|
|
172 |
|
|
173 |
#endif
|
|
174 |
}
|
|
175 |
|
|
176 |
/*!
|
|
177 |
*
|
|
178 |
*/
|
|
179 |
void TestWlanWizardManual::tc_press_previous_at_scanning_page()
|
|
180 |
{
|
|
181 |
#ifdef tc_press_previous_at_scanning_page_enabled
|
|
182 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
183 |
|
|
184 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
185 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
186 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
187 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
188 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
189 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
190 |
|
|
191 |
mView->showWizard();
|
|
192 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
193 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
194 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
195 |
QTest::qWait(WaitTimeForUi);
|
|
196 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
197 |
QTest::qWait(WaitTimeForUi);
|
|
198 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
199 |
QTest::qWait(WaitTimeForUi);
|
|
200 |
QCOMPARE( mouseClickNext(), true );
|
|
201 |
|
|
202 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
203 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
204 |
|
|
205 |
// Click previous button and next again
|
|
206 |
QCOMPARE( mouseClickPrevious(), true );
|
|
207 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
208 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
209 |
QTest::qWait(WaitTimeForUi);
|
|
210 |
QCOMPARE( mouseClickNext(), true );
|
|
211 |
|
|
212 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
213 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
214 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
215 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
216 |
// Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
|
|
217 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
218 |
|
|
219 |
#endif
|
|
220 |
}
|
|
221 |
|
|
222 |
/*!
|
|
223 |
*
|
|
224 |
*/
|
|
225 |
void TestWlanWizardManual::tc_scan_succesful_go_to_summary_and_finish()
|
|
226 |
{
|
|
227 |
#ifdef tc_scan_succesful_go_to_summary_and_finish_enabled
|
|
228 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
229 |
|
|
230 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
231 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
232 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
233 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
234 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
235 |
|
|
236 |
mView->showWizard();
|
|
237 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
238 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
239 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
240 |
QTest::qWait(WaitTimeForUi);
|
|
241 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
242 |
QTest::qWait(WaitTimeForUi);
|
|
243 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
244 |
QTest::qWait(WaitTimeForUi);
|
|
245 |
QCOMPARE( mouseClickNext(), true );
|
|
246 |
|
|
247 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
248 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
249 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
250 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
251 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
252 |
// Currently against the spec in http://wikis.in.nokia.com/pub/UXD/101ConnectionManager/occ_logical_flows_and_wireframes.pdf
|
|
253 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
254 |
QCOMPARE( mouseClickFinish(), true );
|
|
255 |
#endif
|
|
256 |
}
|
|
257 |
|
|
258 |
/*!
|
|
259 |
* Stop verifying buttons for views that have been already verified.
|
|
260 |
*/
|
|
261 |
void TestWlanWizardManual::tc_wep_pwd_too_short_error_label()
|
|
262 |
{
|
|
263 |
#ifdef tc_wep_pwd_too_short_error_label_enabled
|
|
264 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
|
|
265 |
|
|
266 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
267 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
268 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
269 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
270 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
271 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
272 |
|
|
273 |
mView->showWizard();
|
|
274 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
275 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
276 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
277 |
QTest::qWait(WaitTimeForUi);
|
|
278 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
279 |
QTest::qWait(WaitTimeForUi);
|
|
280 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
281 |
QTest::qWait(WaitTimeForUi);
|
|
282 |
QCOMPARE( mouseClickNext(), true );
|
|
283 |
|
|
284 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
285 |
|
|
286 |
// Key query short pwd
|
|
287 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
288 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
289 |
QTest::qWait(WaitTimeForUi);
|
|
290 |
QCOMPARE( insertTextToObject("lineEditKey", "password"), true );
|
|
291 |
QTest::qWait(WaitTimeForUi);
|
|
292 |
QCOMPARE( mouseClickNext(), true );
|
|
293 |
QTest::qWait(WaitTimeForUi);
|
|
294 |
QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_key_is_of_incorrect_length_please")), true );
|
|
295 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
296 |
QTest::qWait(WaitTimeForUi);
|
|
297 |
|
|
298 |
// Key query success
|
|
299 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
300 |
QTest::qWait(WaitTimeForUi);
|
|
301 |
QCOMPARE( verifyDialogText("labelErrorNote", ""), true );
|
|
302 |
QCOMPARE( insertTextToObject("lineEditKey", "12345"), true );
|
|
303 |
QTest::qWait(WaitTimeForUi);
|
|
304 |
QCOMPARE( mouseClickNext(), true );
|
|
305 |
|
|
306 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
307 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
308 |
#endif
|
|
309 |
}
|
|
310 |
|
|
311 |
/*!
|
|
312 |
*
|
|
313 |
*/
|
|
314 |
void TestWlanWizardManual::tc_press_previous_at_key_query()
|
|
315 |
{
|
|
316 |
#ifdef tc_press_previous_at_key_query_enabled
|
|
317 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
|
|
318 |
|
|
319 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
320 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
321 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
322 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
323 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
324 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
325 |
|
|
326 |
mView->showWizard();
|
|
327 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
328 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
329 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
330 |
QTest::qWait(WaitTimeForUi);
|
|
331 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
332 |
QTest::qWait(WaitTimeForUi);
|
|
333 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
334 |
QTest::qWait(WaitTimeForUi);
|
|
335 |
QCOMPARE( mouseClickNext(), true );
|
|
336 |
|
|
337 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
338 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
339 |
QCOMPARE( mouseClickPrevious(), true );
|
|
340 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
341 |
QCOMPARE( mouseClickNext(), true );
|
|
342 |
|
|
343 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
344 |
#endif
|
|
345 |
}
|
|
346 |
|
|
347 |
/*!
|
|
348 |
*
|
|
349 |
*/
|
|
350 |
void TestWlanWizardManual::tc_manual_selection_with_press_previous()
|
|
351 |
{
|
|
352 |
#ifdef tc_manual_selection_with_press_previous_enabled
|
|
353 |
|
|
354 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
355 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
356 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
357 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
358 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
359 |
|
|
360 |
mView->showWizard();
|
|
361 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
362 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
363 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
364 |
QTest::qWait(WaitTimeForUi);
|
|
365 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
366 |
QTest::qWait(WaitTimeForUi);
|
|
367 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
368 |
QTest::qWait(WaitTimeForUi);
|
|
369 |
QCOMPARE( mouseClickNext(), true );
|
|
370 |
QTest::qWait(WaitTimeForUi);
|
|
371 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
372 |
QTest::qWait(WaitTimeForUi);
|
|
373 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
374 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
375 |
QTest::qWait(WaitTimeForUi);
|
|
376 |
QCOMPARE( mouseClickPrevious(), true );
|
|
377 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
378 |
QCOMPARE( mouseClickNext(), true );
|
|
379 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkMode, "huuhaa3421"), true );
|
|
380 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
381 |
QTest::qWait(WaitTimeForUi);
|
|
382 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
383 |
QCOMPARE( mouseClickNext(), true );
|
|
384 |
|
|
385 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
|
|
386 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
387 |
QCOMPARE( mouseClickPrevious(), true );
|
|
388 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkMode, "huuhaa3421"), true );
|
|
389 |
QCOMPARE( mouseClickNext(), true );
|
|
390 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
|
|
391 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
392 |
QTest::qWait(WaitTimeForUi);
|
|
393 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
61
|
394 |
|
|
395 |
QCOMPARE( mouseClickPrevious(), true );
|
|
396 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkMode, "huuhaa3421"), true );
|
|
397 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
398 |
QCOMPARE( mouseClickNext(), true );
|
|
399 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
|
|
400 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
401 |
QCOMPARE( verifySelectedRadioButton("list"), 0 );
|
|
402 |
|
53
|
403 |
QCOMPARE( mouseClickNext(), true );
|
|
404 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
405 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
406 |
#endif
|
|
407 |
}
|
|
408 |
|
|
409 |
/*!
|
|
410 |
*
|
|
411 |
*/
|
|
412 |
void TestWlanWizardManual::tc_illegal_characters_in_wep_key()
|
|
413 |
{
|
|
414 |
#ifdef tc_illegal_characters_in_wep_key_enabled
|
|
415 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false);
|
|
416 |
|
|
417 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
418 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
419 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
420 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
421 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
422 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
423 |
|
|
424 |
mView->showWizard();
|
|
425 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
426 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
427 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
428 |
QTest::qWait(WaitTimeForUi);
|
|
429 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
430 |
QTest::qWait(WaitTimeForUi);
|
|
431 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
432 |
QTest::qWait(WaitTimeForUi);
|
|
433 |
QCOMPARE( mouseClickNext(), true );
|
|
434 |
|
|
435 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
436 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
437 |
|
|
438 |
QCOMPARE( insertTextToObject("lineEditKey", "passworddd"), true );
|
|
439 |
QTest::qWait(WaitTimeForUi);
|
|
440 |
QCOMPARE( mouseClickNext(), true );
|
|
441 |
QTest::qWait(WaitTimeForUi);
|
|
442 |
QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_illegal_characters_in_key_please_c")), true );
|
|
443 |
QTest::qWait(WaitTimeForUi);
|
|
444 |
|
|
445 |
#endif
|
|
446 |
}
|
|
447 |
|
|
448 |
/*!
|
|
449 |
*
|
|
450 |
*/
|
|
451 |
void TestWlanWizardManual::tc_too_short_wpa_key()
|
|
452 |
{
|
|
453 |
#ifdef tc_too_short_wpa_key_enabled
|
|
454 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
|
|
455 |
|
|
456 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
457 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
458 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
459 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
460 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
461 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
462 |
|
|
463 |
mView->showWizard();
|
|
464 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
465 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
466 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
467 |
QTest::qWait(WaitTimeForUi);
|
|
468 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
469 |
QTest::qWait(WaitTimeForUi);
|
|
470 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
471 |
QTest::qWait(WaitTimeForUi);
|
|
472 |
QCOMPARE( mouseClickNext(), true );
|
|
473 |
|
|
474 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
475 |
QTest::qWait(2000);
|
|
476 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
477 |
|
|
478 |
QCOMPARE( insertTextToObject("lineEditKey", "1234"), true );
|
|
479 |
QTest::qWait(WaitTimeForUi);
|
|
480 |
QCOMPARE( mouseClickNext(), true );
|
|
481 |
QTest::qWait(WaitTimeForUi);
|
|
482 |
QCOMPARE( verifyDialogText("labelErrorNote", hbTrId("txt_occ_dialog_preshared_key_too_short_at_least")), true );
|
|
483 |
QTest::qWait(WaitTimeForUi);
|
|
484 |
#endif
|
|
485 |
}
|
|
486 |
|
|
487 |
/*!
|
|
488 |
* wpa psk
|
|
489 |
*/
|
|
490 |
void TestWlanWizardManual::tc_wpa_psk_success()
|
|
491 |
{
|
|
492 |
#ifdef tc_wpa_psk_success_enabled
|
|
493 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false);
|
|
494 |
|
|
495 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
496 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
497 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
498 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
499 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
500 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
501 |
|
|
502 |
mView->showWizard();
|
|
503 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
504 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
505 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
506 |
QTest::qWait(WaitTimeForUi);
|
|
507 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
508 |
QTest::qWait(WaitTimeForUi);
|
|
509 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
510 |
QTest::qWait(WaitTimeForUi);
|
|
511 |
QCOMPARE( mouseClickNext(), true );
|
|
512 |
|
|
513 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
514 |
QTest::qWait(2000);
|
|
515 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
516 |
|
|
517 |
QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
|
|
518 |
QTest::qWait(WaitTimeForUi);
|
|
519 |
QCOMPARE( mouseClickNext(), true );
|
|
520 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
521 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
522 |
#endif
|
|
523 |
}
|
|
524 |
|
|
525 |
/*!
|
|
526 |
* no wpa psk
|
|
527 |
*/
|
|
528 |
void TestWlanWizardManual::tc_wpa_no_psk_go_to_eap_start()
|
|
529 |
{
|
|
530 |
#ifdef tc_wpa_no_psk_go_to_eap_start_enabled
|
|
531 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false);
|
|
532 |
|
|
533 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
534 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
535 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
536 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
537 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
538 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
539 |
|
|
540 |
mView->showWizard();
|
|
541 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
542 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
543 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
544 |
QTest::qWait(WaitTimeForUi);
|
|
545 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
546 |
QTest::qWait(WaitTimeForUi);
|
|
547 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
548 |
QTest::qWait(WaitTimeForUi);
|
|
549 |
QCOMPARE( mouseClickNext(), true );
|
|
550 |
|
|
551 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
552 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
|
|
553 |
QCOMPARE( mouseClickPrevious(), true );
|
|
554 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
555 |
QCOMPARE( mouseClickNext(), true );
|
|
556 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
557 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
|
|
558 |
#endif
|
|
559 |
}
|
|
560 |
|
|
561 |
/*!
|
|
562 |
* wpa2 psk
|
|
563 |
*/
|
|
564 |
void TestWlanWizardManual::tc_wpa2_psk_success()
|
|
565 |
{
|
|
566 |
#ifdef tc_wpa2_psk_success_enabled
|
|
567 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false);
|
|
568 |
|
|
569 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
570 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
571 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
572 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
573 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
574 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
575 |
|
|
576 |
mView->showWizard();
|
|
577 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
578 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
579 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
580 |
QTest::qWait(WaitTimeForUi);
|
|
581 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
582 |
QTest::qWait(WaitTimeForUi);
|
|
583 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
584 |
QTest::qWait(WaitTimeForUi);
|
|
585 |
QCOMPARE( mouseClickNext(), true );
|
|
586 |
|
|
587 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
588 |
QTest::qWait(2000);
|
|
589 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
590 |
|
|
591 |
QCOMPARE( insertTextToObject("lineEditKey", "1234567890"), true );
|
|
592 |
QTest::qWait(WaitTimeForUi);
|
|
593 |
QCOMPARE( mouseClickNext(), true );
|
|
594 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
595 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
596 |
#endif
|
|
597 |
}
|
|
598 |
|
|
599 |
/*!
|
|
600 |
* wpa2 no psk
|
|
601 |
*/
|
|
602 |
void TestWlanWizardManual::tc_wpa2_no_psk_go_to_eap_start()
|
|
603 |
{
|
|
604 |
#ifdef tc_wpa2_no_psk_go_to_eap_start_enabled
|
|
605 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, false, false);
|
|
606 |
|
|
607 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
608 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
609 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
610 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
611 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
612 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
613 |
|
|
614 |
mView->showWizard();
|
|
615 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
616 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
617 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
618 |
QTest::qWait(WaitTimeForUi);
|
|
619 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
620 |
QTest::qWait(WaitTimeForUi);
|
|
621 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
622 |
QTest::qWait(WaitTimeForUi);
|
|
623 |
QCOMPARE( mouseClickNext(), true );
|
|
624 |
|
|
625 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
626 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
|
|
627 |
#endif
|
|
628 |
}
|
|
629 |
|
|
630 |
/*!
|
|
631 |
* Wlan network closed -> generic error
|
|
632 |
*/
|
|
633 |
void TestWlanWizardManual::tc_network_closed_generic_error()
|
|
634 |
{
|
|
635 |
#ifdef tc_network_closed_generic_error_enabled
|
|
636 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
637 |
|
|
638 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
639 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
640 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
641 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
642 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(100, 1);
|
|
643 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
644 |
|
|
645 |
mView->showWizard();
|
|
646 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
647 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
648 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
649 |
QTest::qWait(WaitTimeForUi);
|
|
650 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
651 |
QTest::qWait(WaitTimeForUi);
|
|
652 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
653 |
QTest::qWait(WaitTimeForUi);
|
|
654 |
QCOMPARE( mouseClickNext(), true );
|
|
655 |
|
|
656 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
657 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
658 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, hbTrId("txt_occ_dialog_connection_failed")), true );
|
|
659 |
|
|
660 |
#endif
|
|
661 |
}
|
|
662 |
|
|
663 |
/*!
|
|
664 |
* adhoc no psk
|
|
665 |
*/
|
|
666 |
void TestWlanWizardManual::tc_adhoc_network_no_psk()
|
|
667 |
{
|
|
668 |
#ifdef tc_adhoc_network_no_psk_enabled
|
|
669 |
mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false);
|
|
670 |
|
|
671 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
672 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
673 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
674 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
675 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
676 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
677 |
|
|
678 |
mView->showWizard();
|
|
679 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
680 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
681 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
682 |
QTest::qWait(WaitTimeForUi);
|
|
683 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
684 |
QTest::qWait(WaitTimeForUi);
|
|
685 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
686 |
QTest::qWait(WaitTimeForUi);
|
|
687 |
QCOMPARE( mouseClickNext(), true );
|
|
688 |
|
|
689 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
690 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
691 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
692 |
|
|
693 |
#endif
|
|
694 |
}
|
|
695 |
|
|
696 |
/*!
|
|
697 |
* 802_1x
|
|
698 |
*/
|
|
699 |
void TestWlanWizardManual::tc_secmode_802_1x_go_to_eap_start()
|
|
700 |
{
|
|
701 |
#ifdef tc_secmode_802_1x_go_to_eap_start_enabled
|
|
702 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false);
|
|
703 |
|
|
704 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
705 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
706 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
707 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
708 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
709 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
710 |
|
|
711 |
mView->showWizard();
|
|
712 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
713 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
714 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
715 |
QTest::qWait(WaitTimeForUi);
|
|
716 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
717 |
QTest::qWait(WaitTimeForUi);
|
|
718 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
719 |
QTest::qWait(WaitTimeForUi);
|
|
720 |
QCOMPARE( mouseClickNext(), true );
|
|
721 |
|
|
722 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
723 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageEapStart), true );
|
|
724 |
#endif
|
|
725 |
}
|
|
726 |
|
|
727 |
/*!
|
|
728 |
* Wapi
|
|
729 |
*/
|
|
730 |
void TestWlanWizardManual::tc_sec_mode_wapi()
|
|
731 |
{
|
|
732 |
#ifdef tc_sec_mode_wapi_enabled
|
|
733 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWapi, false, false);
|
|
734 |
|
|
735 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
736 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
737 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
738 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
739 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
740 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
741 |
|
|
742 |
mView->showWizard();
|
|
743 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
744 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
745 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
746 |
QTest::qWait(WaitTimeForUi);
|
|
747 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
748 |
QTest::qWait(WaitTimeForUi);
|
|
749 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
750 |
QTest::qWait(WaitTimeForUi);
|
|
751 |
QCOMPARE( mouseClickNext(), true );
|
|
752 |
|
|
753 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
754 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
755 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
756 |
#endif
|
|
757 |
}
|
|
758 |
|
|
759 |
/*!
|
|
760 |
* Multiple AP scan match results
|
|
761 |
*/
|
|
762 |
void TestWlanWizardManual::tc_multiple_open_scan_results_single_match()
|
|
763 |
{
|
|
764 |
#ifdef tc_multiple_open_scan_results_single_match_enabled
|
|
765 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
766 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
767 |
mApOpenList->Add("foobar", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 300);
|
|
768 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
|
|
769 |
|
|
770 |
mApList->Add("foobar", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 300);
|
|
771 |
|
|
772 |
mWlanQtUtilsContext->setScanWlanApsResult(mApOpenList->List());
|
|
773 |
mWlanQtUtilsContext->setScanWlanDirectResult("foobar", mApList->List());
|
|
774 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
775 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
776 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
777 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
778 |
|
|
779 |
mView->showWizard();
|
|
780 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
781 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
782 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
783 |
QTest::qWait(WaitTimeForUi);
|
|
784 |
QCOMPARE( insertTextToObject("lineEditKey", "foobar"), true );
|
|
785 |
QTest::qWait(WaitTimeForUi);
|
|
786 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
787 |
QTest::qWait(WaitTimeForUi);
|
|
788 |
QCOMPARE( mouseClickNext(), true );
|
|
789 |
|
|
790 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "foobar"), true );
|
|
791 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "foobar"), true );
|
|
792 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
793 |
#endif
|
|
794 |
}
|
|
795 |
|
|
796 |
/*!
|
|
797 |
*
|
|
798 |
*/
|
|
799 |
void TestWlanWizardManual::tc_iap_creation_fail()
|
|
800 |
{
|
|
801 |
#ifdef tc_iap_creation_fail_enabled
|
|
802 |
|
|
803 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
804 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
805 |
mWlanQtUtilsContext->setCreateWlanIapResult(-1);
|
|
806 |
|
|
807 |
mView->showWizard();
|
|
808 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
809 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
810 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
811 |
QTest::qWait(WaitTimeForUi);
|
|
812 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
813 |
QTest::qWait(WaitTimeForUi);
|
|
814 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
815 |
QTest::qWait(WaitTimeForUi);
|
|
816 |
QCOMPARE( mouseClickNext(), true );
|
|
817 |
|
|
818 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
819 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
820 |
|
|
821 |
QStringList buttons;
|
|
822 |
buttons << hbTrId("txt_occ_dblist_val_infrastructure_public")
|
|
823 |
<< hbTrId("txt_occ_list_infrastructure_hidden")
|
|
824 |
<< hbTrId("txt_occ_list_adhoc_1");
|
|
825 |
QCOMPARE( verifyRadioButtons("list"), buttons );
|
|
826 |
|
|
827 |
QCOMPARE( selectRadioButton( "list", 2 ), true );
|
|
828 |
QTest::qWait(WaitTimeForUi);
|
|
829 |
QCOMPARE( mouseClickPrevious(), true );
|
|
830 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
831 |
QCOMPARE( mouseClickNext(), true );
|
|
832 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
833 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
61
|
834 |
QCOMPARE( verifySelectedRadioButton("list"), 2 );
|
53
|
835 |
QCOMPARE( selectRadioButton( "list", 2 ), true );
|
|
836 |
QTest::qWait(WaitTimeForUi);
|
|
837 |
QCOMPARE( mouseClickNext(), true );
|
|
838 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageNetworkSecurity, "huuhaa3421"), true );
|
|
839 |
|
|
840 |
buttons.clear();
|
|
841 |
buttons << hbTrId("txt_occ_list_open")
|
|
842 |
<< hbTrId("txt_occ_list_wep_1");
|
|
843 |
QCOMPARE( verifyRadioButtons("list"), buttons );
|
|
844 |
|
|
845 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
846 |
QTest::qWait(WaitTimeForUi);
|
|
847 |
QCOMPARE( mouseClickNext(), true );
|
|
848 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
|
|
849 |
#endif
|
|
850 |
}
|
|
851 |
|
|
852 |
/*!
|
|
853 |
*
|
|
854 |
*/
|
|
855 |
void TestWlanWizardManual::tc_scan_ap_status_not_ok()
|
|
856 |
{
|
|
857 |
#ifdef tc_scan_ap_status_not_ok_enabled
|
|
858 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
859 |
|
|
860 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
861 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
862 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
863 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
864 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
865 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
866 |
|
|
867 |
mWlanQtUtilsContext->setScanApStatus(WlanQtUtils::ScanStatusError);
|
|
868 |
mView->showWizard();
|
|
869 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
870 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
871 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
872 |
QTest::qWait(WaitTimeForUi);
|
|
873 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
874 |
QTest::qWait(WaitTimeForUi);
|
|
875 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
876 |
QTest::qWait(WaitTimeForUi);
|
|
877 |
QCOMPARE( mouseClickNext(), true );
|
|
878 |
|
|
879 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
880 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
881 |
#endif
|
|
882 |
}
|
|
883 |
|
|
884 |
/*!
|
|
885 |
*
|
|
886 |
*/
|
|
887 |
void TestWlanWizardManual::tc_scan_direct_status_not_ok()
|
|
888 |
{
|
|
889 |
#ifdef tc_scan_direct_status_not_ok_enabled
|
|
890 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false);
|
|
891 |
|
|
892 |
mWlanQtUtilsContext->setScanWlanApsResult(mApList->List());
|
|
893 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
894 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
895 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
896 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
897 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
898 |
|
|
899 |
//mWlanQtUtilsContext->setImmediateApScanResult(false);
|
|
900 |
mWlanQtUtilsContext->setScanDirectStatus(WlanQtUtils::ScanStatusError);
|
|
901 |
mView->showWizard();
|
|
902 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
903 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
904 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
905 |
QTest::qWait(WaitTimeForUi);
|
|
906 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
907 |
QTest::qWait(WaitTimeForUi);
|
|
908 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
909 |
QTest::qWait(WaitTimeForUi);
|
|
910 |
QCOMPARE( mouseClickNext(), true );
|
|
911 |
|
|
912 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
913 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
914 |
#endif
|
|
915 |
}
|
|
916 |
|
|
917 |
/*!
|
|
918 |
* Ict Result enumerator used. Hotspot.
|
|
919 |
*/
|
|
920 |
void TestWlanWizardManual::tc_ictresult_enumerated_hotspot()
|
|
921 |
{
|
|
922 |
#ifdef tc_ictresult_enumerated_hotspot_enabled
|
|
923 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
924 |
|
|
925 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
926 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
927 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctHotspotPassed);
|
|
928 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
929 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
930 |
|
|
931 |
mView->showWizard();
|
|
932 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
933 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
934 |
QTest::qWait(1000);
|
|
935 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
936 |
QTest::qWait(1000);
|
|
937 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
938 |
QTest::qWait(1000);
|
|
939 |
QCOMPARE( mouseClickNext(), true );
|
|
940 |
|
|
941 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
942 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
943 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
944 |
QTest::qWait(5000);
|
|
945 |
#endif
|
|
946 |
}
|
|
947 |
|
|
948 |
/*!
|
|
949 |
* Ict Result enumerator used. Ict canceled.
|
|
950 |
*/
|
|
951 |
void TestWlanWizardManual::tc_ictresult_enumerated_cancel()
|
|
952 |
{
|
|
953 |
#ifdef tc_ictresult_enumerated_cancel_enabled
|
|
954 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
955 |
|
|
956 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
957 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
958 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctCancelled);
|
|
959 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
960 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
961 |
|
|
962 |
mView->showWizard();
|
|
963 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
964 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
965 |
QTest::qWait(1000);
|
|
966 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
967 |
QTest::qWait(1000);
|
|
968 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
969 |
QTest::qWait(1000);
|
|
970 |
QCOMPARE( mouseClickNext(), true );
|
|
971 |
|
|
972 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
973 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
974 |
#endif
|
|
975 |
}
|
|
976 |
|
|
977 |
/*!
|
|
978 |
* Ict fails in this case
|
|
979 |
*/
|
|
980 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_2_netmode_options()
|
|
981 |
{
|
|
982 |
#ifdef tc_multiple_ssids_with_same_name_2_netmode_options_enabled
|
|
983 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
984 |
// Add duplicates
|
|
985 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
986 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
987 |
|
|
988 |
// Add all five kinds of security modes.
|
|
989 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
|
|
990 |
mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
991 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, false, false, 300);
|
|
992 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
|
|
993 |
|
|
994 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
995 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
996 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctFailed);
|
|
997 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
998 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
999 |
|
|
1000 |
mView->showWizard();
|
|
1001 |
|
|
1002 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1003 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1004 |
QTest::qWait(WaitTimeForUi);
|
|
1005 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
1006 |
QTest::qWait(WaitTimeForUi);
|
|
1007 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1008 |
QTest::qWait(WaitTimeForUi);
|
|
1009 |
QCOMPARE( mouseClickNext(), true );
|
|
1010 |
|
|
1011 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1012 |
QStringList buttons;
|
|
1013 |
buttons << hbTrId("txt_occ_list_infrastructure_hidden")
|
|
1014 |
<< hbTrId("txt_occ_list_adhoc_1");
|
|
1015 |
QCOMPARE( verifyRadioButtons("list"), buttons );
|
|
1016 |
|
|
1017 |
QTest::qWait(WaitTimeForUi);
|
|
1018 |
QCOMPARE( selectRadioButton( "list", 1 ), true );
|
|
1019 |
QTest::qWait(WaitTimeForUi);
|
|
1020 |
QCOMPARE( mouseClickNext(), true );
|
|
1021 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, "huuhaa3421"), true );
|
|
1022 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
1023 |
#endif
|
|
1024 |
}
|
|
1025 |
|
|
1026 |
/*!
|
|
1027 |
*
|
|
1028 |
*/
|
|
1029 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_press_previous()
|
|
1030 |
{
|
|
1031 |
#ifdef tc_multiple_ssids_with_same_name_press_previous_enabled
|
|
1032 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1033 |
// Add duplicates
|
|
1034 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1035 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1036 |
|
|
1037 |
// Add all five kinds of security modes.
|
|
1038 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
|
|
1039 |
mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
1040 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
|
|
1041 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
|
|
1042 |
|
|
1043 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
1044 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
1045 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
1046 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
1047 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1048 |
|
|
1049 |
mView->showWizard();
|
|
1050 |
|
|
1051 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1052 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1053 |
QTest::qWait(WaitTimeForUi);
|
|
1054 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
1055 |
QTest::qWait(WaitTimeForUi);
|
|
1056 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1057 |
QTest::qWait(WaitTimeForUi);
|
|
1058 |
QCOMPARE( mouseClickNext(), true );
|
|
1059 |
|
|
1060 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1061 |
QTest::qWait(WaitTimeForUi);
|
|
1062 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1063 |
QTest::qWait(WaitTimeForUi);
|
|
1064 |
QCOMPARE( mouseClickNext(), true );
|
|
1065 |
|
|
1066 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
|
|
1067 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1068 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1069 |
QCOMPARE( mouseClickNext(), true );
|
|
1070 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
|
|
1071 |
QCOMPARE( selectRadioButton( "list", 1 ), true );
|
|
1072 |
QTest::qWait(WaitTimeForUi);
|
|
1073 |
QCOMPARE( mouseClickNext(), true );
|
|
1074 |
|
|
1075 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
1076 |
#endif
|
|
1077 |
}
|
|
1078 |
|
|
1079 |
/*!
|
|
1080 |
*
|
|
1081 |
*/
|
|
1082 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_all_sec_modes()
|
|
1083 |
{
|
|
1084 |
#ifdef tc_multiple_ssids_with_same_name_all_sec_modes_enabled
|
|
1085 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1086 |
// Add duplicates
|
|
1087 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1088 |
|
|
1089 |
// Add all five kinds of security modes.
|
|
1090 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
|
|
1091 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false, 500);
|
|
1092 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
1093 |
mApOpenList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
|
|
1094 |
mApOpenList->Add("dippadappa", CMManagerShim::Infra, CMManagerShim::WlanSecModeOpen, false, false, 200);
|
|
1095 |
|
|
1096 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1097 |
// Add duplicates
|
|
1098 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1099 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1100 |
|
|
1101 |
// Add all five kinds of security modes.
|
|
1102 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
|
|
1103 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa2, true, false, 500);
|
|
1104 |
mApList->Add("huuhaa3421", CMManagerShim::Adhoc, CMManagerShim::WlanSecModeOpen, false, false, 400);
|
|
1105 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
|
|
1106 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
|
|
1107 |
|
|
1108 |
mWlanQtUtilsContext->setScanWlanApsResult(mApOpenList->List());
|
|
1109 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
1110 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
1111 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
1112 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
1113 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1114 |
|
|
1115 |
mView->showWizard();
|
|
1116 |
|
|
1117 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1118 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1119 |
QTest::qWait(WaitTimeForUi);
|
|
1120 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
1121 |
QTest::qWait(WaitTimeForUi);
|
|
1122 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1123 |
QTest::qWait(WaitTimeForUi);
|
|
1124 |
QCOMPARE( mouseClickNext(), true );
|
|
1125 |
|
|
1126 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1127 |
QStringList buttons;
|
|
1128 |
buttons << hbTrId("txt_occ_dblist_val_infrastructure_public")
|
|
1129 |
<< hbTrId("txt_occ_list_infrastructure_hidden")
|
|
1130 |
<< hbTrId("txt_occ_list_adhoc_1");
|
|
1131 |
QCOMPARE( verifyRadioButtons("list"), buttons );
|
|
1132 |
QTest::qWait(WaitTimeForUi);
|
|
1133 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1134 |
QTest::qWait(WaitTimeForUi);
|
|
1135 |
QCOMPARE( mouseClickNext(), true );
|
|
1136 |
|
|
1137 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
|
|
1138 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1139 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1140 |
QCOMPARE( mouseClickNext(), true );
|
|
1141 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
|
|
1142 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1143 |
QTest::qWait(WaitTimeForUi);
|
|
1144 |
QCOMPARE( mouseClickNext(), true );
|
|
1145 |
|
|
1146 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
1147 |
#endif
|
|
1148 |
}
|
|
1149 |
|
|
1150 |
/*!
|
|
1151 |
*
|
|
1152 |
*/
|
|
1153 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_orientation_switch()
|
|
1154 |
{
|
|
1155 |
#ifdef tc_multiple_ssids_with_same_name_orientation_switch_enabled
|
|
1156 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1157 |
// Add duplicates
|
|
1158 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1159 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1160 |
|
|
1161 |
// Add all five kinds of security modes.
|
|
1162 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, true, false, 500);
|
|
1163 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, false, 300);
|
|
1164 |
mApList->Add("huuhaa3421", CMManagerShim::Infra, CMManagerShim::WlanSecMode802_1x, false, false, 200);
|
|
1165 |
|
|
1166 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa3421", mApList->List());
|
|
1167 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
1168 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
1169 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
1170 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1171 |
|
|
1172 |
mView->showWizard();
|
|
1173 |
|
|
1174 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1175 |
|
|
1176 |
mMainWindow->setOrientation(Qt::Horizontal, false);
|
|
1177 |
QTest::qWait(WaitTimeForUi);
|
|
1178 |
mMainWindow->setOrientation(Qt::Vertical, false);
|
|
1179 |
QTest::qWait(WaitTimeForUi);
|
|
1180 |
|
|
1181 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1182 |
QTest::qWait(WaitTimeForUi);
|
|
1183 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa3421"), true );
|
|
1184 |
QTest::qWait(WaitTimeForUi);
|
|
1185 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1186 |
QTest::qWait(WaitTimeForUi);
|
|
1187 |
QCOMPARE( mouseClickNext(), true );
|
|
1188 |
|
|
1189 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa3421"), true );
|
|
1190 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkSecurity), true );
|
|
1191 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1192 |
QTest::qWait(WaitTimeForUi);
|
|
1193 |
QCOMPARE( mouseClickNext(), true );
|
|
1194 |
|
|
1195 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageKeyQuery, "huuhaa3421"), true );
|
|
1196 |
#endif
|
|
1197 |
}
|
|
1198 |
|
|
1199 |
/*!
|
|
1200 |
*
|
|
1201 |
*/
|
|
1202 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_wps_and_nonwps()
|
|
1203 |
{
|
|
1204 |
#ifdef tc_multiple_ssids_with_same_name_wps_and_nonwps_enabled
|
|
1205 |
mApList->Add("huuhaa", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, false, 100);
|
|
1206 |
|
|
1207 |
// Add all five kinds of security modes.
|
|
1208 |
mApList->Add("huuhaa", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, true, 300);
|
|
1209 |
|
|
1210 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa", mApList->List());
|
|
1211 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
1212 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
1213 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
1214 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1215 |
|
|
1216 |
mView->showWizard();
|
|
1217 |
|
|
1218 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1219 |
|
|
1220 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1221 |
QTest::qWait(WaitTimeForUi);
|
|
1222 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa"), true );
|
|
1223 |
QTest::qWait(WaitTimeForUi);
|
|
1224 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1225 |
QTest::qWait(WaitTimeForUi);
|
|
1226 |
QCOMPARE( mouseClickNext(), true );
|
|
1227 |
|
|
1228 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa"), true );
|
|
1229 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageNetworkMode), true );
|
|
1230 |
QStringList buttons;
|
|
1231 |
buttons << hbTrId("txt_occ_list_infrastructure_hidden")
|
|
1232 |
<< hbTrId("txt_occ_list_wifi_protected_setup");
|
|
1233 |
QCOMPARE( verifyRadioButtons("list"), buttons );
|
|
1234 |
QCOMPARE( selectRadioButton( "list", 1 ), true );
|
|
1235 |
QTest::qWait(WaitTimeForUi);
|
|
1236 |
QCOMPARE( mouseClickNext(), true );
|
|
1237 |
|
|
1238 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageWpsStart), true );
|
|
1239 |
#endif
|
|
1240 |
}
|
|
1241 |
|
|
1242 |
/*!
|
|
1243 |
*
|
|
1244 |
*/
|
|
1245 |
void TestWlanWizardManual::tc_multiple_ssids_with_same_name_two_wps_aps()
|
|
1246 |
{
|
|
1247 |
#ifdef tc_multiple_ssids_with_same_name_two_wps_aps_enabled
|
|
1248 |
mApList->Add("huuhaa", CMManagerShim::Infra, CMManagerShim::WlanSecModeWpa, false, true, 100);
|
|
1249 |
|
|
1250 |
// Add all five kinds of security modes.
|
|
1251 |
mApList->Add("huuhaa", CMManagerShim::Infra, CMManagerShim::WlanSecModeWep, true, true, 300);
|
|
1252 |
|
|
1253 |
mWlanQtUtilsContext->setScanWlanDirectResult("huuhaa", mApList->List());
|
|
1254 |
mWlanQtUtilsContext->setCreateWlanIapResult(100);
|
|
1255 |
mWlanQtUtilsContext->setSignalIctResult(100, WlanQtUtils::IctPassed);
|
|
1256 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(100);
|
|
1257 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1258 |
|
|
1259 |
mView->showWizard();
|
|
1260 |
|
|
1261 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSsid), true );
|
|
1262 |
|
|
1263 |
QCOMPARE( mouseClickObject("lineEditKey"), true );
|
|
1264 |
QTest::qWait(WaitTimeForUi);
|
|
1265 |
QCOMPARE( insertTextToObject("lineEditKey", "huuhaa"), true );
|
|
1266 |
QTest::qWait(WaitTimeForUi);
|
|
1267 |
QCOMPARE( mouseClickObject("dialog"), true );
|
|
1268 |
QTest::qWait(WaitTimeForUi);
|
|
1269 |
QCOMPARE( mouseClickNext(), true );
|
|
1270 |
|
|
1271 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageScanning, "huuhaa"), true );
|
|
1272 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageWpsStart), true );
|
|
1273 |
#endif
|
|
1274 |
}
|