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