1 /* |
|
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 UT. |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <QTest> |
|
20 #include <QDebug> |
|
21 #include <QList> |
|
22 #include <cmmanagerdefines_shim.h> |
|
23 #include <wlanerrorcodes.h> |
|
24 |
|
25 // User includes |
|
26 #include "testwlanwizardwps.h" |
|
27 #include "testwlanwizardwps_conf.h" |
|
28 #include "wlanwizard.h" |
|
29 #include "wlanwizard_p.h" |
|
30 #include "wlanqtutils_context.h" |
|
31 #include "wlanqtutils.h" |
|
32 #include "wlanqtutilsap.h" |
|
33 #include "wlanwizardpageinternal.h" |
|
34 #include "wpswizardpage.h" |
|
35 |
|
36 #include "wlanmgmtclient_context.h" |
|
37 |
|
38 // External function prototypes |
|
39 |
|
40 // Local constants |
|
41 |
|
42 |
|
43 // ======== LOCAL FUNCTIONS ======== |
|
44 |
|
45 // ======== MEMBER FUNCTIONS ======== |
|
46 |
|
47 |
|
48 // --------------------------------------------------------- |
|
49 // TEST CASES |
|
50 // --------------------------------------------------------- |
|
51 |
|
52 void TestWlanWizardWps::tcConfigureManualOpen() |
|
53 { |
|
54 #ifdef tcConfigureManualOpen_enabled |
|
55 const QString ssid("tcConfigureManualOpen"); |
|
56 mWlanQtUtilsContext->setCreateWlanIapResult(3); |
|
57 mWlanQtUtilsContext->setConnectionSuccessed(true); |
|
58 mWlanQtUtilsContext->setSignalWlanNetworkOpened(3); |
|
59 mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed); |
|
60 |
|
61 WlanQtUtilsAp ap; |
|
62 ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, CMManagerShim::Infra); |
|
63 ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, CMManagerShim::WlanSecModeOpen); |
|
64 ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid); |
|
65 ap.setValue(WlanQtUtilsAp::ConfIdHidden, false); |
|
66 ap.setValue(WlanQtUtilsAp::ConfIdWlanScanSSID, false); |
|
67 |
|
68 // Default values |
|
69 ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString()); |
|
70 ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true ); |
|
71 ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 ); |
|
72 ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString()); |
|
73 ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString()); |
|
74 ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString()); |
|
75 ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString()); |
|
76 |
|
77 mView->mWizard->setParameters( |
|
78 ssid, |
|
79 CMManagerShim::Infra, |
|
80 CMManagerShim::WlanSecModeOpen, |
|
81 false, |
|
82 true); |
|
83 |
|
84 mView->showWizard(); |
|
85 verifyModeSelection(); |
|
86 QCOMPARE(selectRadioButton("radioButtonList", 2), true); |
|
87 QTest::qWait(WaitTimeForUi); |
|
88 QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true ); |
|
89 QCOMPARE(mouseClickNext(), true); |
|
90 QTest::qWait(WaitTimeForUi); |
|
91 |
|
92 QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true ); |
|
93 QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true ); |
|
94 QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true); |
|
95 #endif |
|
96 } |
|
97 |
|
98 void TestWlanWizardWps::tcPushButtonOpen() |
|
99 { |
|
100 #ifdef tcPushButtonOpen_enabled |
|
101 tcPushButton( |
|
102 "tcPushButtonOpen", |
|
103 EWlanIapSecurityModeAllowUnsecure, |
|
104 CMManagerShim::WlanSecModeOpen, |
|
105 EWlanOperatingModeInfrastructure, |
|
106 CMManagerShim::Infra, |
|
107 EWlanDefaultWepKey1, |
|
108 CMManagerShim::WepKeyIndex1); |
|
109 #endif |
|
110 } |
|
111 |
|
112 void TestWlanWizardWps::tcPushButtonWep1() |
|
113 { |
|
114 #ifdef tcPushButtonWep1_enabled |
|
115 tcPushButton( |
|
116 "tcPushButtonWep1", |
|
117 EWlanIapSecurityModeWep, |
|
118 CMManagerShim::WlanSecModeWep, |
|
119 EWlanOperatingModeAdhoc, |
|
120 CMManagerShim::Adhoc, |
|
121 EWlanDefaultWepKey1, |
|
122 CMManagerShim::WepKeyIndex1); |
|
123 #endif |
|
124 } |
|
125 |
|
126 void TestWlanWizardWps::tcPushButtonWep2() |
|
127 { |
|
128 #ifdef tcPushButtonWep2_enabled |
|
129 tcPushButton( |
|
130 "tcPushButtonWep2", |
|
131 EWlanIapSecurityModeWep, |
|
132 CMManagerShim::WlanSecModeWep, |
|
133 EWlanOperatingModeAdhoc, |
|
134 CMManagerShim::Adhoc, |
|
135 EWlanDefaultWepKey2, |
|
136 CMManagerShim::WepKeyIndex2); |
|
137 #endif |
|
138 } |
|
139 |
|
140 void TestWlanWizardWps::tcPushButtonWep3() |
|
141 { |
|
142 #ifdef tcPushButtonWep3_enabled |
|
143 tcPushButton( |
|
144 "tcPushButtonWep3", |
|
145 EWlanIapSecurityModeWep, |
|
146 CMManagerShim::WlanSecModeWep, |
|
147 EWlanOperatingModeAdhoc, |
|
148 CMManagerShim::Adhoc, |
|
149 EWlanDefaultWepKey3, |
|
150 CMManagerShim::WepKeyIndex3); |
|
151 #endif |
|
152 } |
|
153 |
|
154 void TestWlanWizardWps::tcPushButtonWep4() |
|
155 { |
|
156 #ifdef tcPushButtonWep4_enabled |
|
157 tcPushButton( |
|
158 "tcPushButtonWep4", |
|
159 EWlanIapSecurityModeWep, |
|
160 CMManagerShim::WlanSecModeWep, |
|
161 EWlanOperatingModeAdhoc, |
|
162 CMManagerShim::Adhoc, |
|
163 EWlanDefaultWepKey4, |
|
164 CMManagerShim::WepKeyIndex4); |
|
165 #endif |
|
166 } |
|
167 |
|
168 void TestWlanWizardWps::tcPushButtonWpa() |
|
169 { |
|
170 #ifdef tcPushButtonWpa_enabled |
|
171 tcPushButton( |
|
172 "tcPushButtonWpa", |
|
173 EWlanIapSecurityModeWpa, |
|
174 CMManagerShim::WlanSecModeWpa, |
|
175 EWlanOperatingModeAdhoc, |
|
176 CMManagerShim::Adhoc, |
|
177 EWlanDefaultWepKey1, |
|
178 CMManagerShim::WepKeyIndex1); |
|
179 #endif |
|
180 } |
|
181 |
|
182 void TestWlanWizardWps::tcPushButtonWpa2() |
|
183 { |
|
184 #ifdef tcPushButtonWpa2_enabled |
|
185 tcPushButton( |
|
186 "tcPushButtonWpa2", |
|
187 EWlanIapSecurityModeWpa2Only, |
|
188 CMManagerShim::WlanSecModeWpa2, |
|
189 EWlanOperatingModeAdhoc, |
|
190 CMManagerShim::Adhoc, |
|
191 EWlanDefaultWepKey1, |
|
192 CMManagerShim::WepKeyIndex1); |
|
193 #endif |
|
194 } |
|
195 |
|
196 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError() |
|
197 { |
|
198 #ifdef tcPinCode_KErrWlanProtectedSetupOOBInterfaceReadError_enabled |
|
199 tcPinCode_failure( |
|
200 KErrWlanProtectedSetupOOBInterfaceReadError, |
|
201 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
202 #endif |
|
203 } |
|
204 |
|
205 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure() |
|
206 { |
|
207 #ifdef tcPinCode_KErrWlanProtectedSetupDecryptionCRCFailure_enabled |
|
208 tcPinCode_failure( |
|
209 KErrWlanProtectedSetupDecryptionCRCFailure, |
|
210 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
211 #endif |
|
212 } |
|
213 |
|
214 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported() |
|
215 { |
|
216 #ifdef tcPinCode_KErrWlanProtectedSetup2_4ChannelNotSupported_enabled |
|
217 tcPinCode_failure( |
|
218 KErrWlanProtectedSetup2_4ChannelNotSupported, |
|
219 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
220 #endif |
|
221 } |
|
222 |
|
223 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported() |
|
224 { |
|
225 #ifdef tcPinCode_KErrWlanProtectedSetup5_0ChannelNotSupported_enabled |
|
226 tcPinCode_failure( |
|
227 KErrWlanProtectedSetup5_0ChannelNotSupported, |
|
228 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
229 #endif |
|
230 } |
|
231 |
|
232 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure() |
|
233 { |
|
234 #ifdef tcPinCode_KErrWlanProtectedSetupNetworkAuthFailure_enabled |
|
235 tcPinCode_failure( |
|
236 KErrWlanProtectedSetupNetworkAuthFailure, |
|
237 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
238 #endif |
|
239 } |
|
240 |
|
241 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupNoDHCPResponse() |
|
242 { |
|
243 #ifdef tcPinCode_KErrWlanProtectedSetupNoDHCPResponse_enabled |
|
244 tcPinCode_failure( |
|
245 KErrWlanProtectedSetupNoDHCPResponse, |
|
246 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
247 #endif |
|
248 } |
|
249 |
|
250 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig() |
|
251 { |
|
252 #ifdef tcPinCode_KErrWlanProtectedSetupFailedDHCPConfig_enabled |
|
253 tcPinCode_failure( |
|
254 KErrWlanProtectedSetupFailedDHCPConfig, |
|
255 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
256 #endif |
|
257 } |
|
258 |
|
259 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupIPAddressConflict() |
|
260 { |
|
261 #ifdef tcPinCode_KErrWlanProtectedSetupIPAddressConflict_enabled |
|
262 tcPinCode_failure( |
|
263 KErrWlanProtectedSetupIPAddressConflict, |
|
264 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
265 #endif |
|
266 } |
|
267 |
|
268 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar() |
|
269 { |
|
270 #ifdef tcPinCode_KErrWlanProtectedSetupCouldNotConnectToRegistrar_enabled |
|
271 tcPinCode_failure( |
|
272 KErrWlanProtectedSetupCouldNotConnectToRegistrar, |
|
273 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
274 #endif |
|
275 } |
|
276 |
|
277 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected() |
|
278 { |
|
279 #ifdef tcPinCode_KErrWlanProtectedSetupMultiplePBCSessionsDetected_enabled |
|
280 tcPinCode_failure( |
|
281 KErrWlanProtectedSetupMultiplePBCSessionsDetected, |
|
282 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
283 #endif |
|
284 } |
|
285 |
|
286 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected() |
|
287 { |
|
288 #ifdef tcPinCode_KErrWlanProtectedSetupRogueActivitySuspected_enabled |
|
289 tcPinCode_failure( |
|
290 KErrWlanProtectedSetupRogueActivitySuspected, |
|
291 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
292 #endif |
|
293 } |
|
294 |
|
295 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDeviceBusy() |
|
296 { |
|
297 #ifdef tcPinCode_KErrWlanProtectedSetupDeviceBusy_enabled |
|
298 tcPinCode_failure( |
|
299 KErrWlanProtectedSetupDeviceBusy, |
|
300 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
301 #endif |
|
302 } |
|
303 |
|
304 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupSetupLocked() |
|
305 { |
|
306 #ifdef tcPinCode_KErrWlanProtectedSetupSetupLocked_enabled |
|
307 tcPinCode_failure( |
|
308 KErrWlanProtectedSetupSetupLocked, |
|
309 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
310 #endif |
|
311 } |
|
312 |
|
313 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupMessageTimeout() |
|
314 { |
|
315 #ifdef tcPinCode_KErrWlanProtectedSetupMessageTimeout_enabled |
|
316 tcPinCode_failure( |
|
317 KErrWlanProtectedSetupMessageTimeout, |
|
318 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
319 #endif |
|
320 } |
|
321 |
|
322 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout() |
|
323 { |
|
324 #ifdef tcPinCode_KErrWlanProtectedSetupRegistrationSessionTimeout_enabled |
|
325 tcPinCode_failure( |
|
326 KErrWlanProtectedSetupRegistrationSessionTimeout, |
|
327 hbTrId("txt_occ_dialog_configuration_failed_please_try_ag")); |
|
328 #endif |
|
329 } |
|
330 |
|
331 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure() |
|
332 { |
|
333 #ifdef tcPinCode_KErrWlanProtectedSetupDevicePasswordAuthFailure_enabled |
|
334 tcPinCode_failure( |
|
335 KErrWlanProtectedSetupDevicePasswordAuthFailure, |
|
336 hbTrId("txt_occ_dialog_configuration_failed_authenticatio")); |
|
337 #endif |
|
338 } |
|
339 |
|
340 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported() |
|
341 { |
|
342 #ifdef tcPinCode_KErrWlanProtectedSetupPINMethodNotSupported_enabled |
|
343 tcPinCode_failure( |
|
344 KErrWlanProtectedSetupPINMethodNotSupported, |
|
345 hbTrId("txt_occ_dialog_configuration_failed_authenticatio")); |
|
346 #endif |
|
347 } |
|
348 |
|
349 void TestWlanWizardWps::tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported() |
|
350 { |
|
351 #ifdef tcPinCode_KErrWlanProtectedSetupPBMethodNotSupported_enabled |
|
352 tcPinCode_failure( |
|
353 KErrWlanProtectedSetupPBMethodNotSupported, |
|
354 hbTrId("txt_occ_dialog_configuration_failed_authenticatio")); |
|
355 #endif |
|
356 } |
|
357 |
|
358 void TestWlanWizardWps::verifyModeSelection() |
|
359 { |
|
360 QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep2 ), true ); |
|
361 QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); |
|
362 |
|
363 QStringList list; |
|
364 list << hbTrId("txt_occ_list_use_pushbutton") |
|
365 << hbTrId("txt_occ_list_use_pin_code") |
|
366 << hbTrId("txt_occ_list_configure_manually"); |
|
367 |
|
368 QCOMPARE(verifyRadioButtons("radioButtonList"), list); |
|
369 } |
|
370 |
|
371 |
|
372 void TestWlanWizardWps::tcPushButton( |
|
373 const QString &ssid, |
|
374 int secModeWlan, |
|
375 int secModeCmm, |
|
376 int operModeWlan, |
|
377 int operModeCmm, |
|
378 int defaultWepKeyIndexWlan, |
|
379 int defaultWepKeyIndexCmm) |
|
380 { |
|
381 mWlanQtUtilsContext->setCreateWlanIapResult(3); |
|
382 mWlanQtUtilsContext->setConnectionSuccessed(true); |
|
383 mWlanQtUtilsContext->setSignalWlanNetworkOpened(3); |
|
384 mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed); |
|
385 |
|
386 WlanQtUtilsAp ap; |
|
387 ap.setValue(WlanQtUtilsAp::ConfIdConnectionMode, operModeCmm); |
|
388 ap.setValue(WlanQtUtilsAp::ConfIdSecurityMode, secModeCmm); |
|
389 ap.setValue(WlanQtUtilsAp::ConfIdSsid, ssid); |
|
390 ap.setValue(WlanQtUtilsAp::ConfIdHidden, false); |
|
391 ap.setValue(WlanQtUtilsAp::ConfIdWlanScanSSID, false); |
|
392 |
|
393 // Default values |
|
394 ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, QString()); |
|
395 ap.setValue(WlanQtUtilsAp::ConfIdWpaPskUse, true ); |
|
396 ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, CMManagerShim::WepKeyIndex1 ); |
|
397 ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, QString()); |
|
398 ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, QString()); |
|
399 ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, QString()); |
|
400 ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, QString()); |
|
401 |
|
402 if (secModeCmm == CMManagerShim::WlanSecModeWep){ |
|
403 ap.setValue(WlanQtUtilsAp::ConfIdWepKey1, "wepkey1"); |
|
404 ap.setValue(WlanQtUtilsAp::ConfIdWepKey2, "wepkey2"); |
|
405 ap.setValue(WlanQtUtilsAp::ConfIdWepKey3, "wepkey3"); |
|
406 ap.setValue(WlanQtUtilsAp::ConfIdWepKey4, "wepkey4"); |
|
407 ap.setValue(WlanQtUtilsAp::ConfIdWepDefaultIndex, defaultWepKeyIndexCmm ); |
|
408 } else if (secModeCmm == CMManagerShim::WlanSecModeWpa || |
|
409 secModeCmm == CMManagerShim::WlanSecModeWpa2) { |
|
410 ap.setValue(WlanQtUtilsAp::ConfIdWpaPsk, "wpapsk"); |
|
411 } |
|
412 |
|
413 mWlanMgmtClientContext->setRunProtectedSetup(ssid, KErrNone); |
|
414 mWlanMgmtClientContext->appendResult( |
|
415 ssid, |
|
416 secModeWlan, |
|
417 operModeWlan, |
|
418 defaultWepKeyIndexWlan, |
|
419 "wepkey1", |
|
420 "wepkey2", |
|
421 "wepkey3", |
|
422 "wepkey4", |
|
423 "wpapsk"); |
|
424 |
|
425 mView->mWizard->setParameters( |
|
426 ssid, |
|
427 CMManagerShim::Adhoc, |
|
428 CMManagerShim::WlanSecModeWep, |
|
429 false, |
|
430 true); |
|
431 |
|
432 mView->showWizard(); |
|
433 verifyModeSelection(); |
|
434 |
|
435 QCOMPARE(selectRadioButton("radioButtonList", 0), true); |
|
436 QTest::qWait(WaitTimeForUi); |
|
437 QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true ); |
|
438 QCOMPARE(mouseClickNext(), true); |
|
439 QTest::qWait(WaitTimeForUi); |
|
440 |
|
441 QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep3_Button), true ); |
|
442 QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true ); |
|
443 QCOMPARE( mouseClickNext(), true); |
|
444 QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep4), true ); |
|
445 QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); |
|
446 |
|
447 QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true ); |
|
448 QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true ); |
|
449 QTest::qWait(WaitTimeForUi); |
|
450 |
|
451 QCOMPARE( mWlanQtUtilsContext->verifyWlanIapSettings(ap), true); |
|
452 } |
|
453 |
|
454 |
|
455 void TestWlanWizardWps::tcPinCode_failure( |
|
456 int errorCode, |
|
457 const QString &errorText) |
|
458 { |
|
459 const QString ssid("tcPinCode_failure"); |
|
460 |
|
461 mWlanQtUtilsContext->setCreateWlanIapResult(3); |
|
462 mWlanQtUtilsContext->setConnectionSuccessed(true); |
|
463 mWlanQtUtilsContext->setSignalWlanNetworkOpened(3); |
|
464 mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed); |
|
465 |
|
466 mWlanMgmtClientContext->setRunProtectedSetup(ssid, errorCode); |
|
467 |
|
468 mView->mWizard->setParameters( |
|
469 ssid, |
|
470 CMManagerShim::Adhoc, |
|
471 CMManagerShim::WlanSecModeWep, |
|
472 false, |
|
473 true); |
|
474 |
|
475 mView->showWizard(); |
|
476 verifyModeSelection(); |
|
477 |
|
478 QCOMPARE(selectRadioButton("radioButtonList", 1), true); |
|
479 QTest::qWait(WaitTimeForUi); |
|
480 QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true ); |
|
481 QCOMPARE(mouseClickNext(), true); |
|
482 QTest::qWait(WaitTimeForUi); |
|
483 |
|
484 QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep3_Number), true ); |
|
485 QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true ); |
|
486 |
|
487 QCOMPARE(mouseClickNext(), true); |
|
488 QTest::qWait(WaitTimeForUi); |
|
489 |
|
490 QCOMPARE( verifyCurrentPage(WpsWizardPage::PageWpsWizardStep4), true ); |
|
491 QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); |
|
492 |
|
493 QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorText), true ); |
|
494 QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true ); |
|
495 QTest::qWait(WaitTimeForUi); |
|
496 } |
|