53
|
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
|
60
|
19 |
|
|
20 |
#include <HbParameterLengthLimiter>
|
|
21 |
|
53
|
22 |
#include <QTest>
|
|
23 |
#include <QDebug>
|
|
24 |
#include <QList>
|
60
|
25 |
|
53
|
26 |
#include <cmmanagerdefines_shim.h>
|
|
27 |
#include <wlanerrorcodes.h>
|
|
28 |
|
|
29 |
// User includes
|
60
|
30 |
|
53
|
31 |
#include "testwlanwizardeap.h"
|
|
32 |
#include "testwlanwizardeap_conf.h"
|
|
33 |
#include "hbautotest.h"
|
|
34 |
#include "wlanwizard.h"
|
|
35 |
#include "wlanwizard_p.h"
|
|
36 |
#include "wlanqtutils_context.h"
|
|
37 |
#include "wlanqtutils.h"
|
|
38 |
#include "wlanqtutilsap.h"
|
|
39 |
#include "wlanwizardpageinternal.h"
|
|
40 |
#include "eapwizardpage.h"
|
|
41 |
#include "eapqtvalidator_stub.h"
|
|
42 |
|
|
43 |
#include "eapqtconfiginterface_context.h"
|
|
44 |
|
|
45 |
// External function prototypes
|
|
46 |
|
|
47 |
// Local constants
|
|
48 |
|
|
49 |
|
|
50 |
// ======== LOCAL FUNCTIONS ========
|
|
51 |
|
|
52 |
// ======== MEMBER FUNCTIONS ========
|
|
53 |
|
|
54 |
|
|
55 |
// ---------------------------------------------------------
|
|
56 |
// TEST CASES
|
|
57 |
// ---------------------------------------------------------
|
|
58 |
void TestWlanWizardEap::tc_eap_outer_page_orientation_change()
|
|
59 |
{
|
|
60 |
#ifdef tc_eap_outer_page_orientation_change_enabled
|
|
61 |
|
|
62 |
const QString ssid("tc_eap_outer_page_orientation_change");
|
|
63 |
|
|
64 |
mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
|
|
65 |
|
|
66 |
mView->mWizard->setParameters(
|
60
|
67 |
ssid,
|
|
68 |
ssid.toUtf8(),
|
53
|
69 |
CMManagerShim::Infra,
|
|
70 |
CMManagerShim::WlanSecModeWpa2,
|
|
71 |
false,
|
|
72 |
false);
|
|
73 |
|
|
74 |
mView->showWizard();
|
|
75 |
|
|
76 |
verify_outertype(ButtonDisabled);
|
|
77 |
|
|
78 |
mMainWindow->setOrientation(Qt::Horizontal, false);
|
|
79 |
QTest::qWait(WaitTimeForUi);
|
|
80 |
|
|
81 |
verify_outertype(ButtonDisabled);
|
|
82 |
|
|
83 |
mMainWindow->setOrientation(Qt::Vertical, false);
|
|
84 |
QTest::qWait(WaitTimeForUi);
|
|
85 |
|
|
86 |
verify_outertype(ButtonDisabled);
|
|
87 |
#endif
|
|
88 |
}
|
|
89 |
|
|
90 |
void TestWlanWizardEap::tc_eap_aka()
|
|
91 |
{
|
|
92 |
#ifdef tc_eap_aka_enabled
|
|
93 |
tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
|
|
94 |
#endif
|
|
95 |
}
|
|
96 |
|
|
97 |
void TestWlanWizardEap::tc_eap_sim()
|
|
98 |
{
|
|
99 |
#ifdef tc_eap_sim_enabled
|
|
100 |
tc_eap_aka_sim(EapQtPluginHandle::PluginEapSim);
|
|
101 |
#endif
|
|
102 |
}
|
|
103 |
|
|
104 |
void TestWlanWizardEap::tc_eap_leap()
|
|
105 |
{
|
|
106 |
#ifdef tc_eap_leap_enabled
|
|
107 |
const QString username("user");
|
|
108 |
const QString password("passwd");
|
|
109 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
110 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
111 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
112 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
113 |
|
|
114 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
115 |
mEapQtUtilsContext->createLeap(username,password);
|
|
116 |
|
|
117 |
const QString ssid("tc_eap_leap");
|
|
118 |
|
|
119 |
mView->mWizard->setParameters(
|
60
|
120 |
ssid,
|
|
121 |
ssid.toUtf8(),
|
53
|
122 |
CMManagerShim::Infra,
|
|
123 |
CMManagerShim::WlanSecModeWpa,
|
|
124 |
false,
|
|
125 |
false);
|
|
126 |
|
|
127 |
mView->showWizard();
|
|
128 |
|
|
129 |
verify_outertype_select_first(ButtonDisabled);
|
|
130 |
verify_username_password_click_next(EapQtPluginHandle::PluginLeap, username, password);
|
|
131 |
|
|
132 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
133 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
134 |
QTest::qWait(WaitTimeForUi);
|
|
135 |
|
|
136 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
137 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
138 |
QTest::qWait(WaitTimeForUi);
|
|
139 |
|
|
140 |
QCOMPARE( verifySummaryPage(
|
|
141 |
ssid,
|
|
142 |
CMManagerShim::Infra,
|
|
143 |
false,
|
|
144 |
CMManagerShim::WlanSecModeWpa,
|
|
145 |
false,
|
|
146 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
147 |
EapQtPluginHandle::PluginLeap),true);
|
|
148 |
|
|
149 |
QTest::qWait(WaitTimeForUi);
|
|
150 |
#endif
|
|
151 |
}
|
|
152 |
|
|
153 |
void TestWlanWizardEap::tc_eap_peap_gtc()
|
|
154 |
{
|
|
155 |
#ifdef tc_eap_peap_gtc_enabled
|
|
156 |
tc_eap_peap_ttls(
|
|
157 |
EapQtPluginHandle::PluginPeap,
|
|
158 |
EapQtPluginHandle::PluginEapGtc);
|
|
159 |
#endif
|
|
160 |
}
|
|
161 |
|
|
162 |
void TestWlanWizardEap::tc_eap_peap_mschapv2()
|
|
163 |
{
|
|
164 |
#ifdef tc_eap_peap_mschapv2_enabled
|
|
165 |
tc_eap_peap_ttls(
|
|
166 |
EapQtPluginHandle::PluginPeap,
|
|
167 |
EapQtPluginHandle::PluginEapMschapv2);
|
|
168 |
#endif
|
|
169 |
}
|
|
170 |
|
|
171 |
void TestWlanWizardEap::tc_eap_ttls_mschapv2()
|
|
172 |
{
|
|
173 |
#ifdef tc_eap_ttls_mschapv2_enabled
|
|
174 |
tc_eap_peap_ttls(
|
|
175 |
EapQtPluginHandle::PluginEapTtls,
|
|
176 |
EapQtPluginHandle::PluginPlainMschapv2);
|
|
177 |
#endif
|
|
178 |
}
|
|
179 |
|
|
180 |
void TestWlanWizardEap::tc_eap_ttls_pap()
|
|
181 |
{
|
|
182 |
#ifdef tc_eap_ttls_pap_enabled
|
|
183 |
tc_eap_peap_ttls(
|
|
184 |
EapQtPluginHandle::PluginEapTtls,
|
|
185 |
EapQtPluginHandle::PluginPap);
|
|
186 |
#endif
|
|
187 |
}
|
|
188 |
|
|
189 |
void TestWlanWizardEap::tc_eap_ttls_gtc()
|
|
190 |
{
|
|
191 |
#ifdef tc_eap_ttls_gtc_enabled
|
|
192 |
tc_eap_peap_ttls(
|
|
193 |
EapQtPluginHandle::PluginEapTtls,
|
|
194 |
EapQtPluginHandle::PluginEapGtc);
|
|
195 |
#endif
|
|
196 |
}
|
|
197 |
|
|
198 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanUserRejected()
|
|
199 |
{
|
|
200 |
#ifdef tc_eap_aka_connect_KErrWlanUserRejected_enabled
|
|
201 |
tc_eap_aka_connect_error(
|
|
202 |
KErrWlanUserRejected,
|
|
203 |
HbParameterLengthLimiter("txt_occ_dialog_1_auth_failed_user_cert_rej").arg(
|
|
204 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
205 |
#endif
|
|
206 |
}
|
|
207 |
|
|
208 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanUserCertificateExpired()
|
|
209 |
{
|
|
210 |
#ifdef tc_eap_aka_connect_KErrWlanUserCertificateExpired_enabled
|
|
211 |
tc_eap_aka_connect_error(
|
|
212 |
KErrWlanUserCertificateExpired,
|
|
213 |
HbParameterLengthLimiter("txt_occ_dialog_1_auth_failed_user_cert_exp").arg(
|
|
214 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
215 |
#endif
|
|
216 |
}
|
|
217 |
|
|
218 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanServerCertificateExpired()
|
|
219 |
{
|
|
220 |
#ifdef tc_eap_aka_connect_KErrWlanServerCertificateExpired_enabled
|
|
221 |
tc_eap_aka_connect_error(
|
|
222 |
KErrWlanServerCertificateExpired,
|
|
223 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed_server_ce").arg(
|
|
224 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
225 |
#endif
|
|
226 |
}
|
|
227 |
|
|
228 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanCerficateVerifyFailed()
|
|
229 |
{
|
|
230 |
#ifdef tc_eap_aka_connect_KErrWlanCerficateVerifyFailed_enabled
|
|
231 |
tc_eap_aka_connect_error(
|
|
232 |
KErrWlanCerficateVerifyFailed,
|
|
233 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed_could_not").arg(
|
|
234 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
235 |
#endif
|
|
236 |
}
|
|
237 |
|
|
238 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoCipherSuite()
|
|
239 |
{
|
|
240 |
#ifdef tc_eap_aka_connect_KErrWlanNoCipherSuite_enabled
|
|
241 |
tc_eap_aka_connect_error(
|
|
242 |
KErrWlanNoCipherSuite,
|
|
243 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed_cipher_su").arg(
|
|
244 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
245 |
#endif
|
|
246 |
}
|
|
247 |
|
|
248 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanSimNotInstalled()
|
|
249 |
{
|
|
250 |
#ifdef tc_eap_aka_connect_KErrWlanSimNotInstalled_enabled
|
|
251 |
tc_eap_aka_connect_error(
|
|
252 |
KErrWlanSimNotInstalled,
|
|
253 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed_check_sim").arg(
|
|
254 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
255 |
#endif
|
|
256 |
}
|
|
257 |
|
|
258 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted()
|
|
259 |
{
|
|
260 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastPacStoreCorrupted_enabled
|
|
261 |
tc_eap_aka_connect_error(
|
|
262 |
KErrWlanEapFastPacStoreCorrupted,
|
|
263 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed_reset_pac").arg(
|
|
264 |
eapTypeToString(EapQtPluginHandle::PluginEapFast)));
|
|
265 |
#endif
|
|
266 |
}
|
|
267 |
|
|
268 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapSimFailed()
|
|
269 |
{
|
|
270 |
#ifdef tc_eap_aka_connect_KErrWlanEapSimFailed_enabled
|
|
271 |
tc_eap_aka_connect_error(
|
|
272 |
KErrWlanEapSimFailed,
|
|
273 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
274 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
275 |
#endif
|
|
276 |
}
|
|
277 |
|
|
278 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNotSubscribed()
|
|
279 |
{
|
|
280 |
#ifdef tc_eap_aka_connect_KErrWlanNotSubscribed_enabled
|
|
281 |
tc_eap_aka_connect_error(
|
|
282 |
KErrWlanNotSubscribed,
|
|
283 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
284 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
285 |
#endif
|
|
286 |
}
|
|
287 |
|
|
288 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrCancel()
|
|
289 |
{
|
|
290 |
#ifdef tc_eap_aka_connect_KErrCancel_enabled
|
|
291 |
tc_eap_aka_connect_error(
|
|
292 |
KErrCancel,
|
|
293 |
hbTrId("txt_occ_dialog_connection_failed"));
|
|
294 |
#endif
|
|
295 |
}
|
|
296 |
|
|
297 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapTlsFailed()
|
|
298 |
{
|
|
299 |
#ifdef tc_eap_aka_connect_KErrWlanEapTlsFailed_enabled
|
|
300 |
tc_eap_aka_connect_error(
|
|
301 |
KErrWlanEapTlsFailed,
|
|
302 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
303 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
304 |
#endif
|
|
305 |
}
|
|
306 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapPeapFailed()
|
|
307 |
{
|
|
308 |
#ifdef tc_eap_aka_connect_KErrWlanEapPeapFailed_enabled
|
|
309 |
tc_eap_aka_connect_error(
|
|
310 |
KErrWlanEapPeapFailed,
|
|
311 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
312 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
313 |
#endif
|
|
314 |
}
|
|
315 |
|
|
316 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapAkaFailed()
|
|
317 |
{
|
|
318 |
#ifdef tc_eap_aka_connect_KErrWlanEapAkaFailed_enabled
|
|
319 |
tc_eap_aka_connect_error(
|
|
320 |
KErrWlanEapAkaFailed,
|
|
321 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
322 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
323 |
#endif
|
|
324 |
}
|
|
325 |
|
|
326 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapTtlsFailed()
|
|
327 |
{
|
|
328 |
#ifdef tc_eap_aka_connect_KErrWlanEapTtlsFailed_enabled
|
|
329 |
tc_eap_aka_connect_error(
|
|
330 |
KErrWlanEapTtlsFailed,
|
|
331 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
332 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
333 |
#endif
|
|
334 |
}
|
|
335 |
|
|
336 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanLeapFailed()
|
|
337 |
{
|
|
338 |
#ifdef tc_eap_aka_connect_KErrWlanLeapFailed_enabled
|
|
339 |
tc_eap_aka_connect_error(
|
|
340 |
KErrWlanLeapFailed,
|
|
341 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
342 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
343 |
#endif
|
|
344 |
}
|
|
345 |
|
|
346 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoUserCertificate()
|
|
347 |
{
|
|
348 |
#ifdef tc_eap_aka_connect_KErrWlanNoUserCertificate_enabled
|
|
349 |
tc_eap_aka_connect_error(
|
|
350 |
KErrWlanNoUserCertificate,
|
|
351 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
352 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
353 |
#endif
|
|
354 |
}
|
|
355 |
|
|
356 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError()
|
|
357 |
{
|
|
358 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastTunnelCompromiseError_enabled
|
|
359 |
tc_eap_aka_connect_error(
|
|
360 |
KErrWlanEapFastTunnelCompromiseError,
|
|
361 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
362 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
363 |
#endif
|
|
364 |
}
|
|
365 |
|
|
366 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged()
|
|
367 |
{
|
|
368 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastUnexpextedTlvExhanged_enabled
|
|
369 |
tc_eap_aka_connect_error(
|
|
370 |
KErrWlanEapFastUnexpextedTlvExhanged,
|
|
371 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
372 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
373 |
#endif
|
|
374 |
}
|
|
375 |
|
|
376 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled()
|
|
377 |
{
|
|
378 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled_enabled
|
|
379 |
tc_eap_aka_connect_error(
|
|
380 |
KErrWlanEapFastNoPacNorCertsToAuthenticateWithProvDisabled,
|
|
381 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
382 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
383 |
#endif
|
|
384 |
}
|
|
385 |
|
|
386 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid()
|
|
387 |
{
|
|
388 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastNoMatchingPacForAid_enabled
|
|
389 |
tc_eap_aka_connect_error(
|
|
390 |
KErrWlanEapFastNoMatchingPacForAid,
|
|
391 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
392 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
393 |
#endif
|
|
394 |
}
|
|
395 |
|
|
396 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanEapFastAuthFailed()
|
|
397 |
{
|
|
398 |
#ifdef tc_eap_aka_connect_KErrWlanEapFastAuthFailed_enabled
|
|
399 |
tc_eap_aka_connect_error(
|
|
400 |
KErrWlanEapFastAuthFailed,
|
|
401 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
402 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
403 |
#endif
|
|
404 |
}
|
|
405 |
|
|
406 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanAccessBarred()
|
|
407 |
{
|
|
408 |
#ifdef tc_eap_aka_connect_KErrWlanAccessBarred_enabled
|
|
409 |
tc_eap_aka_connect_error(
|
|
410 |
KErrWlanAccessBarred,
|
|
411 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
412 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
413 |
#endif
|
|
414 |
}
|
|
415 |
|
|
416 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanPasswordExpired()
|
|
417 |
{
|
|
418 |
#ifdef tc_eap_aka_connect_KErrWlanPasswordExpired_enabled
|
|
419 |
tc_eap_aka_connect_error(
|
|
420 |
KErrWlanPasswordExpired,
|
|
421 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
422 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
423 |
#endif
|
|
424 |
}
|
|
425 |
|
|
426 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanNoDialinPermissions()
|
|
427 |
{
|
|
428 |
#ifdef tc_eap_aka_connect_KErrWlanNoDialinPermissions_enabled
|
|
429 |
tc_eap_aka_connect_error(
|
|
430 |
KErrWlanNoDialinPermissions,
|
|
431 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
432 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
433 |
#endif
|
|
434 |
}
|
|
435 |
|
|
436 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanAccountDisabled()
|
|
437 |
{
|
|
438 |
#ifdef tc_eap_aka_connect_KErrWlanAccountDisabled_enabled
|
|
439 |
tc_eap_aka_connect_error(
|
|
440 |
KErrWlanAccountDisabled,
|
|
441 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
442 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
443 |
#endif
|
|
444 |
}
|
|
445 |
|
|
446 |
void TestWlanWizardEap::tc_eap_aka_connect_KErrWlanRestrictedLogonHours()
|
|
447 |
{
|
|
448 |
#ifdef tc_eap_aka_connect_KErrWlanRestrictedLogonHours_enabled
|
|
449 |
tc_eap_aka_connect_error(
|
|
450 |
KErrWlanRestrictedLogonHours,
|
|
451 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
452 |
eapTypeToString(EapQtPluginHandle::PluginEapAka)));
|
|
453 |
#endif
|
|
454 |
}
|
|
455 |
|
|
456 |
void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed()
|
|
457 |
{
|
|
458 |
#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanEapGtcFailed_enabled
|
|
459 |
tc_eap_peap_ttls(
|
|
460 |
EapQtPluginHandle::PluginEapTtls,
|
|
461 |
EapQtPluginHandle::PluginPlainMschapv2,
|
|
462 |
KErrWlanEapGtcFailed,
|
|
463 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
464 |
eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
|
|
465 |
#endif
|
|
466 |
}
|
|
467 |
|
|
468 |
void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2()
|
|
469 |
{
|
|
470 |
#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanEapMsChapv2_enabled
|
|
471 |
tc_eap_peap_ttls(
|
|
472 |
EapQtPluginHandle::PluginEapTtls,
|
|
473 |
EapQtPluginHandle::PluginPlainMschapv2,
|
|
474 |
KErrWlanEapMsChapv2,
|
|
475 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
476 |
eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
|
|
477 |
#endif
|
|
478 |
}
|
|
479 |
|
|
480 |
void TestWlanWizardEap::tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed()
|
|
481 |
{
|
|
482 |
#ifdef tc_eap_ttls_mschapv2_connect_KErrWlanNotSubscribed_enabled
|
|
483 |
tc_eap_peap_ttls(
|
|
484 |
EapQtPluginHandle::PluginEapTtls,
|
|
485 |
EapQtPluginHandle::PluginPlainMschapv2,
|
|
486 |
KErrWlanNotSubscribed,
|
|
487 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
488 |
eapTypeToString(EapQtPluginHandle::PluginPlainMschapv2)));
|
|
489 |
#endif
|
|
490 |
}
|
|
491 |
|
|
492 |
void TestWlanWizardEap::tc_eap_ttls_gtc_back_and_forward()
|
|
493 |
{
|
|
494 |
#ifdef tc_eap_ttls_gtc_back_and_forward_enabled
|
|
495 |
tc_eap_peap_ttls(
|
|
496 |
EapQtPluginHandle::PluginEapTtls,
|
|
497 |
EapQtPluginHandle::PluginEapGtc,
|
|
498 |
KErrWlanNotSubscribed,
|
|
499 |
HbParameterLengthLimiter("txt_occ_dialog_1_authentication_failed").arg(
|
|
500 |
eapTypeToString(EapQtPluginHandle::PluginEapGtc)));
|
|
501 |
|
|
502 |
// Go back to outertype selection page
|
|
503 |
QCOMPARE(mouseClickPrevious(), true);
|
|
504 |
QTest::qWait(WaitTimeForUi);
|
|
505 |
verify_username_password(EapQtPluginHandle::PluginEapGtc);
|
|
506 |
|
|
507 |
QCOMPARE(mouseClickPrevious(), true);
|
|
508 |
QTest::qWait(WaitTimeForUi);
|
|
509 |
verify_innertype(
|
|
510 |
EapQtPluginHandle::PluginEapTtls,
|
|
511 |
ButtonEnabled);
|
|
512 |
|
|
513 |
QCOMPARE(mouseClickPrevious(), true);
|
|
514 |
QTest::qWait(WaitTimeForUi);
|
|
515 |
verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTtls));
|
|
516 |
|
|
517 |
QCOMPARE(mouseClickPrevious(), true);
|
|
518 |
QTest::qWait(WaitTimeForUi);
|
|
519 |
verify_ca_cert_page();
|
|
520 |
|
|
521 |
QCOMPARE(mouseClickPrevious(), true);
|
|
522 |
QTest::qWait(WaitTimeForUi);
|
|
523 |
verify_outertype(ButtonEnabled);
|
|
524 |
|
|
525 |
// Go forward to username & password page
|
|
526 |
QCOMPARE(mouseClickNext(), true);
|
|
527 |
QTest::qWait(WaitTimeForUi);
|
|
528 |
verify_ca_cert_page();
|
|
529 |
|
|
530 |
// Create new validators
|
|
531 |
mEapQtUtilsContext->createEapIdentifyValidators(EapQtPluginHandle::PluginEapTtls);
|
|
532 |
mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapGtc);
|
|
533 |
|
|
534 |
QCOMPARE(mouseClickNext(), true);
|
|
535 |
QTest::qWait(WaitTimeForUi);
|
|
536 |
verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTtls));
|
|
537 |
|
|
538 |
QCOMPARE(mouseClickNext(), true);
|
|
539 |
QTest::qWait(WaitTimeForUi);
|
|
540 |
verify_innertype(
|
|
541 |
EapQtPluginHandle::PluginEapTtls,
|
|
542 |
ButtonEnabled);
|
|
543 |
|
|
544 |
QCOMPARE(mouseClickNext(), true);
|
|
545 |
QTest::qWait(WaitTimeForUi);
|
|
546 |
verify_username_password(EapQtPluginHandle::PluginEapGtc);
|
|
547 |
#endif
|
|
548 |
}
|
|
549 |
|
|
550 |
void TestWlanWizardEap::tc_eap_aka_set_outer_type_fails()
|
|
551 |
{
|
|
552 |
#ifdef tc_eap_aka_set_outer_type_fails_enabled
|
|
553 |
const QString ssid("tc_eap_aka_set_outer_type_fails");
|
|
554 |
|
|
555 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
556 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
557 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
|
|
558 |
|
|
559 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
560 |
mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
|
|
561 |
mEapQtUtilsContext->setSelectectedOuterTypesReturn(false);
|
|
562 |
|
|
563 |
mView->mWizard->setParameters(
|
60
|
564 |
ssid,
|
|
565 |
ssid.toUtf8(),
|
53
|
566 |
CMManagerShim::Infra,
|
|
567 |
CMManagerShim::WlanSecModeWpa2,
|
|
568 |
false,
|
|
569 |
false);
|
|
570 |
|
|
571 |
mView->showWizard();
|
|
572 |
|
|
573 |
verify_outertype_select_first(ButtonDisabled);
|
|
574 |
|
|
575 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
|
|
576 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
577 |
QCOMPARE(
|
|
578 |
verifyCurrentPageWithInfo(
|
|
579 |
WlanWizardPageInternal::PageGenericError,
|
|
580 |
hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
|
|
581 |
|
|
582 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
583 |
#endif
|
|
584 |
}
|
|
585 |
|
|
586 |
void TestWlanWizardEap::tc_eap_aka_save_outer_configuration_fails()
|
|
587 |
{
|
|
588 |
#ifdef tc_eap_aka_save_outer_configuration_fails_enabled
|
|
589 |
const QString ssid("tc_eap_aka_save_outer_configuration_fails");
|
|
590 |
|
|
591 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
592 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
593 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
|
|
594 |
|
|
595 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
596 |
mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
|
|
597 |
mEapQtUtilsContext->setOuterConfigReturn(false);
|
|
598 |
|
|
599 |
mView->mWizard->setParameters(
|
60
|
600 |
ssid,
|
|
601 |
ssid.toUtf8(),
|
53
|
602 |
CMManagerShim::Infra,
|
|
603 |
CMManagerShim::WlanSecModeWpa2,
|
|
604 |
false,
|
|
605 |
false);
|
|
606 |
|
|
607 |
mView->showWizard();
|
|
608 |
|
|
609 |
verify_outertype_select_first(ButtonDisabled);
|
|
610 |
|
|
611 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
|
|
612 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
613 |
QCOMPARE(
|
|
614 |
verifyCurrentPageWithInfo(
|
|
615 |
WlanWizardPageInternal::PageGenericError,
|
|
616 |
hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
|
|
617 |
|
|
618 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
619 |
#endif
|
|
620 |
}
|
|
621 |
|
|
622 |
void TestWlanWizardEap::tc_eap_aka_set_configuration_reference_fails()
|
|
623 |
{
|
|
624 |
#ifdef tc_eap_aka_set_configuration_reference_fails_enabled
|
|
625 |
const QString ssid("tc_eap_aka_set_configuration_reference_fails");
|
|
626 |
|
|
627 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
628 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
629 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, KErrCancel);
|
|
630 |
|
|
631 |
mEapQtUtilsContext->setConfigurationReference(3, false);
|
|
632 |
mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
|
|
633 |
|
|
634 |
mView->mWizard->setParameters(
|
60
|
635 |
ssid,
|
|
636 |
ssid.toUtf8(),
|
53
|
637 |
CMManagerShim::Infra,
|
|
638 |
CMManagerShim::WlanSecModeWpa2,
|
|
639 |
false,
|
|
640 |
false);
|
|
641 |
|
|
642 |
mView->showWizard();
|
|
643 |
|
|
644 |
verify_outertype_select_first(ButtonDisabled);
|
|
645 |
|
|
646 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
|
|
647 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
648 |
QCOMPARE(
|
|
649 |
verifyCurrentPageWithInfo(
|
|
650 |
WlanWizardPageInternal::PageGenericError,
|
|
651 |
hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
|
|
652 |
|
|
653 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
654 |
#endif
|
|
655 |
}
|
|
656 |
|
|
657 |
void TestWlanWizardEap::tc_eap_peap_gtc_save_inner_configuration_fails()
|
|
658 |
{
|
|
659 |
#ifdef tc_eap_peap_gtc_save_inner_configuration_fails_enabled
|
|
660 |
tc_eap_peap_ttls(
|
|
661 |
EapQtPluginHandle::PluginEapTtls,
|
|
662 |
EapQtPluginHandle::PluginEapGtc,
|
|
663 |
KErrGeneral, // Not used directly in sub test case
|
|
664 |
hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret"),
|
|
665 |
false );
|
|
666 |
#endif
|
|
667 |
}
|
|
668 |
|
|
669 |
|
|
670 |
void TestWlanWizardEap::tc_eap_peap_identity_validators()
|
|
671 |
{
|
|
672 |
#ifdef tc_eap_peap_identity_validators_enabled
|
|
673 |
const QString ssid("tc_eap_peap_identity_validators");
|
|
674 |
const QString username("u");
|
|
675 |
const QString password("p");
|
|
676 |
const QString usernameIdentity("identity");
|
|
677 |
const QString realm("realm.com");
|
|
678 |
EapQtPluginHandle::Plugin outerType(EapQtPluginHandle::PluginPeap);
|
|
679 |
EapQtPluginHandle::Plugin innerType(EapQtPluginHandle::PluginEapGtc);
|
|
680 |
|
|
681 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
682 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
683 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
684 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
685 |
|
|
686 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
687 |
mEapQtUtilsContext->createEapTtlsPeap(
|
|
688 |
outerType,
|
|
689 |
true,
|
|
690 |
true,
|
|
691 |
usernameIdentity,
|
|
692 |
true,
|
|
693 |
realm,
|
|
694 |
innerType );
|
|
695 |
|
|
696 |
EapQtValidatorStub* validatorUser = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
|
|
697 |
EapQtExpandedEapType::TypePeap, EapQtConfig::Username);
|
|
698 |
EapQtValidatorStub* validatorRealm = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
|
|
699 |
EapQtExpandedEapType::TypePeap,EapQtConfig::Realm);
|
|
700 |
|
|
701 |
mView->mWizard->setParameters(
|
60
|
702 |
ssid,
|
|
703 |
ssid.toUtf8(),
|
53
|
704 |
CMManagerShim::Infra,
|
|
705 |
CMManagerShim::WlanSecModeWpa,
|
|
706 |
false,
|
|
707 |
false);
|
|
708 |
|
|
709 |
mView->showWizard();
|
|
710 |
|
|
711 |
verify_outertype_select_first(ButtonDisabled);
|
|
712 |
verify_ca_cert_page_select_and_click_next(true);
|
|
713 |
|
|
714 |
QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, eapTypeToString(outerType)), true );
|
|
715 |
// Check box checked next enabled
|
|
716 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
717 |
QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
|
|
718 |
QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
|
|
719 |
|
|
720 |
// 1. Username validator returns false, checkbox not checked
|
|
721 |
validatorUser->setReturnValue(EapQtValidator::StatusInvalid);
|
|
722 |
validatorRealm->setReturnValue(EapQtValidator::StatusOk);
|
|
723 |
|
|
724 |
QCOMPARE(selectCheckBoxState("setlabel_53_val", false), true);
|
|
725 |
QTest::qWait(WaitTimeForUi);
|
|
726 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
727 |
|
|
728 |
// 2. Username validator returns true, checkbox not checked
|
|
729 |
validatorUser->setReturnValue(EapQtValidator::StatusOk);
|
|
730 |
validatorRealm->setReturnValue(EapQtValidator::StatusOk);
|
|
731 |
QCOMPARE( mouseClickObject("lineEditUsername"), true );
|
|
732 |
QTest::qWait(WaitTimeForUi);
|
|
733 |
QCOMPARE( insertTextToObject("lineEditUsername", username), true );
|
|
734 |
QTest::qWait(WaitTimeForUi);
|
|
735 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
736 |
|
|
737 |
// 3. back to valid state, checkboc checked
|
|
738 |
QCOMPARE(selectCheckBoxState("setlabel_53_val", true), true);
|
|
739 |
QTest::qWait(WaitTimeForUi);
|
|
740 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
741 |
|
|
742 |
// 4. Realm validator returns false, checkbox not checked
|
|
743 |
validatorUser->setReturnValue(EapQtValidator::StatusOk);
|
|
744 |
validatorRealm->setReturnValue(EapQtValidator::StatusInvalid);
|
|
745 |
|
|
746 |
QCOMPARE(selectCheckBoxState("setlabel_54_val", false), true);
|
|
747 |
QTest::qWait(WaitTimeForUi);
|
|
748 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
749 |
|
|
750 |
// 5. Realm validator returns true, checkbox not checked
|
|
751 |
validatorUser->setReturnValue(EapQtValidator::StatusOk);
|
|
752 |
validatorRealm->setReturnValue(EapQtValidator::StatusOk);
|
|
753 |
QCOMPARE( mouseClickObject("lineEditRealm"), true );
|
|
754 |
QTest::qWait(WaitTimeForUi);
|
|
755 |
QCOMPARE( insertTextToObject("lineEditRealm", username), true );
|
|
756 |
QTest::qWait(WaitTimeForUi);
|
|
757 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
758 |
|
|
759 |
// 6. back to valid state, checkboc checked
|
|
760 |
QCOMPARE(selectCheckBoxState("setlabel_54_val", true), true);
|
|
761 |
QTest::qWait(WaitTimeForUi);
|
|
762 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
763 |
#endif
|
|
764 |
}
|
|
765 |
|
|
766 |
void TestWlanWizardEap::tc_eap_leap_user_password_validators()
|
|
767 |
{
|
|
768 |
#ifdef tc_eap_leap_user_password_validators_enabled
|
|
769 |
const QString ssid("tc_eap_leap_user_password_validators");
|
|
770 |
const QString username("u");
|
|
771 |
const QString password("p");
|
|
772 |
|
|
773 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
774 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
775 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
776 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
777 |
|
|
778 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
779 |
mEapQtUtilsContext->createLeap(username,password);
|
|
780 |
|
|
781 |
EapQtValidatorStub* validatorUser = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
|
|
782 |
EapQtExpandedEapType::TypeLeap, EapQtConfig::Username);
|
|
783 |
EapQtValidatorStub* validatorPassword = (EapQtValidatorStub*)mEapQtUtilsContext->validator(
|
|
784 |
EapQtExpandedEapType::TypeLeap, EapQtConfig::Password);
|
|
785 |
validatorUser->setReturnValue(EapQtValidator::StatusInvalid);
|
|
786 |
validatorPassword->setReturnValue(EapQtValidator::StatusInvalid);
|
|
787 |
|
|
788 |
mView->mWizard->setParameters(
|
60
|
789 |
ssid,
|
|
790 |
ssid.toUtf8(),
|
53
|
791 |
CMManagerShim::Infra,
|
|
792 |
CMManagerShim::WlanSecModeWpa,
|
|
793 |
false,
|
|
794 |
false);
|
|
795 |
|
|
796 |
mView->showWizard();
|
|
797 |
|
|
798 |
verify_outertype_select_first(ButtonDisabled);
|
|
799 |
|
|
800 |
// 1. By default both validator return invalid
|
|
801 |
QCOMPARE(
|
|
802 |
verifyCurrentPageWithInfo(
|
|
803 |
EapWizardPage::PageUsernamePassword,
|
|
804 |
eapTypeToString(EapQtPluginHandle::PluginLeap)), true );
|
|
805 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
806 |
|
|
807 |
// 2. User return ok, password invalid
|
|
808 |
validatorUser->setReturnValue(EapQtValidator::StatusOk);
|
|
809 |
QCOMPARE( mouseClickObject("lineEditUsername"), true );
|
|
810 |
QTest::qWait(WaitTimeForUi);
|
|
811 |
QCOMPARE( insertTextToObject("lineEditUsername", username), true );
|
|
812 |
QTest::qWait(WaitTimeForUi);
|
|
813 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
814 |
|
|
815 |
// 3. User return ok, password ok
|
|
816 |
validatorPassword->setReturnValue(EapQtValidator::StatusOk);
|
|
817 |
QCOMPARE( mouseClickObject("lineEditPassword"), true );
|
|
818 |
QTest::qWait(WaitTimeForUi);
|
|
819 |
QCOMPARE( insertTextToObject("lineEditPassword", password), true );
|
|
820 |
QTest::qWait(WaitTimeForUi);
|
|
821 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
822 |
#endif
|
|
823 |
}
|
|
824 |
|
|
825 |
void TestWlanWizardEap::tc_eap_tls_no_user_certificate()
|
|
826 |
{
|
|
827 |
#ifdef tc_eap_tls_no_user_certificate_enabled
|
|
828 |
|
|
829 |
const QString ssid("tc_eap_tls_no_user_certificate");
|
|
830 |
|
|
831 |
QList<EapQtCertificateInfo> caCerts;
|
|
832 |
QList<EapQtCertificateInfo> userCerts;
|
|
833 |
|
|
834 |
EapQtCertificateInfo caCert;
|
|
835 |
caCert.setValue(EapQtCertificateInfo::CertificateLabel, "My Super Cert 1");
|
|
836 |
caCerts.append(caCert);
|
|
837 |
|
|
838 |
mEapQtUtilsContext->createEapTls(
|
|
839 |
caCerts,
|
|
840 |
0,
|
|
841 |
userCerts,
|
|
842 |
-1);
|
|
843 |
|
|
844 |
mView->mWizard->setParameters(
|
60
|
845 |
ssid,
|
|
846 |
ssid.toUtf8(),
|
53
|
847 |
CMManagerShim::Infra,
|
|
848 |
CMManagerShim::WlanSecModeWpa2,
|
|
849 |
false,
|
|
850 |
false);
|
|
851 |
|
|
852 |
mView->showWizard();
|
|
853 |
|
|
854 |
verify_outertype_select_first(ButtonDisabled);
|
|
855 |
verify_ca_cert_page_select_and_click_next(false);
|
|
856 |
verify_user_cert_page_select_and_click_next(ButtonDisabled, -1);
|
|
857 |
|
|
858 |
#endif
|
|
859 |
}
|
|
860 |
|
|
861 |
void TestWlanWizardEap::tc_eap_tls_one_user_certificate_with_ca_selection()
|
|
862 |
{
|
|
863 |
#ifdef tc_eap_tls_one_user_certificate_with_ca_selection_enabled
|
|
864 |
const QString ssid("tc_eap_tls_one_user_certificate_with_ca_selection");
|
|
865 |
|
|
866 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
867 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
868 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
869 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
870 |
|
|
871 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
872 |
|
|
873 |
QList<EapQtCertificateInfo> caCerts;
|
|
874 |
QList<EapQtCertificateInfo> userCerts;
|
|
875 |
|
|
876 |
EapQtCertificateInfo cert;
|
|
877 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My CA Cert");
|
|
878 |
caCerts.append(cert);
|
|
879 |
|
|
880 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert");
|
|
881 |
userCerts.append(cert);
|
|
882 |
|
|
883 |
mEapQtUtilsContext->createEapTls(
|
|
884 |
caCerts,
|
|
885 |
0,
|
|
886 |
userCerts,
|
|
887 |
0);
|
|
888 |
|
|
889 |
mView->mWizard->setParameters(
|
60
|
890 |
ssid,
|
|
891 |
ssid.toUtf8(),
|
53
|
892 |
CMManagerShim::Infra,
|
|
893 |
CMManagerShim::WlanSecModeWpa2,
|
|
894 |
false,
|
|
895 |
false);
|
|
896 |
|
|
897 |
mView->showWizard();
|
|
898 |
|
|
899 |
verify_outertype_select_first(ButtonDisabled);
|
|
900 |
verify_ca_cert_page_select_and_click_next(false);
|
|
901 |
verify_user_cert_page_select_and_click_next(ButtonEnabled, 0);
|
|
902 |
verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));
|
|
903 |
|
|
904 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
905 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
906 |
|
|
907 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
908 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
909 |
|
|
910 |
QCOMPARE( verifySummaryPage(
|
|
911 |
ssid,
|
|
912 |
CMManagerShim::Infra,
|
|
913 |
false,
|
|
914 |
CMManagerShim::WlanSecModeWpa2,
|
|
915 |
false,
|
|
916 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
917 |
EapQtPluginHandle::PluginEapTls),true);
|
|
918 |
|
|
919 |
#endif
|
|
920 |
}
|
|
921 |
|
|
922 |
void TestWlanWizardEap::tc_eap_tls_two_user_certificates()
|
|
923 |
{
|
|
924 |
#ifdef tc_eap_tls_two_user_certificates_enabled
|
|
925 |
const QString ssid("tc_eap_tls_two_user_certificates");
|
|
926 |
|
|
927 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
928 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
929 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
930 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
931 |
|
|
932 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
933 |
|
|
934 |
QList<EapQtCertificateInfo> caCerts;
|
|
935 |
QList<EapQtCertificateInfo> userCerts;
|
|
936 |
|
|
937 |
EapQtCertificateInfo cert;
|
|
938 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My CA Cert");
|
|
939 |
caCerts.append(cert);
|
|
940 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My Super CA Cert");
|
|
941 |
caCerts.append(cert);
|
|
942 |
|
|
943 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert");
|
|
944 |
userCerts.append(cert);
|
|
945 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, "My User Cert Second");
|
|
946 |
userCerts.append(cert);
|
|
947 |
|
|
948 |
mEapQtUtilsContext->createEapTls(
|
|
949 |
caCerts,
|
|
950 |
0,
|
|
951 |
userCerts,
|
|
952 |
1);
|
|
953 |
|
|
954 |
mView->mWizard->setParameters(
|
60
|
955 |
ssid,
|
|
956 |
ssid.toUtf8(),
|
53
|
957 |
CMManagerShim::Infra,
|
|
958 |
CMManagerShim::WlanSecModeWpa2,
|
|
959 |
false,
|
|
960 |
false);
|
|
961 |
|
|
962 |
mView->showWizard();
|
|
963 |
|
|
964 |
verify_outertype_select_first(ButtonDisabled);
|
|
965 |
verify_ca_cert_page_select_and_click_next(false);
|
|
966 |
verify_user_cert_page_select_and_click_next(ButtonDisabled, 1);
|
|
967 |
verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));
|
|
968 |
|
|
969 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
970 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
971 |
|
|
972 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
973 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
974 |
|
|
975 |
QCOMPARE( verifySummaryPage(
|
|
976 |
ssid,
|
|
977 |
CMManagerShim::Infra,
|
|
978 |
false,
|
|
979 |
CMManagerShim::WlanSecModeWpa2,
|
|
980 |
false,
|
|
981 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
982 |
EapQtPluginHandle::PluginEapTls),true);
|
|
983 |
|
|
984 |
#endif
|
|
985 |
}
|
|
986 |
|
|
987 |
void TestWlanWizardEap::tc_eap_tls_back_and_forward_certs_with_cert_update()
|
|
988 |
{
|
|
989 |
#ifdef tc_eap_tls_back_and_forward_certs_with_cert_update_enabled
|
|
990 |
const QString ssid("tc_eap_tls_two_user_certificates");
|
|
991 |
|
|
992 |
const QString caCert1("My CA Cert");
|
|
993 |
const QString caCert2("My CA Cert Second");
|
|
994 |
|
|
995 |
const QString userCert1("My User Cert");
|
|
996 |
const QString userCert2("My User Cert Second");
|
|
997 |
|
|
998 |
QList<EapQtCertificateInfo> caCerts;
|
|
999 |
QList<EapQtCertificateInfo> userCerts;
|
|
1000 |
|
|
1001 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
1002 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1003 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
1004 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
1005 |
|
|
1006 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
1007 |
|
|
1008 |
EapQtCertificateInfo cert;
|
|
1009 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, caCert1);
|
|
1010 |
caCerts.append(cert);
|
|
1011 |
|
|
1012 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, userCert1);
|
|
1013 |
userCerts.append(cert);
|
|
1014 |
|
|
1015 |
mEapQtUtilsContext->createEapTls(
|
|
1016 |
caCerts,
|
|
1017 |
0,
|
|
1018 |
userCerts,
|
|
1019 |
0);
|
|
1020 |
|
|
1021 |
mView->mWizard->setParameters(
|
60
|
1022 |
ssid,
|
|
1023 |
ssid.toUtf8(),
|
53
|
1024 |
CMManagerShim::Infra,
|
|
1025 |
CMManagerShim::WlanSecModeWpa2,
|
|
1026 |
false,
|
|
1027 |
false);
|
|
1028 |
|
|
1029 |
mView->showWizard();
|
|
1030 |
verify_outertype_select_first(ButtonDisabled);
|
|
1031 |
verify_ca_cert_page_select_and_click_next(true);
|
|
1032 |
verify_user_cert_page_select_and_click_next(ButtonEnabled, 0);
|
|
1033 |
verify_identity_page(eapTypeToString(EapQtPluginHandle::PluginEapTls));
|
|
1034 |
|
|
1035 |
// backwards
|
|
1036 |
QCOMPARE(mouseClickPrevious(), true);
|
|
1037 |
QTest::qWait(WaitTimeForUi);
|
|
1038 |
verify_user_cert_page(ButtonEnabled, userCert1, 0 );
|
|
1039 |
|
|
1040 |
QCOMPARE(mouseClickPrevious(), true);
|
|
1041 |
QTest::qWait(WaitTimeForUi);
|
|
1042 |
verify_ca_cert_page();
|
|
1043 |
|
|
1044 |
QCOMPARE(mouseClickPrevious(), true);
|
|
1045 |
QTest::qWait(WaitTimeForUi);
|
|
1046 |
verify_outertype(ButtonEnabled);
|
|
1047 |
|
|
1048 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, caCert2);
|
|
1049 |
caCerts.append(cert);
|
|
1050 |
mEapQtUtilsContext->setCertsCa(caCerts);
|
|
1051 |
|
|
1052 |
cert.setValue(EapQtCertificateInfo::CertificateLabel, userCert2);
|
|
1053 |
userCerts.append(cert);
|
|
1054 |
mEapQtUtilsContext->setCertsUser(userCerts);
|
|
1055 |
|
|
1056 |
mEapQtUtilsContext->createEapIdentifyValidators(EapQtPluginHandle::PluginEapTls);
|
|
1057 |
|
|
1058 |
// Forward
|
|
1059 |
QCOMPARE(mouseClickNext(), true);
|
|
1060 |
verify_ca_cert_page_select_and_click_next(false);
|
|
1061 |
verify_user_cert_page(ButtonDisabled);
|
|
1062 |
|
|
1063 |
// backwards
|
|
1064 |
QCOMPARE(mouseClickPrevious(), true);
|
|
1065 |
QTest::qWait(WaitTimeForUi);
|
|
1066 |
verify_ca_cert_page(caCert1, 1);
|
|
1067 |
|
|
1068 |
QCOMPARE(mouseClickPrevious(), true);
|
|
1069 |
QTest::qWait(WaitTimeForUi);
|
|
1070 |
verify_outertype(ButtonEnabled);
|
|
1071 |
|
|
1072 |
QCOMPARE(mouseClickNext(), true);
|
|
1073 |
verify_ca_cert_page(caCert1, 1);
|
|
1074 |
|
|
1075 |
QCOMPARE(mouseClickNext(), true);
|
|
1076 |
verify_user_cert_page_select_and_click_next(ButtonDisabled, 0);
|
|
1077 |
|
|
1078 |
verify_identity_and_click_next(eapTypeToString(EapQtPluginHandle::PluginEapTls));
|
|
1079 |
|
|
1080 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
1081 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1082 |
|
|
1083 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
1084 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
1085 |
|
|
1086 |
QCOMPARE( verifySummaryPage(
|
|
1087 |
ssid,
|
|
1088 |
CMManagerShim::Infra,
|
|
1089 |
false,
|
|
1090 |
CMManagerShim::WlanSecModeWpa2,
|
|
1091 |
false,
|
|
1092 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
1093 |
EapQtPluginHandle::PluginEapTls),true);
|
|
1094 |
|
|
1095 |
#endif
|
|
1096 |
}
|
|
1097 |
|
|
1098 |
void TestWlanWizardEap::tc_eap_sim_finish()
|
|
1099 |
{
|
|
1100 |
#ifdef tc_eap_sim_finish_enabled
|
|
1101 |
tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
|
|
1102 |
|
|
1103 |
QCOMPARE( mouseClickFinish(), true );
|
|
1104 |
QTest::qWait(WaitTimeForUi);
|
|
1105 |
QCOMPARE( verifyStatus(WizardStatusSignalFinished, 3), true);
|
|
1106 |
#endif
|
|
1107 |
}
|
|
1108 |
|
|
1109 |
void TestWlanWizardEap::tc_eap_sim_cancel()
|
|
1110 |
{
|
|
1111 |
#ifdef tc_eap_sim_cancel_enabled
|
|
1112 |
tc_eap_aka_sim(EapQtPluginHandle::PluginEapAka);
|
|
1113 |
|
|
1114 |
QCOMPARE( mouseClickCancel(), true );
|
|
1115 |
QTest::qWait(WaitTimeForUi);
|
|
1116 |
QCOMPARE(verifyStatus(WizardStatusSignalCancelled), true);
|
|
1117 |
#endif
|
|
1118 |
}
|
|
1119 |
|
|
1120 |
void TestWlanWizardEap::tc_eap_fast_confirmed()
|
|
1121 |
{
|
|
1122 |
#ifdef tc_eap_fast_confirmed_enabled
|
|
1123 |
tc_eap_fast(
|
|
1124 |
EapQtPacStoreConfig::PacStoreStatePasswordStored,
|
|
1125 |
true);
|
|
1126 |
#endif
|
|
1127 |
}
|
|
1128 |
|
|
1129 |
void TestWlanWizardEap::tc_eap_fast_new_store()
|
|
1130 |
{
|
|
1131 |
#ifdef tc_eap_fast_new_store_enabled
|
|
1132 |
tc_eap_fast(
|
|
1133 |
EapQtPacStoreConfig::PacStoreStateStoreNotExists,
|
|
1134 |
true);
|
|
1135 |
#endif
|
|
1136 |
}
|
|
1137 |
|
|
1138 |
void TestWlanWizardEap::tc_eap_fast_new_store_save_fails()
|
|
1139 |
{
|
|
1140 |
#ifdef tc_eap_fast_new_store_save_fails_enabled
|
|
1141 |
tc_eap_fast(
|
|
1142 |
EapQtPacStoreConfig::PacStoreStateStoreNotExists,
|
|
1143 |
false);
|
|
1144 |
#endif
|
|
1145 |
}
|
|
1146 |
|
|
1147 |
void TestWlanWizardEap::tc_eap_fast_new_store_and_validators()
|
|
1148 |
{
|
|
1149 |
#ifdef tc_eap_fast_new_store_and_validators_enabled
|
|
1150 |
const QString ssid("tc_eap_fast_new_store_and_validators");
|
|
1151 |
const QString username("user");
|
|
1152 |
|
|
1153 |
mWlanQtUtilsContext->setCreateWlanIapResult(4);
|
|
1154 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1155 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
|
|
1156 |
mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
|
|
1157 |
|
|
1158 |
mEapQtUtilsContext->setConfigurationReference(4, true);
|
|
1159 |
mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStateStoreNotExists);
|
|
1160 |
mEapQtUtilsContext->createInner(
|
|
1161 |
EapQtPluginHandle::PluginEapFast,
|
|
1162 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1163 |
"u",
|
|
1164 |
"p");
|
|
1165 |
|
|
1166 |
mView->mWizard->setParameters(
|
60
|
1167 |
ssid,
|
|
1168 |
ssid.toUtf8(),
|
53
|
1169 |
CMManagerShim::Infra,
|
|
1170 |
CMManagerShim::WlanSecModeWpa,
|
|
1171 |
false,
|
|
1172 |
false);
|
|
1173 |
|
|
1174 |
mView->showWizard();
|
|
1175 |
EapQtValidatorStub *validator = (EapQtValidatorStub*)mEapQtUtilsContext->validatorPacStore(
|
|
1176 |
EapQtPacStoreConfig::PacStorePassword);
|
|
1177 |
validator->setReturnValue(EapQtValidator::StatusInvalid);
|
|
1178 |
|
|
1179 |
verify_outertype_select_first(ButtonDisabled);
|
|
1180 |
verify_new_pac_store_password_page(ButtonDisabled);
|
|
1181 |
|
|
1182 |
QCOMPARE( mouseClickObject("lineEditUsername"), true );
|
|
1183 |
QTest::qWait(WaitTimeForUi);
|
|
1184 |
QCOMPARE( insertTextToObject("lineEditUsername", username), true );
|
|
1185 |
QTest::qWait(WaitTimeForUi);
|
|
1186 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1187 |
|
|
1188 |
validator->setReturnValue(EapQtValidator::StatusOk);
|
|
1189 |
|
|
1190 |
QCOMPARE( mouseClickObject("lineEditPassword"), true );
|
|
1191 |
QTest::qWait(WaitTimeForUi);
|
|
1192 |
QCOMPARE( insertTextToObject("lineEditPassword", username), true );
|
|
1193 |
QTest::qWait(WaitTimeForUi);
|
|
1194 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1195 |
|
|
1196 |
QCOMPARE( mouseClickNext(), true );
|
|
1197 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1198 |
|
|
1199 |
#endif
|
|
1200 |
}
|
|
1201 |
|
|
1202 |
|
|
1203 |
void TestWlanWizardEap::tc_eap_fast_new_store_back_and_forwards()
|
|
1204 |
{
|
|
1205 |
#ifdef tc_eap_fast_new_store_back_and_forwards_enabled
|
|
1206 |
const QString ssid("tc_eap_fast_new_store_back_and_forwards");
|
|
1207 |
const QString username("u");
|
|
1208 |
const QString password("p");
|
|
1209 |
|
|
1210 |
mWlanQtUtilsContext->setCreateWlanIapResult(4);
|
|
1211 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1212 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
|
|
1213 |
mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
|
|
1214 |
|
|
1215 |
mEapQtUtilsContext->setConfigurationReference(4, true);
|
|
1216 |
mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStateStoreNotExists);
|
|
1217 |
mEapQtUtilsContext->createInner(
|
|
1218 |
EapQtPluginHandle::PluginEapFast,
|
|
1219 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1220 |
username,
|
|
1221 |
password);
|
|
1222 |
|
|
1223 |
mView->mWizard->setParameters(
|
60
|
1224 |
ssid,
|
|
1225 |
ssid.toUtf8(),
|
53
|
1226 |
CMManagerShim::Infra,
|
|
1227 |
CMManagerShim::WlanSecModeWpa,
|
|
1228 |
false,
|
|
1229 |
false);
|
|
1230 |
|
|
1231 |
mView->showWizard();
|
|
1232 |
|
|
1233 |
verify_outertype_select_first(ButtonDisabled);
|
|
1234 |
verify_new_pac_store_password_page(ButtonEnabled);
|
|
1235 |
QCOMPARE( mouseClickNext(), true );
|
|
1236 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1237 |
|
|
1238 |
// backwards
|
|
1239 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1240 |
verify_new_pac_store_password_page(ButtonEnabled);
|
|
1241 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1242 |
|
|
1243 |
mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapMschapv2);
|
|
1244 |
|
|
1245 |
// forwards
|
|
1246 |
verify_outertype_select_first(ButtonEnabled);
|
|
1247 |
verify_new_pac_store_password_page(ButtonEnabled);
|
|
1248 |
QCOMPARE( mouseClickNext(), true );
|
|
1249 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1250 |
#endif
|
|
1251 |
}
|
|
1252 |
|
|
1253 |
void TestWlanWizardEap::tc_eap_fast_new_store_read_config_fail()
|
|
1254 |
{
|
|
1255 |
#ifdef tc_eap_fast_new_store_read_config_fail_enabled
|
|
1256 |
tc_eap_fast(
|
|
1257 |
EapQtPacStoreConfig::PacStoreStateStoreNotExists,
|
|
1258 |
true,
|
|
1259 |
false);
|
|
1260 |
#endif
|
|
1261 |
}
|
|
1262 |
|
|
1263 |
void TestWlanWizardEap::tc_eap_fast_confirm_store()
|
|
1264 |
{
|
|
1265 |
#ifdef tc_eap_fast_confirm_store_enabled
|
|
1266 |
tc_eap_fast(
|
|
1267 |
EapQtPacStoreConfig::PacStoreStatePasswordRequired,
|
|
1268 |
true);
|
|
1269 |
#endif
|
|
1270 |
}
|
|
1271 |
|
|
1272 |
void TestWlanWizardEap::tc_eap_fast_confirm_store_and_validators()
|
|
1273 |
{
|
|
1274 |
#ifdef tc_eap_fast_confirm_store_and_validators_enabled
|
|
1275 |
const QString ssid("tc_eap_fast_confirm_store_and_validators");
|
|
1276 |
const QString username_invalid("invalid");
|
|
1277 |
const QString username_valid("valid");
|
|
1278 |
|
|
1279 |
mWlanQtUtilsContext->setCreateWlanIapResult(4);
|
|
1280 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1281 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
|
|
1282 |
mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
|
|
1283 |
|
|
1284 |
mEapQtUtilsContext->setConfigurationReference(4, true);
|
|
1285 |
mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStatePasswordRequired);
|
|
1286 |
mEapQtUtilsContext->createInner(
|
|
1287 |
EapQtPluginHandle::PluginEapFast,
|
|
1288 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1289 |
"u",
|
|
1290 |
"p");
|
|
1291 |
|
|
1292 |
mView->mWizard->setParameters(
|
60
|
1293 |
ssid,
|
|
1294 |
ssid.toUtf8(),
|
53
|
1295 |
CMManagerShim::Infra,
|
|
1296 |
CMManagerShim::WlanSecModeWpa,
|
|
1297 |
false,
|
|
1298 |
false);
|
|
1299 |
|
|
1300 |
mView->showWizard();
|
|
1301 |
EapQtValidatorStub *validator = (EapQtValidatorStub*)mEapQtUtilsContext->validatorPacStore(
|
|
1302 |
EapQtPacStoreConfig::PacStorePasswordConfirmation);
|
|
1303 |
validator->setReturnValue(EapQtValidator::StatusInvalid);
|
|
1304 |
|
|
1305 |
verify_outertype_select_first(ButtonDisabled);
|
|
1306 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1307 |
|
|
1308 |
QCOMPARE( mouseClickObject("lineEditPasswordConfirm"), true );
|
|
1309 |
QTest::qWait(WaitTimeForUi);
|
|
1310 |
QCOMPARE( insertTextToObject("lineEditPasswordConfirm", username_invalid), true );
|
|
1311 |
QCOMPARE( mouseClickObject("labelError"), true );
|
|
1312 |
QTest::qWait(WaitTimeForUi);
|
|
1313 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1314 |
|
|
1315 |
QCOMPARE( mouseClickNext(), true );
|
|
1316 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1317 |
QCOMPARE( verifyDialogText("labelError", hbTrId("txt_occ_info_incorrect_password")), true);
|
|
1318 |
|
|
1319 |
|
|
1320 |
validator->setReturnValue(EapQtValidator::StatusOk);
|
|
1321 |
|
|
1322 |
QCOMPARE( mouseClickObject("lineEditPasswordConfirm"), true );
|
|
1323 |
QTest::qWait(WaitTimeForUi);
|
|
1324 |
QCOMPARE( insertTextToObject("lineEditPasswordConfirm", username_valid), true );
|
|
1325 |
QCOMPARE( mouseClickObject("labelError"), true );
|
|
1326 |
QTest::qWait(WaitTimeForUi);
|
|
1327 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1328 |
QTest::qWait(WaitTimeForUi);
|
|
1329 |
QTest::qWait(WaitTimeForUi);
|
|
1330 |
QCOMPARE( verifyDialogText("labelError", hbTrId("txt_occ_info_incorrect_password")), false);
|
|
1331 |
|
|
1332 |
QCOMPARE( mouseClickNext(), true );
|
|
1333 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1334 |
|
|
1335 |
#endif
|
|
1336 |
}
|
|
1337 |
|
|
1338 |
void TestWlanWizardEap::tc_eap_fast_confirm_store_back_and_forwards()
|
|
1339 |
{
|
|
1340 |
#ifdef tc_eap_fast_confirm_store_back_and_forwards_enabled
|
|
1341 |
const QString ssid("tc_eap_fast_confirm_store_back_and_forwards");
|
|
1342 |
const QString username("u");
|
|
1343 |
const QString password("p");
|
|
1344 |
|
|
1345 |
mWlanQtUtilsContext->setCreateWlanIapResult(4);
|
|
1346 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1347 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
|
|
1348 |
mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
|
|
1349 |
|
|
1350 |
mEapQtUtilsContext->setConfigurationReference(4, true);
|
|
1351 |
mEapQtUtilsContext->createEapFast(EapQtPacStoreConfig::PacStoreStatePasswordRequired);
|
|
1352 |
mEapQtUtilsContext->createInner(
|
|
1353 |
EapQtPluginHandle::PluginEapFast,
|
|
1354 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1355 |
username,
|
|
1356 |
password);
|
|
1357 |
|
|
1358 |
mView->mWizard->setParameters(
|
60
|
1359 |
ssid,
|
|
1360 |
ssid.toUtf8(),
|
53
|
1361 |
CMManagerShim::Infra,
|
|
1362 |
CMManagerShim::WlanSecModeWpa,
|
|
1363 |
false,
|
|
1364 |
false);
|
|
1365 |
|
|
1366 |
mView->showWizard();
|
|
1367 |
|
|
1368 |
verify_outertype_select_first(ButtonDisabled);
|
|
1369 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1370 |
QCOMPARE( mouseClickNext(), true );
|
|
1371 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1372 |
|
|
1373 |
// backwards
|
|
1374 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1375 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1376 |
QCOMPARE( mouseClickPrevious(), true );
|
|
1377 |
|
|
1378 |
mEapQtUtilsContext->createInnerTypeValidators(EapQtPluginHandle::PluginEapMschapv2);
|
|
1379 |
|
|
1380 |
// forwards
|
|
1381 |
verify_outertype_select_first(ButtonEnabled);
|
|
1382 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1383 |
QCOMPARE( mouseClickNext(), true );
|
|
1384 |
verify_username_password(EapQtPluginHandle::PluginEapMschapv2);
|
|
1385 |
#endif
|
|
1386 |
}
|
|
1387 |
|
|
1388 |
|
|
1389 |
// ---------------------------------------------------------
|
|
1390 |
// HELPPER VERIFICATORS & NAVIGATORS
|
|
1391 |
// ---------------------------------------------------------
|
|
1392 |
|
|
1393 |
void TestWlanWizardEap::verify_outertype_select_first(
|
|
1394 |
TestWlanWizardContext::ButtonStatus nextButtonStatus)
|
|
1395 |
{
|
|
1396 |
verify_outertype(nextButtonStatus);
|
|
1397 |
|
|
1398 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1399 |
QTest::qWait(WaitTimeForUi);
|
|
1400 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1401 |
QCOMPARE( mouseClickNext(), true );
|
|
1402 |
}
|
|
1403 |
|
|
1404 |
void TestWlanWizardEap::verify_outertype(
|
|
1405 |
TestWlanWizardContext::ButtonStatus nextButtonStatus)
|
|
1406 |
{
|
|
1407 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageOuterType), true );
|
|
1408 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1409 |
}
|
|
1410 |
|
|
1411 |
void TestWlanWizardEap::verify_innertype_select_first(
|
|
1412 |
int outerType,
|
|
1413 |
TestWlanWizardContext::ButtonStatus nextButtonStatus)
|
|
1414 |
{
|
|
1415 |
verify_innertype(outerType, nextButtonStatus);
|
|
1416 |
|
|
1417 |
QCOMPARE( selectRadioButton( "list", 0 ), true );
|
|
1418 |
QTest::qWait(WaitTimeForUi);
|
|
1419 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1420 |
QCOMPARE( mouseClickNext(), true );
|
|
1421 |
}
|
|
1422 |
|
|
1423 |
void TestWlanWizardEap::verify_innertype(
|
|
1424 |
int outerType,
|
|
1425 |
TestWlanWizardContext::ButtonStatus nextButtonStatus)
|
|
1426 |
{
|
|
1427 |
int pageId;
|
|
1428 |
if (outerType == EapQtPluginHandle::PluginPeap){
|
|
1429 |
pageId = EapWizardPage::PageInnerTypePeap;
|
|
1430 |
|
|
1431 |
} else {
|
|
1432 |
Q_ASSERT(outerType == EapQtPluginHandle::PluginEapTtls);
|
|
1433 |
pageId = EapWizardPage::PageInnerTypeEapTtls;
|
|
1434 |
}
|
|
1435 |
QCOMPARE( verifyCurrentPageWithInfo(pageId, eapTypeToString(outerType)), true );
|
|
1436 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1437 |
}
|
|
1438 |
|
|
1439 |
void TestWlanWizardEap::verify_username_password_click_next(
|
|
1440 |
int type,
|
|
1441 |
const QString &username,
|
|
1442 |
const QString &password)
|
|
1443 |
{
|
|
1444 |
verify_username_password(type);
|
|
1445 |
|
|
1446 |
QCOMPARE( mouseClickObject("lineEditUsername"), true );
|
|
1447 |
QTest::qWait(WaitTimeForUi);
|
|
1448 |
QCOMPARE( insertTextToObject("lineEditUsername", username), true );
|
|
1449 |
QTest::qWait(WaitTimeForUi);
|
|
1450 |
|
|
1451 |
QCOMPARE( mouseClickObject("lineEditPassword"), true );
|
|
1452 |
QTest::qWait(WaitTimeForUi);
|
|
1453 |
QCOMPARE( insertTextToObject("lineEditPassword", password), true );
|
|
1454 |
QTest::qWait(WaitTimeForUi);
|
|
1455 |
|
|
1456 |
QCOMPARE( mouseClickObject("setlabel_56"), true );
|
|
1457 |
QCOMPARE( mouseClickNext(), true );
|
|
1458 |
}
|
|
1459 |
|
|
1460 |
void TestWlanWizardEap::verify_username_password(int type)
|
|
1461 |
{
|
|
1462 |
QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageUsernamePassword, eapTypeToString(type)), true );
|
|
1463 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1464 |
}
|
|
1465 |
|
|
1466 |
void TestWlanWizardEap::verify_ca_cert_page_select_and_click_next(bool automatic)
|
|
1467 |
{
|
|
1468 |
verify_ca_cert_page();
|
|
1469 |
|
|
1470 |
int index = 0;
|
|
1471 |
if (automatic == false) {
|
|
1472 |
index = 1;
|
|
1473 |
}
|
|
1474 |
QCOMPARE( selectRadioButton( "list", index ), true );
|
|
1475 |
QTest::qWait(WaitTimeForUi);
|
|
1476 |
|
|
1477 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1478 |
QCOMPARE( mouseClickNext(), true );
|
|
1479 |
}
|
|
1480 |
|
|
1481 |
|
|
1482 |
void TestWlanWizardEap::verify_ca_cert_page()
|
|
1483 |
{
|
|
1484 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateCa), true );
|
|
1485 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1486 |
|
|
1487 |
QCOMPARE( verifyRadioButtonState(
|
|
1488 |
"list",
|
|
1489 |
0,
|
|
1490 |
hbTrId("txt_occ_setlabel_val_select_automatically")), true);
|
|
1491 |
}
|
|
1492 |
|
|
1493 |
void TestWlanWizardEap::verify_ca_cert_page(const QString &text, int index)
|
|
1494 |
{
|
|
1495 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateCa), true );
|
|
1496 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1497 |
|
|
1498 |
QCOMPARE( verifyRadioButtonState("list", index, text), true);
|
|
1499 |
}
|
|
1500 |
|
|
1501 |
void TestWlanWizardEap::verify_user_cert_page_select_and_click_next(
|
|
1502 |
ButtonStatus nextButtonStatus,
|
|
1503 |
int index)
|
|
1504 |
{
|
|
1505 |
verify_user_cert_page(nextButtonStatus);
|
|
1506 |
|
|
1507 |
if (index != -1){
|
|
1508 |
QCOMPARE( selectRadioButton( "list", index ), true );
|
|
1509 |
QTest::qWait(WaitTimeForUi);
|
|
1510 |
|
|
1511 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1512 |
QCOMPARE( mouseClickNext(), true );
|
|
1513 |
} else {
|
|
1514 |
QCOMPARE(
|
|
1515 |
verifyDialogText(
|
|
1516 |
"errorLabel",
|
|
1517 |
hbTrId("txt_occ_dialog_no_certificates_installed_wizard_c")), true);
|
|
1518 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1519 |
}
|
|
1520 |
}
|
|
1521 |
|
|
1522 |
void TestWlanWizardEap::verify_user_cert_page(ButtonStatus nextButtonStatus)
|
|
1523 |
{
|
|
1524 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateUser), true );
|
|
1525 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1526 |
}
|
|
1527 |
|
|
1528 |
|
|
1529 |
void TestWlanWizardEap::verify_user_cert_page(
|
|
1530 |
ButtonStatus nextButtonStatus,
|
|
1531 |
const QString &text,
|
|
1532 |
int index)
|
|
1533 |
{
|
|
1534 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageCertificateUser), true );
|
|
1535 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1536 |
|
|
1537 |
QCOMPARE( verifyRadioButtonState("list", index, text), true);
|
|
1538 |
}
|
|
1539 |
|
|
1540 |
void TestWlanWizardEap::verify_identity_modify_and_click_next(
|
|
1541 |
const QString &outerType,
|
|
1542 |
bool usernameAutomatic,
|
|
1543 |
const QString &username,
|
|
1544 |
bool realmAutomatic,
|
|
1545 |
const QString &realm)
|
|
1546 |
{
|
|
1547 |
QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, outerType), true );
|
|
1548 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1549 |
QTest::qWait(WaitTimeForUi);
|
|
1550 |
|
|
1551 |
QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
|
|
1552 |
QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
|
|
1553 |
|
|
1554 |
QCOMPARE(selectCheckBoxState("setlabel_53_val", usernameAutomatic), true);
|
|
1555 |
QCOMPARE(selectCheckBoxState("setlabel_54_val", realmAutomatic), true);
|
|
1556 |
|
|
1557 |
QTest::qWait(WaitTimeForUi);
|
|
1558 |
|
|
1559 |
QCOMPARE(verifyCheckBoxState("setlabel_53_val", usernameAutomatic), true);
|
|
1560 |
QCOMPARE(verifyCheckBoxState("setlabel_54_val", realmAutomatic), true);
|
|
1561 |
|
|
1562 |
QCOMPARE( mouseClickObject("lineEditUsername"), true );
|
|
1563 |
QTest::qWait(WaitTimeForUi);
|
|
1564 |
QCOMPARE( insertTextToObject("lineEditUsername", username), true );
|
|
1565 |
QTest::qWait(WaitTimeForUi);
|
|
1566 |
|
|
1567 |
QCOMPARE( mouseClickObject("lineEditRealm"), true );
|
|
1568 |
QTest::qWait(WaitTimeForUi);
|
|
1569 |
QCOMPARE( insertTextToObject("lineEditRealm", realm), true );
|
|
1570 |
QTest::qWait(WaitTimeForUi);
|
|
1571 |
|
|
1572 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1573 |
QTest::qWait(WaitTimeForUi);
|
|
1574 |
|
|
1575 |
QCOMPARE( mouseClickObject("setlabel_53"), true );
|
|
1576 |
QCOMPARE( mouseClickNext(), true );
|
|
1577 |
}
|
|
1578 |
|
|
1579 |
void TestWlanWizardEap::verify_identity_and_click_next(const QString &outerType)
|
|
1580 |
{
|
|
1581 |
verify_identity_page(outerType);
|
|
1582 |
|
|
1583 |
QCOMPARE(verifyCheckBoxState("setlabel_53_val", true), true);
|
|
1584 |
QCOMPARE(verifyCheckBoxState("setlabel_54_val", true), true);
|
|
1585 |
|
|
1586 |
QCOMPARE( mouseClickObject("setlabel_53"), true );
|
|
1587 |
QCOMPARE( mouseClickNext(), true );
|
|
1588 |
}
|
|
1589 |
|
|
1590 |
void TestWlanWizardEap::verify_identity_page(const QString &outerType)
|
|
1591 |
{
|
|
1592 |
QCOMPARE( verifyCurrentPageWithInfo(EapWizardPage::PageIdentity, outerType), true );
|
|
1593 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonEnabled, ButtonHidden), true );
|
|
1594 |
}
|
|
1595 |
|
|
1596 |
|
|
1597 |
void TestWlanWizardEap::verify_new_pac_store_password_page(
|
|
1598 |
ButtonStatus nextButtonStatus )
|
|
1599 |
{
|
|
1600 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PageNewPacStorePassword), true );
|
|
1601 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1602 |
}
|
|
1603 |
|
|
1604 |
|
|
1605 |
void TestWlanWizardEap::verify_confirm_pac_store_password_page(
|
|
1606 |
ButtonStatus nextButtonStatus)
|
|
1607 |
{
|
|
1608 |
QCOMPARE( verifyCurrentPage(EapWizardPage::PagePromptPacStorePassword), true );
|
|
1609 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, nextButtonStatus, ButtonHidden), true );
|
|
1610 |
}
|
|
1611 |
|
|
1612 |
// ---------------------------------------------------------
|
|
1613 |
// SUBTEST CASES
|
|
1614 |
// ---------------------------------------------------------
|
|
1615 |
|
|
1616 |
|
|
1617 |
void TestWlanWizardEap::tc_eap_aka_sim(int type)
|
|
1618 |
{
|
|
1619 |
// TODO: verify IAP settings
|
|
1620 |
// TODO: verify call stack
|
|
1621 |
|
|
1622 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
1623 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1624 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
1625 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
1626 |
|
|
1627 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
1628 |
mEapQtUtilsContext->createEapAkaSim(type);
|
|
1629 |
|
|
1630 |
const QString ssid("tc_eap_aka_sim");
|
|
1631 |
|
|
1632 |
mView->mWizard->setParameters(
|
60
|
1633 |
ssid,
|
|
1634 |
ssid.toUtf8(),
|
53
|
1635 |
CMManagerShim::Infra,
|
|
1636 |
CMManagerShim::WlanSecMode802_1x,
|
|
1637 |
false,
|
|
1638 |
false);
|
|
1639 |
|
|
1640 |
mView->showWizard();
|
|
1641 |
|
|
1642 |
verify_outertype_select_first(ButtonDisabled);
|
|
1643 |
|
|
1644 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
1645 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1646 |
|
|
1647 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
1648 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
1649 |
|
|
1650 |
QCOMPARE( verifySummaryPage(
|
|
1651 |
ssid,
|
|
1652 |
CMManagerShim::Infra,
|
|
1653 |
false,
|
|
1654 |
CMManagerShim::WlanSecMode802_1x,
|
|
1655 |
true,
|
|
1656 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
1657 |
type),true);
|
|
1658 |
}
|
|
1659 |
|
|
1660 |
void TestWlanWizardEap::tc_eap_peap_ttls(
|
|
1661 |
int outerType,
|
|
1662 |
int innerType,
|
|
1663 |
int errorCode,
|
|
1664 |
const QString &errorString,
|
|
1665 |
bool saveInnerConfReturn )
|
|
1666 |
{
|
|
1667 |
// TODO: verify IAP settings
|
|
1668 |
// TODO: verify call stack
|
|
1669 |
const QString ssid("tc_eap_peap_ttls");
|
|
1670 |
const QString username("u");
|
|
1671 |
const QString password("p");
|
|
1672 |
|
|
1673 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
1674 |
|
|
1675 |
if (errorCode == KErrNone) {
|
|
1676 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1677 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(3);
|
|
1678 |
mWlanQtUtilsContext->setSignalIctResult(3, WlanQtUtils::IctPassed);
|
|
1679 |
} else {
|
|
1680 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
1681 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, errorCode);
|
|
1682 |
}
|
|
1683 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
1684 |
mEapQtUtilsContext->createEapTtlsPeap(
|
|
1685 |
(EapQtPluginHandle::Plugin)outerType,
|
|
1686 |
true,
|
|
1687 |
true,
|
|
1688 |
QString(), //usernameIdentity,
|
|
1689 |
true,
|
|
1690 |
QString(), //realm,
|
|
1691 |
(EapQtPluginHandle::Plugin)innerType );
|
|
1692 |
|
|
1693 |
mEapQtUtilsContext->createInner(
|
|
1694 |
(EapQtPluginHandle::Plugin)outerType,
|
|
1695 |
(EapQtPluginHandle::Plugin)innerType,
|
|
1696 |
username,
|
|
1697 |
password);
|
|
1698 |
|
|
1699 |
mEapQtUtilsContext->setInnerConfigReturn(saveInnerConfReturn);
|
|
1700 |
|
|
1701 |
mView->mWizard->setParameters(
|
60
|
1702 |
ssid,
|
|
1703 |
ssid.toUtf8(),
|
53
|
1704 |
CMManagerShim::Infra,
|
|
1705 |
CMManagerShim::WlanSecModeWpa,
|
|
1706 |
false,
|
|
1707 |
false);
|
|
1708 |
|
|
1709 |
mView->showWizard();
|
|
1710 |
|
|
1711 |
verify_outertype_select_first(ButtonDisabled);
|
|
1712 |
verify_ca_cert_page_select_and_click_next(true);
|
|
1713 |
verify_identity_and_click_next(eapTypeToString((EapQtPluginHandle::Plugin)outerType));
|
|
1714 |
verify_innertype_select_first(
|
|
1715 |
(EapQtPluginHandle::Plugin)outerType,
|
|
1716 |
ButtonDisabled);
|
|
1717 |
|
|
1718 |
verify_username_password_click_next(innerType, username, password);
|
|
1719 |
|
|
1720 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
1721 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1722 |
|
|
1723 |
if (errorCode == KErrNone){
|
|
1724 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
1725 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
1726 |
|
|
1727 |
QCOMPARE( verifySummaryPage(
|
|
1728 |
ssid,
|
|
1729 |
CMManagerShim::Infra,
|
|
1730 |
false,
|
|
1731 |
CMManagerShim::WlanSecModeWpa,
|
|
1732 |
false,
|
|
1733 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
1734 |
(EapQtPluginHandle::Plugin)outerType,
|
|
1735 |
(EapQtPluginHandle::Plugin)innerType),true);
|
|
1736 |
|
|
1737 |
} else {
|
|
1738 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
|
|
1739 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1740 |
}
|
|
1741 |
}
|
|
1742 |
|
|
1743 |
void TestWlanWizardEap::tc_eap_aka_connect_error(
|
|
1744 |
int errorCode,
|
|
1745 |
const QString &errorString)
|
|
1746 |
{
|
|
1747 |
// TODO: verify IAP settings
|
|
1748 |
// TODO: verify call stack
|
|
1749 |
|
|
1750 |
const QString ssid(errorString);
|
|
1751 |
|
|
1752 |
mWlanQtUtilsContext->setCreateWlanIapResult(3);
|
|
1753 |
mWlanQtUtilsContext->setConnectionSuccessed(false);
|
|
1754 |
mWlanQtUtilsContext->setSignalWlanNetworkClosed(3, errorCode);
|
|
1755 |
|
|
1756 |
mEapQtUtilsContext->setConfigurationReference(3, true);
|
|
1757 |
mEapQtUtilsContext->createEapAkaSim(EapQtPluginHandle::PluginEapAka);
|
|
1758 |
|
|
1759 |
mView->mWizard->setParameters(
|
60
|
1760 |
ssid,
|
|
1761 |
ssid.toUtf8(),
|
53
|
1762 |
CMManagerShim::Infra,
|
|
1763 |
CMManagerShim::WlanSecModeWpa2,
|
|
1764 |
false,
|
|
1765 |
false);
|
|
1766 |
|
|
1767 |
mView->showWizard();
|
|
1768 |
|
|
1769 |
verify_outertype_select_first(ButtonDisabled);
|
|
1770 |
|
|
1771 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageProcessSettings, ssid), true );
|
|
1772 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1773 |
|
|
1774 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPageInternal::PageGenericError, errorString), true );
|
|
1775 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1776 |
}
|
|
1777 |
|
|
1778 |
|
|
1779 |
void TestWlanWizardEap::tc_eap_fast(
|
|
1780 |
int pacStoreState,
|
|
1781 |
bool savePacStoreReturn,
|
|
1782 |
bool readPacStoreReturn)
|
|
1783 |
{
|
|
1784 |
// TODO: verify IAP settings
|
|
1785 |
// TODO: verify call stack
|
|
1786 |
|
|
1787 |
const QString ssid("tc_eap_fast");
|
|
1788 |
const QString username("u");
|
|
1789 |
const QString password("p");
|
|
1790 |
|
|
1791 |
mWlanQtUtilsContext->setCreateWlanIapResult(4);
|
|
1792 |
mWlanQtUtilsContext->setConnectionSuccessed(true);
|
|
1793 |
mWlanQtUtilsContext->setSignalWlanNetworkOpened(4);
|
|
1794 |
mWlanQtUtilsContext->setSignalIctResult(4, WlanQtUtils::IctPassed);
|
|
1795 |
|
|
1796 |
mEapQtUtilsContext->setConfigurationReference(4, true);
|
|
1797 |
mEapQtUtilsContext->createEapFast(pacStoreState);
|
|
1798 |
mEapQtUtilsContext->setPacStoreConfigSaveReturn(savePacStoreReturn);
|
|
1799 |
mEapQtUtilsContext->setPacStoreConfigReadReturn(readPacStoreReturn);
|
|
1800 |
|
|
1801 |
if (!readPacStoreReturn) {
|
|
1802 |
EapQtPacStoreConfig pacStoreConfig;
|
|
1803 |
pacStoreConfig.setValue(
|
|
1804 |
EapQtPacStoreConfig::PacStoreReset,
|
|
1805 |
true);
|
|
1806 |
|
|
1807 |
mEapQtUtilsContext->setPacStoreConfigSave(pacStoreConfig, true);
|
|
1808 |
}
|
|
1809 |
|
|
1810 |
mEapQtUtilsContext->createInner(
|
|
1811 |
EapQtPluginHandle::PluginEapFast,
|
|
1812 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1813 |
username,
|
|
1814 |
password);
|
|
1815 |
|
|
1816 |
mView->mWizard->setParameters(
|
60
|
1817 |
ssid,
|
|
1818 |
ssid.toUtf8(),
|
53
|
1819 |
CMManagerShim::Infra,
|
|
1820 |
CMManagerShim::WlanSecModeWpa,
|
|
1821 |
false,
|
|
1822 |
false);
|
|
1823 |
|
|
1824 |
mView->showWizard();
|
|
1825 |
|
|
1826 |
verify_outertype_select_first(ButtonDisabled);
|
|
1827 |
|
|
1828 |
if (!readPacStoreReturn) {
|
|
1829 |
EapQtPacStoreConfig pacStoreConfig;
|
|
1830 |
|
|
1831 |
pacStoreConfig.setValue(
|
|
1832 |
EapQtPacStoreConfig::PacStorePassword,
|
|
1833 |
"");
|
|
1834 |
|
|
1835 |
pacStoreConfig.setValue(
|
|
1836 |
EapQtPacStoreConfig::PacStoreSavePassword,
|
|
1837 |
true);
|
|
1838 |
|
|
1839 |
|
|
1840 |
mEapQtUtilsContext->setPacStoreConfigSave(pacStoreConfig, true);
|
|
1841 |
}
|
|
1842 |
|
|
1843 |
switch (pacStoreState){
|
|
1844 |
case EapQtPacStoreConfig::PacStoreStateStoreNotExists:
|
|
1845 |
verify_new_pac_store_password_page(ButtonEnabled);
|
|
1846 |
QCOMPARE( mouseClickNext(), true );
|
|
1847 |
break;
|
|
1848 |
|
|
1849 |
case EapQtPacStoreConfig::PacStoreStatePasswordRequired:
|
|
1850 |
verify_confirm_pac_store_password_page(ButtonEnabled);
|
|
1851 |
QCOMPARE( mouseClickNext(), true );
|
|
1852 |
break;
|
|
1853 |
}
|
|
1854 |
|
|
1855 |
verify_username_password_click_next(EapQtPluginHandle::PluginEapMschapv2,username,password);
|
|
1856 |
|
|
1857 |
QCOMPARE( verifyCurrentPageWithInfo(WlanWizardPage::PageProcessSettings,ssid), true );
|
|
1858 |
QCOMPARE( verifyActionButtons(ButtonDisabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1859 |
|
|
1860 |
if (savePacStoreReturn) {
|
|
1861 |
|
|
1862 |
QCOMPARE( verifyCurrentPage(WlanWizardPageInternal::PageSummary, 10, 500), true );
|
|
1863 |
QCOMPARE( verifyActionButtons(ButtonHidden, ButtonEnabled, ButtonHidden, ButtonEnabled), true );
|
|
1864 |
|
|
1865 |
QCOMPARE( verifySummaryPage(
|
|
1866 |
ssid,
|
|
1867 |
CMManagerShim::Infra,
|
|
1868 |
false,
|
|
1869 |
CMManagerShim::WlanSecModeWpa,
|
|
1870 |
false,
|
|
1871 |
hbTrId("txt_occ_dblist_destination_val_internet"),
|
|
1872 |
EapQtPluginHandle::PluginEapFast,
|
|
1873 |
EapQtPluginHandle::PluginEapMschapv2,
|
|
1874 |
true) ,true);
|
|
1875 |
} else {
|
|
1876 |
QCOMPARE(
|
|
1877 |
verifyCurrentPageWithInfo(
|
|
1878 |
WlanWizardPageInternal::PageGenericError,
|
|
1879 |
hbTrId("txt_occ_dialog_unable_to_save_settings_please_ret")), true );
|
|
1880 |
QCOMPARE( verifyActionButtons(ButtonEnabled, ButtonEnabled, ButtonDisabled, ButtonHidden), true );
|
|
1881 |
}
|
|
1882 |
}
|