|
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Test step definitions for the CallWaiting functional unit. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @internalTechnology |
|
20 */ |
|
21 |
|
22 #include "cctsyintegrationtestcallwaiting.h" |
|
23 #include "cctsyinidata.h" |
|
24 #include <etelmm.h> |
|
25 |
|
26 CCTSYIntegrationTestCallWaitingBase::CCTSYIntegrationTestCallWaitingBase(CEtelSessionMgr& aEtelSessionMgr) |
|
27 : CCTSYIntegrationTestSuiteStepBase(aEtelSessionMgr), iCallControlTsyTestHelper(*this), iSupplementalTsyTestHelper(*this), iNetworkTsyTestHelper(*this) |
|
28 /** |
|
29 * Constructor |
|
30 */ |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 CCTSYIntegrationTestCallWaitingBase::~CCTSYIntegrationTestCallWaitingBase() |
|
36 /* |
|
37 * Destructor |
|
38 */ |
|
39 { |
|
40 } |
|
41 |
|
42 CCTSYIntegrationTestCallWaiting0001::CCTSYIntegrationTestCallWaiting0001(CEtelSessionMgr& aEtelSessionMgr) |
|
43 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
44 /** |
|
45 * Constructor. |
|
46 */ |
|
47 { |
|
48 SetTestStepName(CCTSYIntegrationTestCallWaiting0001::GetTestStepName()); |
|
49 } |
|
50 |
|
51 CCTSYIntegrationTestCallWaiting0001::~CCTSYIntegrationTestCallWaiting0001() |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 { |
|
56 } |
|
57 |
|
58 TVerdict CCTSYIntegrationTestCallWaiting0001::doTestStepL() |
|
59 /** |
|
60 * @SYMTestCaseID BA-CTSY-INT-CWAT-0001 |
|
61 * @SYMFssID BA/CTSY/CWAT-0001 |
|
62 * @SYMTestCaseDesc Activate and deactivate call waiting for all services. |
|
63 * @SYMTestPriority High |
|
64 * @SYMTestActions RMobilePhone::NotifyCallWaitingStatusChange |
|
65 * @SYMTestExpectedResults Pass - Call waiting is activated for all services. |
|
66 * @SYMTestType CIT |
|
67 * @SYMTestCaseDependencies live/automatic |
|
68 * |
|
69 * Reason for test: Verify call waiting status change notification completes. |
|
70 * |
|
71 * @return - TVerdict code |
|
72 */ |
|
73 { |
|
74 |
|
75 // |
|
76 // SET UP |
|
77 // |
|
78 |
|
79 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus | KCapsNotifyCWStatus |
|
80 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
81 TUint32 callServiceCaps; |
|
82 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
83 CHECK_EQUALS_L(err, KErrNone, |
|
84 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
85 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus | RMobilePhone::KCapsNotifyCWStatus; |
|
86 TUint32 unwantedCaps = 0; |
|
87 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
88 |
|
89 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
90 CHECK_EQUALS_L(ret, KErrNone, |
|
91 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
92 |
|
93 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
94 RMobilePhone::TMobileService mobileService = RMobilePhone::EAllServices; |
|
95 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
96 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
97 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
98 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
99 CHECK_EQUALS_L(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
100 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
101 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
102 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
103 |
|
104 // |
|
105 // SET UP END |
|
106 // |
|
107 |
|
108 StartTest(); |
|
109 |
|
110 // |
|
111 // TEST START |
|
112 // |
|
113 |
|
114 // post notification for setCallWaitingStatus |
|
115 TExtEtelRequestStatus notifyCallWaitingStatusChangeStatus(mobilePhone,EMobilePhoneNotifyCallWaitingStatusChange); |
|
116 CleanupStack::PushL(notifyCallWaitingStatusChangeStatus); |
|
117 RMobilePhone::TMobilePhoneCWInfoEntryV1 mobilePhoneCWInfoEntryV1; |
|
118 RMobilePhone::TMobilePhoneCWInfoEntryV1Pckg mobilePhoneCWInfoEntryV1Pckg(mobilePhoneCWInfoEntryV1); |
|
119 mobilePhone.NotifyCallWaitingStatusChange(notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1Pckg); |
|
120 |
|
121 // Activate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EAllServices and aAction=EServiceActionActivate |
|
122 mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
123 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
124 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
125 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
126 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
127 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
128 |
|
129 // Check RMobilePhone::NotifyCallWaitingStatusChange completes with iServiceGroup=EAllServices and iStatus=ECallWaitingStatusActive |
|
130 TCmpBase<RMobilePhone::TMobilePhoneCWInfoEntryV1> mobilePhoneCWInfoEntryV1CmpBase(mobilePhoneCWInfoEntryV1,mobilePhoneCWInfoEntryV1,*this); |
|
131 iSupplementalTsyTestHelper.WaitForMobilePhoneNotifyCallWaitingStatusChange(mobilePhone, |
|
132 notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1CmpBase, KErrNone); |
|
133 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iServiceGroup , mobileService, |
|
134 _L("RMobilePhone::NotifyCallWaitingStatusChange returned with an error")); |
|
135 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
136 _L("RMobilePhone::NotifyCallWaitingStatusChange returned wrong iStatus")); |
|
137 |
|
138 // Deactivate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EAllServices and aAction=EServiceActionDeactivate |
|
139 mobilePhone.NotifyCallWaitingStatusChange(notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1Pckg); |
|
140 mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
141 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
142 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
143 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
144 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
145 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
146 |
|
147 // Check RMobilePhone::NotifyCallWaitingStatusChange completes with iServiceGroup=EAllServices and iStatus=ECallWaitingStatusNotActive |
|
148 iSupplementalTsyTestHelper.WaitForMobilePhoneNotifyCallWaitingStatusChange(mobilePhone,notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1CmpBase, KErrNone); |
|
149 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iServiceGroup , mobileService, |
|
150 _L("RMobilePhone::NotifyCallWaitingStatusChange returned with an error")); |
|
151 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iStatus, RMobilePhone::ECallWaitingStatusNotActive, |
|
152 _L("RMobilePhone::NotifyCallWaitingStatusChange returned wrong iStatus")); |
|
153 |
|
154 // |
|
155 // TEST END |
|
156 // |
|
157 |
|
158 StartCleanup(); |
|
159 |
|
160 // 1 mobilePhoneSetCallWaitingStatus |
|
161 // 2 notifyCallWaitingStatusChangeStatus |
|
162 CleanupStack::PopAndDestroy(2,&mobilePhoneSetCallWaitingStatus); |
|
163 |
|
164 return TestStepResult(); |
|
165 } |
|
166 |
|
167 TPtrC CCTSYIntegrationTestCallWaiting0001::GetTestStepName() |
|
168 /** |
|
169 * @return The test step name. |
|
170 */ |
|
171 { |
|
172 return _L("CCTSYIntegrationTestCallWaiting0001"); |
|
173 } |
|
174 |
|
175 |
|
176 |
|
177 CCTSYIntegrationTestCallWaiting0002::CCTSYIntegrationTestCallWaiting0002(CEtelSessionMgr& aEtelSessionMgr) |
|
178 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
179 /** |
|
180 * Constructor. |
|
181 */ |
|
182 { |
|
183 SetTestStepName(CCTSYIntegrationTestCallWaiting0002::GetTestStepName()); |
|
184 } |
|
185 |
|
186 CCTSYIntegrationTestCallWaiting0002::~CCTSYIntegrationTestCallWaiting0002() |
|
187 /** |
|
188 * Destructor. |
|
189 */ |
|
190 { |
|
191 } |
|
192 |
|
193 TVerdict CCTSYIntegrationTestCallWaiting0002::doTestStepL() |
|
194 /** |
|
195 * @SYMTestCaseID BA-CTSY-INT-CWAT-0002 |
|
196 * @SYMFssID BA/CTSY/CWAT-0002 |
|
197 * @SYMTestCaseDesc Activate and deactivate call waiting for each provisioned basic service |
|
198 * @SYMTestPriority High |
|
199 * @SYMTestActions RMobilePhone::NotifyCallWaitingStatusChange |
|
200 * @SYMTestExpectedResults Pass - Call waiting is activated for provisioned basic services. |
|
201 * @SYMTestType CIT |
|
202 * @SYMTestCaseDependencies live/automatic |
|
203 * |
|
204 * Reason for test: Verify call waiting status change notification completes. |
|
205 * |
|
206 * @return - TVerdict code |
|
207 */ |
|
208 { |
|
209 |
|
210 // |
|
211 // SET UP |
|
212 // |
|
213 |
|
214 |
|
215 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus | KCapsNotifyCWStatus |
|
216 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
217 TUint32 callServiceCaps; |
|
218 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
219 CHECK_EQUALS_L(err, KErrNone, |
|
220 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
221 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus | RMobilePhone::KCapsNotifyCWStatus; |
|
222 TUint32 unwantedCaps = 0; |
|
223 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
224 |
|
225 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
226 CHECK_EQUALS_L(ret, KErrNone, |
|
227 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
228 |
|
229 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
230 RMobilePhone::TMobileService mobileService = RMobilePhone::EAllServices; |
|
231 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
232 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
233 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
234 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
235 CHECK_EQUALS_L(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
236 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
237 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
238 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
239 |
|
240 // |
|
241 // SET UP END |
|
242 // |
|
243 |
|
244 StartTest(); |
|
245 |
|
246 // |
|
247 // TEST START |
|
248 // |
|
249 |
|
250 // Repeat whole test with aServiceGroup= EVoiceService,ECircuitDataService, EFaxService, ETelephony |
|
251 |
|
252 TUint32 count = 4; |
|
253 RArray<RMobilePhone::TMobileService> mobileServiceList; |
|
254 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::EVoiceService), |
|
255 KErrNone,_L("RArray::Append returned with an error")); |
|
256 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::ECircuitDataService), |
|
257 KErrNone,_L("RArray::Append returned with an error")); |
|
258 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::EFaxService), |
|
259 KErrNone,_L("RArray::Append returned with an error")); |
|
260 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::ETelephony), |
|
261 KErrNone,_L("RArray::Append returned with an error")); |
|
262 |
|
263 RMobilePhone::TMobilePhoneNetworkInfoV1 info; |
|
264 RMobilePhone::TMobilePhoneNetworkInfoV1Pckg infopckg(info); |
|
265 RMobilePhone::TMobilePhoneLocationAreaV1 area; |
|
266 TOperatorName operatorName = EOperatorUnknown; |
|
267 err = iNetworkTsyTestHelper.GetCurrentNetworkL( mobilePhone, infopckg, area, operatorName ); |
|
268 ASSERT_EQUALS( err, KErrNone, _L("RMobilePhone::GetCurrentNetwork failed to get current network id (1)")); |
|
269 |
|
270 switch ( operatorName ) |
|
271 { |
|
272 case EOperatorO2: |
|
273 count = 1; //O2 supports only speech |
|
274 break; |
|
275 case EOperatorVodafone: |
|
276 case EOperatorOrange: |
|
277 case EOperatorTMobile: |
|
278 count = 4; //vodafone, orange and tmobile support speech, voice and data |
|
279 break; |
|
280 case EOperatorUnknown: |
|
281 default: |
|
282 ASSERT_EQUALS(1,0,_L("Failed to identify current network")); |
|
283 TEST_CHECK_POINT_L(_L("Failed to identify current network.")); |
|
284 break; |
|
285 } |
|
286 |
|
287 |
|
288 |
|
289 for(TInt i = 0; i < count; i++) |
|
290 { |
|
291 DEBUG_PRINTF2(_L("loop iteration for service : %d"),mobileServiceList[i]); |
|
292 // post notification for setCallWaiting status |
|
293 TExtEtelRequestStatus notifyCallWaitingStatusChangeStatus(mobilePhone,EMobilePhoneNotifyCallWaitingStatusChange); |
|
294 CleanupStack::PushL(notifyCallWaitingStatusChangeStatus); |
|
295 RMobilePhone::TMobilePhoneCWInfoEntryV1 mobilePhoneCWInfoEntryV1; |
|
296 RMobilePhone::TMobilePhoneCWInfoEntryV1Pckg mobilePhoneCWInfoEntryV1Pckg(mobilePhoneCWInfoEntryV1); |
|
297 mobilePhone.NotifyCallWaitingStatusChange(notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1Pckg); |
|
298 |
|
299 // Activate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=<current service being tested> and aAction=EServiceActionActivate |
|
300 mobileService = mobileServiceList[i]; |
|
301 mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
302 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
303 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeLong), KErrNone, |
|
304 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
305 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
306 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
307 |
|
308 // Check RMobilePhone::NotifyCallWaitingStatusChange completes with iServiceGroup=<current service being tested> and iStatus=ECallWaitingStatusActive |
|
309 TCmpBase<RMobilePhone::TMobilePhoneCWInfoEntryV1> mobilePhoneCWInfoEntryV1CmpBase(mobilePhoneCWInfoEntryV1, |
|
310 mobilePhoneCWInfoEntryV1,*this); |
|
311 iSupplementalTsyTestHelper.WaitForMobilePhoneNotifyCallWaitingStatusChange(mobilePhone, |
|
312 notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1CmpBase, KErrNone); |
|
313 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iServiceGroup , mobileService, |
|
314 _L("RMobilePhone::NotifyCallWaitingStatusChange returned with an error")) |
|
315 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
316 _L("RMobilePhone::NotifyCallWaitingStatusChange returned wrong iStatus")) |
|
317 |
|
318 // Deactivate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=<current service being tested> and aAction=EServiceActionDeactivate |
|
319 mobilePhone.NotifyCallWaitingStatusChange(notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1Pckg); |
|
320 mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
321 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
322 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
323 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
324 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
325 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
326 |
|
327 // Check RMobilePhone::NotifyCallWaitingStatusChange completes with iServiceGroup=<current service being tested> and iStatus=ECallWaitingStatusNotActive |
|
328 iSupplementalTsyTestHelper.WaitForMobilePhoneNotifyCallWaitingStatusChange(mobilePhone,notifyCallWaitingStatusChangeStatus,mobilePhoneCWInfoEntryV1CmpBase, KErrNone); |
|
329 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iServiceGroup , mobileService, |
|
330 _L("RMobilePhone::NotifyCallWaitingStatusChange returned with an error")) |
|
331 ASSERT_EQUALS(mobilePhoneCWInfoEntryV1.iStatus, RMobilePhone::ECallWaitingStatusNotActive, |
|
332 _L("RMobilePhone::NotifyCallWaitingStatusChange returned with an error")) |
|
333 |
|
334 CleanupStack::PopAndDestroy(¬ifyCallWaitingStatusChangeStatus); |
|
335 } |
|
336 |
|
337 // |
|
338 // TEST END |
|
339 // |
|
340 |
|
341 StartCleanup(); |
|
342 CleanupStack::PopAndDestroy(&mobilePhoneSetCallWaitingStatus); |
|
343 |
|
344 return TestStepResult(); |
|
345 } |
|
346 |
|
347 TPtrC CCTSYIntegrationTestCallWaiting0002::GetTestStepName() |
|
348 /** |
|
349 * @return The test step name. |
|
350 */ |
|
351 { |
|
352 return _L("CCTSYIntegrationTestCallWaiting0002"); |
|
353 } |
|
354 |
|
355 |
|
356 |
|
357 CCTSYIntegrationTestCallWaiting0003::CCTSYIntegrationTestCallWaiting0003(CEtelSessionMgr& aEtelSessionMgr) |
|
358 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
359 /** |
|
360 * Constructor. |
|
361 */ |
|
362 { |
|
363 SetTestStepName(CCTSYIntegrationTestCallWaiting0003::GetTestStepName()); |
|
364 } |
|
365 |
|
366 CCTSYIntegrationTestCallWaiting0003::~CCTSYIntegrationTestCallWaiting0003() |
|
367 /** |
|
368 * Destructor. |
|
369 */ |
|
370 { |
|
371 } |
|
372 |
|
373 TVerdict CCTSYIntegrationTestCallWaiting0003::doTestStepL() |
|
374 /** |
|
375 * @SYMTestCaseID BA-CTSY-INT-CWAT-0003 |
|
376 * @SYMFssID BA/CTSY/CWAT-0003 |
|
377 * @SYMTestCaseDesc Attempt to activate and deactivate Call Waiting when it is not provisioned on the SIM. |
|
378 * @SYMTestPriority High |
|
379 * @SYMTestActions |
|
380 * @SYMTestExpectedResults Pass - Call waiting cannot be activated. |
|
381 * @SYMTestType CIT |
|
382 * @SYMTestCaseDependencies live/manual |
|
383 * |
|
384 * Reason for test: Verify error is returned. |
|
385 * |
|
386 * @return - TVerdict code |
|
387 */ |
|
388 { |
|
389 |
|
390 // |
|
391 // SET UP |
|
392 // |
|
393 |
|
394 |
|
395 |
|
396 // |
|
397 // SET UP END |
|
398 // |
|
399 |
|
400 StartTest(); |
|
401 |
|
402 // |
|
403 // TEST START |
|
404 // |
|
405 |
|
406 |
|
407 // Activate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
408 |
|
409 // Check error is returned. |
|
410 |
|
411 // Deactivate call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionDeactivate |
|
412 |
|
413 // Check error is returned. |
|
414 |
|
415 |
|
416 // |
|
417 // TEST END |
|
418 // |
|
419 |
|
420 StartCleanup(); |
|
421 |
|
422 // Put any required test clean up here, then remove this comment |
|
423 |
|
424 return TestStepResult(); |
|
425 } |
|
426 |
|
427 TPtrC CCTSYIntegrationTestCallWaiting0003::GetTestStepName() |
|
428 /** |
|
429 * @return The test step name. |
|
430 */ |
|
431 { |
|
432 return _L("CCTSYIntegrationTestCallWaiting0003"); |
|
433 } |
|
434 |
|
435 |
|
436 |
|
437 CCTSYIntegrationTestCallWaiting0004::CCTSYIntegrationTestCallWaiting0004(CEtelSessionMgr& aEtelSessionMgr) |
|
438 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
439 /** |
|
440 * Constructor. |
|
441 */ |
|
442 { |
|
443 SetTestStepName(CCTSYIntegrationTestCallWaiting0004::GetTestStepName()); |
|
444 } |
|
445 |
|
446 CCTSYIntegrationTestCallWaiting0004::~CCTSYIntegrationTestCallWaiting0004() |
|
447 /** |
|
448 * Destructor. |
|
449 */ |
|
450 { |
|
451 } |
|
452 |
|
453 TVerdict CCTSYIntegrationTestCallWaiting0004::doTestStepL() |
|
454 /** |
|
455 * @SYMTestCaseID BA-CTSY-INT-CWAT-0004 |
|
456 * @SYMFssID BA/CTSY/CWAT-0004 |
|
457 * @SYMTestCaseDesc Attempt to register, invoke and erase call waiting. |
|
458 * @SYMTestPriority High |
|
459 * @SYMTestActions |
|
460 * @SYMTestExpectedResults Pass - KErrArgument is returned |
|
461 * @SYMTestType CIT |
|
462 * @SYMTestCaseDependencies live/automatic |
|
463 * |
|
464 * Reason for test: Verify KErrArgument is returned. |
|
465 * |
|
466 * @return - TVerdict code |
|
467 */ |
|
468 { |
|
469 |
|
470 // |
|
471 // SET UP |
|
472 // |
|
473 |
|
474 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus |
|
475 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
476 TUint32 callServiceCaps; |
|
477 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
478 CHECK_EQUALS_L(err, KErrNone, |
|
479 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
480 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus; |
|
481 TUint32 unwantedCaps = 0; |
|
482 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
483 |
|
484 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
485 CHECK_EQUALS_L(ret, KErrNone, |
|
486 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
487 |
|
488 // |
|
489 // SET UP END |
|
490 // |
|
491 |
|
492 StartTest(); |
|
493 |
|
494 // |
|
495 // TEST START |
|
496 // |
|
497 |
|
498 |
|
499 // Register call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionRegister |
|
500 RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService; |
|
501 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionRegister; |
|
502 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
503 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
504 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
505 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
506 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
507 |
|
508 // Check KErrArgument is returned. |
|
509 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrArgument, |
|
510 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
511 |
|
512 // Invoke call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionInvoke |
|
513 mobilePhoneServiceAction = RMobilePhone::EServiceActionInvoke; |
|
514 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
515 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
516 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
517 |
|
518 // Check KErrArgument is returned. |
|
519 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrArgument, |
|
520 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
521 |
|
522 // Erase call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionErase |
|
523 mobilePhoneServiceAction = RMobilePhone::EServiceActionErase; |
|
524 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
525 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
526 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
527 |
|
528 // Check KErrArgument is returned. |
|
529 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrArgument, |
|
530 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
531 |
|
532 // |
|
533 // TEST END |
|
534 // |
|
535 |
|
536 StartCleanup(); |
|
537 |
|
538 CleanupStack::PopAndDestroy(&mobilePhoneSetCallWaitingStatus); |
|
539 |
|
540 return TestStepResult(); |
|
541 } |
|
542 |
|
543 TPtrC CCTSYIntegrationTestCallWaiting0004::GetTestStepName() |
|
544 /** |
|
545 * @return The test step name. |
|
546 */ |
|
547 { |
|
548 return _L("CCTSYIntegrationTestCallWaiting0004"); |
|
549 } |
|
550 |
|
551 |
|
552 |
|
553 CCTSYIntegrationTestCallWaiting0005::CCTSYIntegrationTestCallWaiting0005(CEtelSessionMgr& aEtelSessionMgr) |
|
554 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
555 /** |
|
556 * Constructor. |
|
557 */ |
|
558 { |
|
559 SetTestStepName(CCTSYIntegrationTestCallWaiting0005::GetTestStepName()); |
|
560 } |
|
561 |
|
562 CCTSYIntegrationTestCallWaiting0005::~CCTSYIntegrationTestCallWaiting0005() |
|
563 /** |
|
564 * Destructor. |
|
565 */ |
|
566 { |
|
567 } |
|
568 |
|
569 TVerdict CCTSYIntegrationTestCallWaiting0005::doTestStepL() |
|
570 /** |
|
571 * @SYMTestCaseID BA-CTSY-INT-CWAT-0005 |
|
572 * @SYMFssID BA/CTSY/CWAT-0005 |
|
573 * @SYMTestCaseDesc Interrogate call waiting for all services. |
|
574 * @SYMTestPriority High |
|
575 * @SYMTestActions RMobilePhone::SetCallWaitingStatus |
|
576 * @SYMTestExpectedResults Pass - Call waiting status list is retrieved. |
|
577 * @SYMTestType CIT |
|
578 * @SYMTestCaseDependencies live/automatic |
|
579 * |
|
580 * Reason for test: Verify call waiting status list is correct. |
|
581 * |
|
582 * @return - TVerdict code |
|
583 */ |
|
584 { |
|
585 // |
|
586 // SET UP |
|
587 // |
|
588 |
|
589 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus | KCapsGetCWStatusNetwork |
|
590 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
591 TUint32 callServiceCaps; |
|
592 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
593 CHECK_EQUALS_L(err, KErrNone, |
|
594 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
595 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus |
|
596 | RMobilePhone::KCapsGetCWStatusNetwork; |
|
597 TUint32 unwantedCaps = 0; |
|
598 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
599 |
|
600 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
601 CHECK_EQUALS_L(ret, KErrNone, |
|
602 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
603 |
|
604 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
605 RMobilePhone::TMobileService mobileService = RMobilePhone::EAllServices; |
|
606 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
607 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
608 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
609 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
610 CHECK_EQUALS_L(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
611 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
612 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
613 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
614 |
|
615 // |
|
616 // SET UP END |
|
617 // |
|
618 |
|
619 StartTest(); |
|
620 |
|
621 // |
|
622 // TEST START |
|
623 // |
|
624 |
|
625 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EAllServices and aAction=EServiceActionActivate |
|
626 mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
627 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
628 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
629 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
630 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
631 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
632 |
|
633 // Retrieve the call waiting status list using the helper class for CRetrieveMobilePhoneCWList with aLocation=RMobilePhone::EInfoLocationCachePreferred |
|
634 CRetrieveMobilePhoneCWListExec *cwListExec; |
|
635 cwListExec = CRetrieveMobilePhoneCWListHelper::NewL(mobilePhone); |
|
636 CleanupStack::PushL(cwListExec); |
|
637 CMobilePhoneCWList* cwList; |
|
638 TInt error = 0; |
|
639 cwList = cwListExec->DoGetList(error); |
|
640 ASSERT_EQUALS(error, KErrNone, _L("CRetrieveMobilePhoneCWList::RetrieveListL returned with an error")) |
|
641 |
|
642 // Check CMobilePhoneCWList::Enumerate on the retrieved list returns number of entries > 0 |
|
643 TInt noOfEntries = cwList->Enumerate(); |
|
644 ASSERT_TRUE( noOfEntries > 0, |
|
645 _L("CRetrieveMobilePhoneCWList::Enumerate returned zero entries")) |
|
646 |
|
647 // Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iStatus=ECallWaitingStatusActive for atleast ETelephony and EFaxService |
|
648 TBool faxFlag = EFalse; |
|
649 TBool telFlag = EFalse; |
|
650 for(TInt i = 0; i < noOfEntries; ++i) |
|
651 { |
|
652 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(i); |
|
653 switch(cwInfoEntry.iServiceGroup) |
|
654 { |
|
655 case RMobilePhone::EFaxService: |
|
656 ASSERT_EQUALS(cwInfoEntry.iServiceGroup, RMobilePhone::EFaxService, |
|
657 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
|
658 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
659 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")) |
|
660 faxFlag = ETrue; |
|
661 break; |
|
662 case RMobilePhone::ETelephony: |
|
663 ASSERT_EQUALS(cwInfoEntry.iServiceGroup, RMobilePhone::ETelephony, |
|
664 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
|
665 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
666 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")) |
|
667 telFlag = ETrue; |
|
668 break; |
|
669 default: |
|
670 break; |
|
671 } |
|
672 } |
|
673 ASSERT_TRUE(telFlag && faxFlag, _L("CRetrieveMobilePhoneCWList::GetEntryL EFaxService or ETelephony are not activated")) |
|
674 |
|
675 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
676 mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
677 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
678 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
679 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
680 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
681 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
682 |
|
683 // Retrieve the call waiting status list using the helper class for CRetrieveMobilePhoneCWList with aLocation=RMobilePhone::EInfoLocationCachePreferred |
|
684 error = 0; |
|
685 cwList = cwListExec->DoGetList(error); |
|
686 ASSERT_EQUALS(error, KErrNone, _L("CRetrieveMobilePhoneCWList::RetrieveListL is not able to get the list")) |
|
687 |
|
688 // Check CMobilePhoneCWList::Enumerate returns number of entries > 0 |
|
689 noOfEntries = cwList->Enumerate(); |
|
690 ASSERT_TRUE( noOfEntries > 0, |
|
691 _L("CRetrieveMobilePhoneCWList::Enumerate returned with an error")); |
|
692 |
|
693 // Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=EAllServices and iStatus=ECallWaitingStatusNotActive |
|
694 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(0); |
|
695 ASSERT_EQUALS(cwInfoEntry1.iServiceGroup, mobileService, |
|
696 _L("CRetrieveMobilePhoneCWList::GetEntryL returned with an error")) |
|
697 ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusNotActive, |
|
698 _L("CRetrieveMobilePhoneCWList::GetEntryL returned with an error")) |
|
699 |
|
700 // |
|
701 // TEST END |
|
702 // |
|
703 |
|
704 StartCleanup(); |
|
705 |
|
706 CleanupStack::PopAndDestroy(2, &mobilePhoneSetCallWaitingStatus); |
|
707 |
|
708 return TestStepResult(); |
|
709 } |
|
710 |
|
711 TPtrC CCTSYIntegrationTestCallWaiting0005::GetTestStepName() |
|
712 /** |
|
713 * @return The test step name. |
|
714 */ |
|
715 { |
|
716 return _L("CCTSYIntegrationTestCallWaiting0005"); |
|
717 } |
|
718 |
|
719 |
|
720 |
|
721 CCTSYIntegrationTestCallWaiting0006::CCTSYIntegrationTestCallWaiting0006(CEtelSessionMgr& aEtelSessionMgr) |
|
722 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
723 /** |
|
724 * Constructor. |
|
725 */ |
|
726 { |
|
727 SetTestStepName(CCTSYIntegrationTestCallWaiting0006::GetTestStepName()); |
|
728 } |
|
729 |
|
730 CCTSYIntegrationTestCallWaiting0006::~CCTSYIntegrationTestCallWaiting0006() |
|
731 /** |
|
732 * Destructor. |
|
733 */ |
|
734 { |
|
735 } |
|
736 |
|
737 TVerdict CCTSYIntegrationTestCallWaiting0006::doTestStepL() |
|
738 /** |
|
739 * @SYMTestCaseID BA-CTSY-INT-CWAT-0006 |
|
740 * @SYMFssID BA/CTSY/CWAT-0006 |
|
741 * @SYMTestCaseDesc Interrogate call waiting for provisioned basic services. |
|
742 * @SYMTestPriority High |
|
743 * @SYMTestActions RMobilePhone::SetCallWaitingStatus |
|
744 * @SYMTestExpectedResults Pass - Call waiting status list is retrieved and is correct. |
|
745 * @SYMTestType CIT |
|
746 * @SYMTestCaseDependencies live/automatic |
|
747 * |
|
748 * Reason for test: Verify call waiting status list is correct. |
|
749 * |
|
750 * @return - TVerdict code |
|
751 */ |
|
752 { |
|
753 |
|
754 // |
|
755 // SET UP |
|
756 // |
|
757 |
|
758 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus | KCapsGetCWStatusNetwork |
|
759 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
760 TUint32 callServiceCaps; |
|
761 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
762 CHECK_EQUALS_L(err, KErrNone, |
|
763 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
764 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus | RMobilePhone::KCapsNotifyCWStatus; |
|
765 TUint32 unwantedCaps = 0; |
|
766 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
767 |
|
768 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
769 CHECK_EQUALS_L(ret, KErrNone, |
|
770 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
771 |
|
772 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
773 RMobilePhone::TMobileService mobileService = RMobilePhone::EAllServices; |
|
774 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
775 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
776 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
777 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
778 CHECK_EQUALS_L(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
779 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
780 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
781 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
782 |
|
783 // |
|
784 // SET UP END |
|
785 // |
|
786 |
|
787 StartTest(); |
|
788 |
|
789 // |
|
790 // TEST START |
|
791 // |
|
792 |
|
793 // Repeat whole test with aServiceGroup=EVoiceService, ECircuitDataService, EFaxService, active and checking for the appropriate active and not active services. |
|
794 TUint32 count = 3; |
|
795 RArray<RMobilePhone::TMobileService> mobileServiceList; |
|
796 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::EVoiceService), |
|
797 KErrNone,_L("RArray::Append returned with an error")); |
|
798 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::ECircuitDataService), |
|
799 KErrNone,_L("RArray::Append returned with an error")); |
|
800 ASSERT_EQUALS(mobileServiceList.Append(RMobilePhone::EFaxService), |
|
801 KErrNone,_L("RArray::Append returned with an error")); |
|
802 |
|
803 |
|
804 RMobilePhone::TMobilePhoneNetworkInfoV1 info; |
|
805 RMobilePhone::TMobilePhoneNetworkInfoV1Pckg infopckg(info); |
|
806 RMobilePhone::TMobilePhoneLocationAreaV1 area; |
|
807 TOperatorName operatorName = EOperatorUnknown; |
|
808 err = iNetworkTsyTestHelper.GetCurrentNetworkL( mobilePhone, infopckg, area, operatorName ); |
|
809 ASSERT_EQUALS( err, KErrNone, _L("RMobilePhone::GetCurrentNetwork failed to get current network id (1)")); |
|
810 |
|
811 switch ( operatorName ) |
|
812 { |
|
813 case EOperatorO2: |
|
814 count = 1; //O2 supports only speech |
|
815 break; |
|
816 case EOperatorVodafone: |
|
817 case EOperatorOrange: |
|
818 case EOperatorTMobile: |
|
819 count = 3; //vodafone, orange and tmobile support speech, voice and data |
|
820 break; |
|
821 case EOperatorUnknown: |
|
822 default: |
|
823 CHECK_TRUE_L( EFail, _L("Failed to identify current network")); |
|
824 break; |
|
825 } |
|
826 |
|
827 CRetrieveMobilePhoneCWListExec *cwListExec; |
|
828 cwListExec = CRetrieveMobilePhoneCWListHelper::NewL(mobilePhone); |
|
829 CleanupStack::PushL(cwListExec); |
|
830 |
|
831 for(TInt i=0; i < count; ++i) |
|
832 { |
|
833 DEBUG_PRINTF2(_L("loop iteration for service : %d"),mobileServiceList[i]); |
|
834 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
835 mobileService = mobileServiceList[i]; |
|
836 mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
837 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
838 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
839 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
840 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
841 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
842 |
|
843 // Retrieve the call waiting status list with CRetrieveMobilePhoneCWList::Start with aLocation=RMobilePhone::EInfoLocationCachePreferred |
|
844 |
|
845 // === Retrieve the call waiting status list and check that it is active === |
|
846 // === for the voice service and not active for the other basic services === |
|
847 // Use the helper class for CRetrieveMobilePhoneCWList to retrieve call waiting list |
|
848 TInt error = 0; |
|
849 CMobilePhoneCWList* cwList; |
|
850 cwList = cwListExec->DoGetList(error); |
|
851 ASSERT_EQUALS(error, KErrNone, _L("CRetrieveMobilePhoneCWList::RetrieveListL is not able to get the list")) |
|
852 |
|
853 // Check CMobilePhoneCWList::Enumerate returns number of entries >= 1 |
|
854 TInt noOfEntries = cwList->Enumerate(); |
|
855 ASSERT_TRUE( noOfEntries >= 1 , |
|
856 _L("CRetrieveMobilePhoneCWList::Enumerate returned incorrect information")) |
|
857 |
|
858 // Check CMobilePhoneCWList::GetEntryL returns status of service as active |
|
859 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0); |
|
860 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
861 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")) |
|
862 |
|
863 // === Deactivate all call waiting and repeat === |
|
864 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
865 mobileService = RMobilePhone::EAllServices; |
|
866 mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
867 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
868 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
869 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
870 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
871 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
872 } |
|
873 |
|
874 // |
|
875 // TEST END |
|
876 // |
|
877 |
|
878 StartCleanup(); |
|
879 |
|
880 CleanupStack::PopAndDestroy(2,&mobilePhoneSetCallWaitingStatus); |
|
881 |
|
882 return TestStepResult(); |
|
883 } |
|
884 |
|
885 TPtrC CCTSYIntegrationTestCallWaiting0006::GetTestStepName() |
|
886 /** |
|
887 * @return The test step name. |
|
888 */ |
|
889 { |
|
890 return _L("CCTSYIntegrationTestCallWaiting0006"); |
|
891 } |
|
892 |
|
893 |
|
894 |
|
895 CCTSYIntegrationTestCallWaiting0007::CCTSYIntegrationTestCallWaiting0007(CEtelSessionMgr& aEtelSessionMgr) |
|
896 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
897 /** |
|
898 * Constructor. |
|
899 */ |
|
900 { |
|
901 SetTestStepName(CCTSYIntegrationTestCallWaiting0007::GetTestStepName()); |
|
902 } |
|
903 |
|
904 CCTSYIntegrationTestCallWaiting0007::~CCTSYIntegrationTestCallWaiting0007() |
|
905 /** |
|
906 * Destructor. |
|
907 */ |
|
908 { |
|
909 } |
|
910 |
|
911 TVerdict CCTSYIntegrationTestCallWaiting0007::doTestStepL() |
|
912 /** |
|
913 * @SYMTestCaseID BA-CTSY-INT-CWAT-0007 |
|
914 * @SYMFssID BA/CTSY/CWAT-0007 |
|
915 * @SYMTestCaseDesc Interrogate call waiting status after activation and deactivation. |
|
916 * @SYMTestPriority High |
|
917 * @SYMTestActions RMobilePhone::SetCallWaitingStatus |
|
918 * @SYMTestExpectedResults Pass - Call waiting status is correct. |
|
919 * @SYMTestType CIT |
|
920 * @SYMTestCaseDependencies live/automatic |
|
921 * |
|
922 * Reason for test: Verify call waiting status list is correct. |
|
923 * |
|
924 * @return - TVerdict code |
|
925 */ |
|
926 { |
|
927 |
|
928 // |
|
929 // SET UP |
|
930 // |
|
931 |
|
932 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus | KCapsGetCWStatusNetwork |
|
933 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
934 TUint32 callServiceCaps; |
|
935 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
936 CHECK_EQUALS_L(err, KErrNone, |
|
937 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
938 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus | RMobilePhone::KCapsNotifyCWStatus; |
|
939 TUint32 unwantedCaps = 0; |
|
940 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
941 |
|
942 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
943 CHECK_EQUALS_L(ret, KErrNone, |
|
944 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
945 |
|
946 // Deactivate all call waiting with RMobilePhone::SetCallWaitingStatus with aServiceGroup=RMobilePhone::EAllServices and aAction=RMobilePhone::EServiceActionDeactivate |
|
947 RMobilePhone::TMobileService mobileService = RMobilePhone::EAllServices; |
|
948 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionDeactivate; |
|
949 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
950 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
951 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
952 CHECK_EQUALS_L(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
953 _L("RMobilePhone::SetCallWaitingStatus timed-out")); |
|
954 CHECK_EQUALS_L(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
955 _L("RMobilePhone::SetCallWaitingStatus returned with an error")); |
|
956 |
|
957 // |
|
958 // SET UP END |
|
959 // |
|
960 |
|
961 StartTest(); |
|
962 |
|
963 // |
|
964 // TEST START |
|
965 // |
|
966 |
|
967 |
|
968 // === Activate call waiting for voice, circuit data === |
|
969 |
|
970 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
971 mobileService = RMobilePhone::EVoiceService; |
|
972 mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
973 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
974 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
975 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
976 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
977 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
978 |
|
979 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=ECircuitDataService and aAction=EServiceActionActivate |
|
980 mobileService = RMobilePhone::ECircuitDataService; |
|
981 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
982 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
983 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
984 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
985 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
986 |
|
987 // Retrieve the call waiting status list with CRetrieveMobilePhoneCWList::Start with aLocation=RMobilePhone::EInfoLocationCachePreferred |
|
988 CRetrieveMobilePhoneCWListExec *cwListExec; |
|
989 cwListExec = CRetrieveMobilePhoneCWListHelper::NewL(mobilePhone); |
|
990 CleanupStack::PushL(cwListExec); |
|
991 CMobilePhoneCWList* cwList; |
|
992 TInt error = 0; |
|
993 cwList = cwListExec->DoGetList(error); |
|
994 ASSERT_EQUALS(error, KErrNone, _L("CRetrieveMobilePhoneCWList::RetrieveListL returned with an error")) |
|
995 |
|
996 // === Retrieve the call waiting status list and check that it is active === |
|
997 |
|
998 // === for the voice service and not active for the other basic services === |
|
999 |
|
1000 // Retrieve the call waiting status list using the helper class for CRetrieveMobilePhoneCWList |
|
1001 |
|
1002 // Check CMobilePhoneCWList::Enumerate returns number of entries >= 2 |
|
1003 TInt noOfEntries = cwList->Enumerate(); |
|
1004 ASSERT_TRUE( noOfEntries >= 2, _L("CRetrieveMobilePhoneCWList::Enumerate returned incorrect information")) |
|
1005 |
|
1006 // Check CMobilePhoneCWList::GetEntryL with aIndex=0 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=EVoiceService and iStatus=ECallWaitingStatusActive |
|
1007 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry = cwList->GetEntryL(0); |
|
1008 ASSERT_TRUE((cwInfoEntry.iServiceGroup == RMobilePhone::EVoiceService |
|
1009 || cwInfoEntry.iServiceGroup == RMobilePhone::ETelephony) , |
|
1010 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
|
1011 ASSERT_EQUALS(cwInfoEntry.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
1012 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")); |
|
1013 |
|
1014 // Check CMobilePhoneCWList::GetEntryL with aIndex=1 returns a RMobilePhone::TMobilePhoneCWInfoEntryV1 with iServiceGroup=ECircuitDataService and iStatus=ECallWaitingStatusActive |
|
1015 const RMobilePhone::TMobilePhoneCWInfoEntryV1& cwInfoEntry1 = cwList->GetEntryL(1); |
|
1016 ASSERT_TRUE( ( cwInfoEntry1.iServiceGroup == RMobilePhone::ECircuitDataService |
|
1017 || cwInfoEntry1.iServiceGroup == RMobilePhone::ESyncData |
|
1018 || cwInfoEntry1.iServiceGroup == RMobilePhone::EAsyncData), |
|
1019 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iServiceGroup")) |
|
1020 ASSERT_EQUALS(cwInfoEntry1.iStatus, RMobilePhone::ECallWaitingStatusActive, |
|
1021 _L("CRetrieveMobilePhoneCWList::GetEntryL returned wrong iStatus")) |
|
1022 |
|
1023 // |
|
1024 // TEST END |
|
1025 // |
|
1026 |
|
1027 StartCleanup(); |
|
1028 |
|
1029 // 1 mobilePhoneSetCallWaitingStatus |
|
1030 // 2 cwListExec |
|
1031 CleanupStack::PopAndDestroy(2,&mobilePhoneSetCallWaitingStatus); |
|
1032 |
|
1033 return TestStepResult(); |
|
1034 } |
|
1035 |
|
1036 TPtrC CCTSYIntegrationTestCallWaiting0007::GetTestStepName() |
|
1037 /** |
|
1038 * @return The test step name. |
|
1039 */ |
|
1040 { |
|
1041 return _L("CCTSYIntegrationTestCallWaiting0007"); |
|
1042 } |
|
1043 |
|
1044 |
|
1045 |
|
1046 CCTSYIntegrationTestCallWaiting0008::CCTSYIntegrationTestCallWaiting0008(CEtelSessionMgr& aEtelSessionMgr) |
|
1047 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
1048 /** |
|
1049 * Constructor. |
|
1050 */ |
|
1051 { |
|
1052 SetTestStepName(CCTSYIntegrationTestCallWaiting0008::GetTestStepName()); |
|
1053 } |
|
1054 |
|
1055 CCTSYIntegrationTestCallWaiting0008::~CCTSYIntegrationTestCallWaiting0008() |
|
1056 /** |
|
1057 * Destructor. |
|
1058 */ |
|
1059 { |
|
1060 } |
|
1061 |
|
1062 TVerdict CCTSYIntegrationTestCallWaiting0008::doTestStepL() |
|
1063 /** |
|
1064 * @SYMTestCaseID BA-CTSY-INT-CWAT-0008 |
|
1065 * @SYMFssID BA/CTSY/CWAT-0008 |
|
1066 * @SYMTestCaseDesc Interrogation of Call Waiting status where CW is not provisioned on the SIM |
|
1067 * @SYMTestPriority High |
|
1068 * @SYMTestActions |
|
1069 * @SYMTestExpectedResults Pass - NULL status list returned. |
|
1070 * @SYMTestType CIT |
|
1071 * @SYMTestCaseDependencies live/manual |
|
1072 * |
|
1073 * Reason for test: Verify no call waiting status list is returned. |
|
1074 * |
|
1075 * @return - TVerdict code |
|
1076 */ |
|
1077 { |
|
1078 |
|
1079 // |
|
1080 // SET UP |
|
1081 // |
|
1082 |
|
1083 |
|
1084 |
|
1085 // |
|
1086 // SET UP END |
|
1087 // |
|
1088 |
|
1089 StartTest(); |
|
1090 |
|
1091 // |
|
1092 // TEST START |
|
1093 // |
|
1094 |
|
1095 |
|
1096 // Retrieve the call waiting status list with helper class for CRetrieveMobilePhoneCWList with aLocation=RMobilePhone::EInfoLocationCachePreferred |
|
1097 |
|
1098 // === Retrieve the call waiting status list and check that it is active === |
|
1099 |
|
1100 // === for the voice service and not active for the other basic services === |
|
1101 |
|
1102 // Check retrieved list is NULL |
|
1103 |
|
1104 |
|
1105 // |
|
1106 // TEST END |
|
1107 // |
|
1108 |
|
1109 StartCleanup(); |
|
1110 |
|
1111 // Put any required test clean up here, then remove this comment |
|
1112 |
|
1113 return TestStepResult(); |
|
1114 } |
|
1115 |
|
1116 TPtrC CCTSYIntegrationTestCallWaiting0008::GetTestStepName() |
|
1117 /** |
|
1118 * @return The test step name. |
|
1119 */ |
|
1120 { |
|
1121 return _L("CCTSYIntegrationTestCallWaiting0008"); |
|
1122 } |
|
1123 |
|
1124 |
|
1125 |
|
1126 CCTSYIntegrationTestCallWaiting0009::CCTSYIntegrationTestCallWaiting0009(CEtelSessionMgr& aEtelSessionMgr) |
|
1127 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
1128 /** |
|
1129 * Constructor. |
|
1130 */ |
|
1131 { |
|
1132 SetTestStepName(CCTSYIntegrationTestCallWaiting0009::GetTestStepName()); |
|
1133 } |
|
1134 |
|
1135 CCTSYIntegrationTestCallWaiting0009::~CCTSYIntegrationTestCallWaiting0009() |
|
1136 /** |
|
1137 * Destructor. |
|
1138 */ |
|
1139 { |
|
1140 } |
|
1141 |
|
1142 TVerdict CCTSYIntegrationTestCallWaiting0009::doTestStepL() |
|
1143 /** |
|
1144 * @SYMTestCaseID BA-CTSY-INT-CWAT-0009 |
|
1145 * @SYMFssID BA/CTSY/CWAT-0009 |
|
1146 * @SYMTestCaseDesc Accept waiting call after active call is hung up. |
|
1147 * @SYMTestPriority High |
|
1148 * @SYMTestActions RCall::AnswerIncomingCall, RCall::HangUp, RCall::Dial, RLine::NotifyIncomingCall, RMobilePhone::SetCallWaitingStatus |
|
1149 * @SYMTestExpectedResults Pass - Call that is waiting can be answered when the original active call terminates. |
|
1150 * @SYMTestType CIT |
|
1151 * @SYMTestCaseDependencies live/rps |
|
1152 * |
|
1153 * Reason for test: Verify incoming call notification completes and waiting call can be answered. |
|
1154 * |
|
1155 * @return - TVerdict code |
|
1156 */ |
|
1157 { |
|
1158 |
|
1159 // |
|
1160 // SET UP |
|
1161 // |
|
1162 |
|
1163 |
|
1164 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus capabilities. |
|
1165 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1166 TUint32 callServiceCaps; |
|
1167 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
1168 CHECK_EQUALS_L(err, KErrNone, |
|
1169 _L("RMobilePhone::GetCallServiceCaps returned with an errorr")) |
|
1170 |
|
1171 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus; |
|
1172 TUint32 unwantedCaps = 0; |
|
1173 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
1174 |
|
1175 // register on home network |
|
1176 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
1177 CHECK_EQUALS_L(ret, KErrNone, |
|
1178 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
1179 |
|
1180 // Get voice line 1. |
|
1181 RMobileLine& mobileLine1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1182 |
|
1183 // Get call 1. |
|
1184 RMobileCall& mobileCall1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall1); |
|
1185 |
|
1186 // Get voice line 2. |
|
1187 RMobileLine& mobileLine2 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1188 |
|
1189 // Get call 2. |
|
1190 RMobileCall& mobileCall2 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall2); |
|
1191 |
|
1192 // |
|
1193 // SET UP END |
|
1194 // |
|
1195 |
|
1196 StartTest(); |
|
1197 |
|
1198 // |
|
1199 // TEST START |
|
1200 // |
|
1201 |
|
1202 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
1203 RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService; |
|
1204 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
1205 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
1206 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
1207 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
1208 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
1209 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
1210 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
1211 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
1212 |
|
1213 // post notification for call status change |
|
1214 TExtEtelRequestStatus notifyDialStatus(mobileCall1,EMobileCallNotifyMobileCallStatusChange); |
|
1215 CleanupStack::PushL(notifyDialStatus); |
|
1216 RMobileCall::TMobileCallStatus callStatus; |
|
1217 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1218 |
|
1219 // Dial a number that answers on call 1 with RCall::Dial |
|
1220 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall1, &RCall::DialCancel); |
|
1221 CleanupStack::PushL(dialStatus); |
|
1222 TPtrC number; |
|
1223 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig returned with an error")); |
|
1224 mobileCall1.Dial(dialStatus, number); |
|
1225 |
|
1226 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
1227 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1228 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1229 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1230 notifyDialStatus,callStatus,RMobileCall::EStatusDialling,KErrNone); |
|
1231 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1232 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1233 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1234 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1235 notifyDialStatus,callStatus,RMobileCall::EStatusConnecting,KErrNone); |
|
1236 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1237 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")) |
|
1238 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1239 _L("RMobileCall::GetMobileCallStatus returned with an error")); |
|
1240 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1241 notifyDialStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1242 |
|
1243 // check status of dail api |
|
1244 ASSERT_EQUALS(dialStatus.Int(), KErrNone, _L("RCall::Dial returned with an error")) |
|
1245 |
|
1246 // Register for notification of an incoming call on line 2 with RLine::NotifyIncomingCall |
|
1247 TCoreEtelRequestStatus<RLine> incomingCallStatus(mobileLine2, &RLine::NotifyIncomingCallCancel); |
|
1248 CleanupStack::PushL(incomingCallStatus); |
|
1249 TName callName; |
|
1250 mobileLine2.NotifyIncomingCall(incomingCallStatus,callName); |
|
1251 |
|
1252 // Request incoming call from RPS. |
|
1253 RPSRequestIncomingCallL(EVoiceLine); |
|
1254 |
|
1255 // Check RLine::NotifyIncomingCall on line 2 completes with valid call name in aName. |
|
1256 ASSERT_EQUALS(WaitForRequestWithTimeOut(incomingCallStatus,ETimeMedium), KErrNone, |
|
1257 _L("RLine::NotifyIncomingCall did not complete without error")); |
|
1258 ASSERT_EQUALS(incomingCallStatus.Int(), KErrNone, |
|
1259 _L("RLine::NotifyIncomingCall set requestStatus to an error")); |
|
1260 ASSERT_TRUE(callName.Length() > 0, |
|
1261 _L("RLine::NotifyIncomingCall did not set the name")); |
|
1262 |
|
1263 // post notification for call status change |
|
1264 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1265 |
|
1266 // Hang up call 1 with RCall::HangUp |
|
1267 mobileCall1.HangUp(); |
|
1268 |
|
1269 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDisconnecting -> EStatusIdle |
|
1270 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1271 notifyDialStatus,callStatus,RMobileCall::EStatusDisconnecting,KErrNone); |
|
1272 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1273 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1274 notifyDialStatus,callStatus,RMobileCall::EStatusIdle,KErrNone); |
|
1275 |
|
1276 |
|
1277 // obtain reference to incoming call object |
|
1278 TCallId incomingCallId; |
|
1279 RMobileCall& incomingCall = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, callName, incomingCallId); |
|
1280 |
|
1281 // post notification for call status change |
|
1282 TExtEtelRequestStatus notifyIncomingCallStatus(incomingCall,EMobileCallNotifyMobileCallStatusChange); |
|
1283 CleanupStack::PushL(notifyIncomingCallStatus); |
|
1284 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1285 |
|
1286 // Answer call on call 2 with RCall::AnswerIncomingCall |
|
1287 TExtEtelRequestStatus answerIncomingCalllStatus(incomingCall,EEtelCallAnswer); |
|
1288 CleanupStack::PushL(answerIncomingCalllStatus); |
|
1289 incomingCall.AnswerIncomingCall(answerIncomingCalllStatus); |
|
1290 |
|
1291 // Check RMobileCall::NotifyMobileCallStatusChange on call 2 completes with EStatusAnswering -> EStatusConnected |
|
1292 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1293 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusAnswering,KErrNone); |
|
1294 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1295 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1296 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1297 |
|
1298 ASSERT_EQUALS(answerIncomingCalllStatus.Int(), KErrNone, _L("RCall::AnswerIncomingCall returned with an error")) |
|
1299 |
|
1300 // Hang up call 2 with RCall::HangUp |
|
1301 ASSERT_EQUALS(incomingCall.HangUp(), KErrNone, |
|
1302 _L("RCall::HangUp returned with and error")); |
|
1303 |
|
1304 // |
|
1305 // TEST END |
|
1306 // |
|
1307 |
|
1308 StartCleanup(); |
|
1309 |
|
1310 //1 mobilePhoneSetCallWaitingStatus |
|
1311 //2 notifyDialStatus |
|
1312 //3 dialStatus |
|
1313 //4 incomingCallStatus |
|
1314 //5 notifyIncomingCallStatus |
|
1315 //6 AnswerIncomingCall |
|
1316 |
|
1317 CleanupStack::PopAndDestroy(6, &mobilePhoneSetCallWaitingStatus); |
|
1318 |
|
1319 StartCleanup(); |
|
1320 |
|
1321 return TestStepResult(); |
|
1322 } |
|
1323 |
|
1324 TPtrC CCTSYIntegrationTestCallWaiting0009::GetTestStepName() |
|
1325 /** |
|
1326 * @return The test step name. |
|
1327 */ |
|
1328 { |
|
1329 return _L("CCTSYIntegrationTestCallWaiting0009"); |
|
1330 } |
|
1331 |
|
1332 |
|
1333 |
|
1334 CCTSYIntegrationTestCallWaiting0010::CCTSYIntegrationTestCallWaiting0010(CEtelSessionMgr& aEtelSessionMgr) |
|
1335 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
1336 /** |
|
1337 * Constructor. |
|
1338 */ |
|
1339 { |
|
1340 SetTestStepName(CCTSYIntegrationTestCallWaiting0010::GetTestStepName()); |
|
1341 } |
|
1342 |
|
1343 CCTSYIntegrationTestCallWaiting0010::~CCTSYIntegrationTestCallWaiting0010() |
|
1344 /** |
|
1345 * Destructor. |
|
1346 */ |
|
1347 { |
|
1348 } |
|
1349 |
|
1350 TVerdict CCTSYIntegrationTestCallWaiting0010::doTestStepL() |
|
1351 /** |
|
1352 * @SYMTestCaseID BA-CTSY-INT-CWAT-0010 |
|
1353 * @SYMFssID BA/CTSY/CWAT-0010 |
|
1354 * @SYMTestCaseDesc Accept waiting call after active call is held. |
|
1355 * @SYMTestPriority High |
|
1356 * @SYMTestActions RCall::HangUp, RCall::AnswerIncomingCall, RCall::Dial, RMobileCall::Hold, RLine::NotifyIncomingCall, RMobilePhone::SetCallWaitingStatus |
|
1357 * @SYMTestExpectedResults Pass - Can put a call on hold and answer a waiting call. |
|
1358 * @SYMTestType CIT |
|
1359 * @SYMTestCaseDependencies live/rps |
|
1360 * |
|
1361 * Reason for test: Verify incoming call notification completes and waiting call can be answered |
|
1362 * |
|
1363 * @return - TVerdict code |
|
1364 */ |
|
1365 { |
|
1366 |
|
1367 // |
|
1368 // SET UP |
|
1369 // |
|
1370 |
|
1371 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus capabilities. |
|
1372 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1373 TUint32 callServiceCaps; |
|
1374 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
1375 CHECK_EQUALS_L(err, KErrNone, |
|
1376 _L("RMobilePhone::GetCallServiceCaps returned with an errorr")) |
|
1377 |
|
1378 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus; |
|
1379 TUint32 unwantedCaps = 0; |
|
1380 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
1381 |
|
1382 // register on home network |
|
1383 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
1384 CHECK_EQUALS_L(ret, KErrNone, |
|
1385 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
1386 |
|
1387 // Get voice line 1. |
|
1388 RMobileLine& mobileLine1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1389 |
|
1390 // Get call 1. |
|
1391 RMobileCall& mobileCall1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall1); |
|
1392 |
|
1393 // Get voice line 2. |
|
1394 RMobileLine& mobileLine2 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1395 |
|
1396 // Get call 2. |
|
1397 RMobileCall& mobileCall2 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall2); |
|
1398 |
|
1399 // |
|
1400 // SET UP END |
|
1401 // |
|
1402 |
|
1403 StartTest(); |
|
1404 |
|
1405 // |
|
1406 // TEST START |
|
1407 // |
|
1408 |
|
1409 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
1410 RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService; |
|
1411 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
1412 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
1413 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
1414 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
1415 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
1416 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
1417 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
1418 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
1419 |
|
1420 // post notification for call status change |
|
1421 RMobileCall::TMobileCallStatus callStatus; |
|
1422 TExtEtelRequestStatus notifyDialStatus(mobileCall1,EMobileCallNotifyMobileCallStatusChange); |
|
1423 CleanupStack::PushL(notifyDialStatus); |
|
1424 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1425 |
|
1426 // Dial a number that answers on call 1 with RCall::Dial |
|
1427 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall1, &RCall::DialCancel); |
|
1428 CleanupStack::PushL(dialStatus); |
|
1429 TPtrC number; |
|
1430 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig returned with an error")); |
|
1431 mobileCall1.Dial(dialStatus, number); |
|
1432 |
|
1433 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
1434 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1435 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1436 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1437 notifyDialStatus,callStatus,RMobileCall::EStatusDialling,KErrNone); |
|
1438 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1439 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1440 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1441 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1442 notifyDialStatus,callStatus,RMobileCall::EStatusConnecting,KErrNone); |
|
1443 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1444 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")) |
|
1445 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1446 _L("RMobileCall::GetMobileCallStatus returned with an error")); |
|
1447 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1448 notifyDialStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1449 |
|
1450 // Register for notification of an incoming call on line 2 with RLine::NotifyIncomingCall |
|
1451 TCoreEtelRequestStatus<RLine> incomingCallStatus(mobileLine2, &RLine::NotifyIncomingCallCancel); |
|
1452 CleanupStack::PushL(incomingCallStatus); |
|
1453 TName callName; |
|
1454 mobileLine2.NotifyIncomingCall(incomingCallStatus,callName); |
|
1455 |
|
1456 // Request incoming call from RPS. |
|
1457 RPSRequestIncomingCallL(EVoiceLine); |
|
1458 |
|
1459 // Check RLine::NotifyIncomingCall on line 2 completes with valid call name in aName. |
|
1460 ASSERT_EQUALS(WaitForRequestWithTimeOut(incomingCallStatus,ETimeMedium), KErrNone, |
|
1461 _L("RLine::NotifyIncomingCall did not complete without error")); |
|
1462 ASSERT_EQUALS(incomingCallStatus.Int(), KErrNone, |
|
1463 _L("RLine::NotifyIncomingCall set requestStatus to an error")); |
|
1464 ASSERT_TRUE(callName.Length() > 0, |
|
1465 _L("RLine::NotifyIncomingCall did not set the name")); |
|
1466 |
|
1467 // post notification for call status change |
|
1468 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1469 |
|
1470 // Hold call 1 with RMobileCall::Hold |
|
1471 TExtEtelRequestStatus holdStatus(mobileCall1,EMobileCallHold); |
|
1472 CleanupStack::PushL(holdStatus); |
|
1473 mobileCall1.Hold(holdStatus); |
|
1474 |
|
1475 // Check RMobileCall::NotifyMobileCallStatusChange on call 1 completes with EStatusHold |
|
1476 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1477 notifyDialStatus,callStatus,RMobileCall::EStatusHold,KErrNone); |
|
1478 ASSERT_EQUALS(WaitForRequestWithTimeOut(holdStatus, ETimeMedium), KErrNone, _L("RMobileCall::Hold timed-out")) |
|
1479 ASSERT_EQUALS(holdStatus.Int(), KErrNone, |
|
1480 _L("RMobileCall::Hold returned with an error")); |
|
1481 |
|
1482 // obtain reference to incoming call object |
|
1483 TCallId incomingCallId; |
|
1484 RMobileCall& incomingCall = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, callName, incomingCallId); |
|
1485 |
|
1486 // post notification for call status change |
|
1487 TExtEtelRequestStatus notifyIncomingCallStatus(incomingCall,EMobileCallNotifyMobileCallStatusChange); |
|
1488 CleanupStack::PushL(notifyIncomingCallStatus); |
|
1489 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1490 |
|
1491 // Answer call on call 2 with RCall::AnswerIncomingCall |
|
1492 TExtEtelRequestStatus answerIncomingCalllStatus(incomingCall,EEtelCallAnswer); |
|
1493 CleanupStack::PushL(answerIncomingCalllStatus); |
|
1494 incomingCall.AnswerIncomingCall(answerIncomingCalllStatus); |
|
1495 |
|
1496 // Check RMobileCall::NotifyMobileCallStatusChange on call 2 completes with EStatusAnswering -> EStatusConnected |
|
1497 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1498 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusAnswering,KErrNone); |
|
1499 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1500 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1501 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1502 |
|
1503 ASSERT_EQUALS(answerIncomingCalllStatus.Int(), KErrNone, _L("RCall::AnswerIncomingCall returned with an error")) |
|
1504 |
|
1505 // Hang up call 2 with RCall::HangUp |
|
1506 ASSERT_EQUALS(incomingCall.HangUp(), KErrNone, |
|
1507 _L("RCall::HangUp returned with and error")); |
|
1508 ASSERT_EQUALS(mobileCall1.HangUp(), KErrNone, |
|
1509 _L("RCall::HangUp returned with and error")); |
|
1510 |
|
1511 // |
|
1512 // TEST END |
|
1513 // |
|
1514 |
|
1515 StartCleanup(); |
|
1516 |
|
1517 // 1 mobilePhoneSetCallWaitingStatus |
|
1518 // 2 notifyDialStatus |
|
1519 // 3 dialStatus |
|
1520 // 4 incomingCallStatus |
|
1521 // 5 holdStatus |
|
1522 // 6 notifyIncomingCallStatus |
|
1523 // 7 answerIncomingCalllStatus |
|
1524 |
|
1525 CleanupStack::PopAndDestroy(7, &mobilePhoneSetCallWaitingStatus); |
|
1526 |
|
1527 return TestStepResult(); |
|
1528 } |
|
1529 |
|
1530 TPtrC CCTSYIntegrationTestCallWaiting0010::GetTestStepName() |
|
1531 /** |
|
1532 * @return The test step name. |
|
1533 */ |
|
1534 { |
|
1535 return _L("CCTSYIntegrationTestCallWaiting0010"); |
|
1536 } |
|
1537 |
|
1538 |
|
1539 |
|
1540 CCTSYIntegrationTestCallWaiting0011::CCTSYIntegrationTestCallWaiting0011(CEtelSessionMgr& aEtelSessionMgr) |
|
1541 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
1542 /** |
|
1543 * Constructor. |
|
1544 */ |
|
1545 { |
|
1546 SetTestStepName(CCTSYIntegrationTestCallWaiting0011::GetTestStepName()); |
|
1547 } |
|
1548 |
|
1549 CCTSYIntegrationTestCallWaiting0011::~CCTSYIntegrationTestCallWaiting0011() |
|
1550 /** |
|
1551 * Destructor. |
|
1552 */ |
|
1553 { |
|
1554 } |
|
1555 |
|
1556 TVerdict CCTSYIntegrationTestCallWaiting0011::doTestStepL() |
|
1557 /** |
|
1558 * @SYMTestCaseID BA-CTSY-INT-CWAT-0011 |
|
1559 * @SYMFssID BA/CTSY/CWAT-0011 |
|
1560 * @SYMTestCaseDesc Accept waiting call after active call is hung up by remote party. |
|
1561 * @SYMTestPriority High |
|
1562 * @SYMTestActions RCall::HangUp, RCall::AnswerIncomingCall, RCall::Dial, RLine::NotifyIncomingCall, RMobilePhone::SetCallWaitingStatus |
|
1563 * @SYMTestExpectedResults Pass - Waiting call can be answered. |
|
1564 * @SYMTestType CIT |
|
1565 * @SYMTestCaseDependencies live/manual |
|
1566 * |
|
1567 * Reason for test: Verify incoming call notification completes and waiting call can be answered |
|
1568 * |
|
1569 * @return - TVerdict code |
|
1570 */ |
|
1571 { |
|
1572 |
|
1573 // |
|
1574 // SET UP |
|
1575 // |
|
1576 |
|
1577 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus capabilities. |
|
1578 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1579 TUint32 callServiceCaps; |
|
1580 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
1581 CHECK_EQUALS_L(err, KErrNone, |
|
1582 _L("RMobilePhone::GetCallServiceCaps returned with an errorr")) |
|
1583 |
|
1584 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus; |
|
1585 TUint32 unwantedCaps = 0; |
|
1586 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
1587 |
|
1588 // register on home network |
|
1589 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
1590 CHECK_EQUALS_L(ret, KErrNone, |
|
1591 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
1592 |
|
1593 // Get voice line 1. |
|
1594 RMobileLine& mobileLine1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1595 |
|
1596 // Get call 1. |
|
1597 RMobileCall& mobileCall1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall1); |
|
1598 |
|
1599 // Get voice line 2. |
|
1600 RMobileLine& mobileLine2 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1601 |
|
1602 // Get call 2. |
|
1603 RMobileCall& mobileCall2 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall2); |
|
1604 |
|
1605 // |
|
1606 // SET UP END |
|
1607 // |
|
1608 |
|
1609 StartTest(); |
|
1610 |
|
1611 // |
|
1612 // TEST START |
|
1613 // |
|
1614 |
|
1615 |
|
1616 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
1617 RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService; |
|
1618 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
1619 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
1620 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
1621 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
1622 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
1623 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
1624 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
1625 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
1626 |
|
1627 // post notification for call status change |
|
1628 RMobileCall::TMobileCallStatus callStatus; |
|
1629 TExtEtelRequestStatus notifyDialStatus(mobileCall1,EMobileCallNotifyMobileCallStatusChange); |
|
1630 CleanupStack::PushL(notifyDialStatus); |
|
1631 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1632 |
|
1633 // Dial a number and answer the call on call 1 with RCall::Dial |
|
1634 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall1, &RCall::DialCancel); |
|
1635 CleanupStack::PushL(dialStatus); |
|
1636 TPtrC number; |
|
1637 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig returned with an error")); |
|
1638 mobileCall1.Dial(dialStatus, number); |
|
1639 |
|
1640 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
1641 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1642 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1643 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1644 notifyDialStatus,callStatus,RMobileCall::EStatusDialling,KErrNone); |
|
1645 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1646 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1647 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1648 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1649 notifyDialStatus,callStatus,RMobileCall::EStatusConnecting,KErrNone); |
|
1650 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1651 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")) |
|
1652 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1653 _L("RMobileCall::GetMobileCallStatus returned with an error")); |
|
1654 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1655 notifyDialStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1656 |
|
1657 // Register for notification of an incoming call on line 2 with RLine::NotifyIncomingCall |
|
1658 TCoreEtelRequestStatus<RLine> incomingCallStatus(mobileLine2, &RLine::NotifyIncomingCallCancel); |
|
1659 CleanupStack::PushL(incomingCallStatus); |
|
1660 TName callName; |
|
1661 mobileLine2.NotifyIncomingCall(incomingCallStatus,callName); |
|
1662 |
|
1663 // Dial the board manually. |
|
1664 RPSRequestIncomingCallL(EVoiceLine); |
|
1665 |
|
1666 // Check RLine::NotifyIncomingCall on line 2 completes with valid call name in aName. |
|
1667 ASSERT_EQUALS(WaitForRequestWithTimeOut(incomingCallStatus,ETimeMedium), KErrNone, |
|
1668 _L("RLine::NotifyIncomingCall did not complete without error")); |
|
1669 ASSERT_EQUALS(incomingCallStatus.Int(), KErrNone, |
|
1670 _L("RLine::NotifyIncomingCall set requestStatus to an error")); |
|
1671 ASSERT_TRUE(callName.Length() > 0, |
|
1672 _L("RLine::NotifyIncomingCall did not set the name")); |
|
1673 |
|
1674 // post notification for call status change |
|
1675 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1676 |
|
1677 // Hang up call 1 as the remote party. |
|
1678 DisplayUserInteractionPromptL(_L("Please hangup the active call")); |
|
1679 |
|
1680 // Check RMobileCall::NotifyMobileCallStatusChange on call 1 completes with EStatusDisconnecting -> EStatusIdle |
|
1681 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1682 notifyDialStatus,callStatus,RMobileCall::EStatusDisconnecting,KErrNone); |
|
1683 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1684 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1685 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1686 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1687 notifyDialStatus,callStatus,RMobileCall::EStatusIdle,KErrNone); |
|
1688 |
|
1689 // obtain reference to incoming call object |
|
1690 TCallId incomingCallId; |
|
1691 RMobileCall& incomingCall = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, callName, incomingCallId); |
|
1692 |
|
1693 // post notification for call status change |
|
1694 TExtEtelRequestStatus notifyIncomingCallStatus(incomingCall,EMobileCallNotifyMobileCallStatusChange); |
|
1695 CleanupStack::PushL(notifyIncomingCallStatus); |
|
1696 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1697 |
|
1698 // Answer call on call 2 with RCall::AnswerIncomingCall |
|
1699 TExtEtelRequestStatus answerIncomingCalllStatus(incomingCall,EEtelCallAnswer); |
|
1700 CleanupStack::PushL(answerIncomingCalllStatus); |
|
1701 incomingCall.AnswerIncomingCall(answerIncomingCalllStatus); |
|
1702 |
|
1703 // Check RMobileCall::NotifyMobileCallStatusChange on call 2 completes with EStatusAnswering -> EStatusConnected |
|
1704 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1705 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusAnswering,KErrNone); |
|
1706 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1707 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1708 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1709 ASSERT_EQUALS(answerIncomingCalllStatus.Int(), KErrNone, _L("RCall::AnswerIncomingCall returned with an error")) |
|
1710 |
|
1711 // Hang up call 2 with RCall::HangUp |
|
1712 ASSERT_EQUALS(incomingCall.HangUp(), KErrNone, |
|
1713 _L("RCall::HangUp returned with and error")); |
|
1714 |
|
1715 // |
|
1716 // TEST END |
|
1717 // |
|
1718 |
|
1719 StartCleanup(); |
|
1720 |
|
1721 // 1 mobilePhoneSetCallWaitingStatus |
|
1722 // 2 notifyDialStatus |
|
1723 // 3 dialStatus |
|
1724 // 4 incomingCallStatus |
|
1725 // 5 notifyIncomingCallStatus |
|
1726 // 6 answerIncomingCalllStatus |
|
1727 |
|
1728 CleanupStack::PopAndDestroy(6, &mobilePhoneSetCallWaitingStatus); |
|
1729 |
|
1730 return TestStepResult(); |
|
1731 } |
|
1732 |
|
1733 TPtrC CCTSYIntegrationTestCallWaiting0011::GetTestStepName() |
|
1734 /** |
|
1735 * @return The test step name. |
|
1736 */ |
|
1737 { |
|
1738 return _L("CCTSYIntegrationTestCallWaiting0011"); |
|
1739 } |
|
1740 |
|
1741 |
|
1742 |
|
1743 CCTSYIntegrationTestCallWaiting0012::CCTSYIntegrationTestCallWaiting0012(CEtelSessionMgr& aEtelSessionMgr) |
|
1744 : CCTSYIntegrationTestCallWaitingBase(aEtelSessionMgr) |
|
1745 /** |
|
1746 * Constructor. |
|
1747 */ |
|
1748 { |
|
1749 SetTestStepName(CCTSYIntegrationTestCallWaiting0012::GetTestStepName()); |
|
1750 } |
|
1751 |
|
1752 CCTSYIntegrationTestCallWaiting0012::~CCTSYIntegrationTestCallWaiting0012() |
|
1753 /** |
|
1754 * Destructor. |
|
1755 */ |
|
1756 { |
|
1757 } |
|
1758 |
|
1759 TVerdict CCTSYIntegrationTestCallWaiting0012::doTestStepL() |
|
1760 /** |
|
1761 * @SYMTestCaseID BA-CTSY-INT-CWAT-0012 |
|
1762 * @SYMFssID BA/CTSY/CWAT-0012 |
|
1763 * @SYMTestCaseDesc Reject a waiting call. |
|
1764 * @SYMTestPriority High |
|
1765 * @SYMTestActions RCall::HangUp, RCall::Dial, RLine::NotifyIncomingCall, RMobilePhone::SetCallWaitingStatus |
|
1766 * @SYMTestExpectedResults Pass - Waiting call can be rejected. |
|
1767 * @SYMTestType CIT |
|
1768 * @SYMTestCaseDependencies live/rps |
|
1769 * |
|
1770 * Reason for test: Verify incoming call notification completes and line status is correct after reject. |
|
1771 * |
|
1772 * @return - TVerdict code |
|
1773 */ |
|
1774 { |
|
1775 |
|
1776 // |
|
1777 // SET UP |
|
1778 // |
|
1779 // Ensure RMobilePhone::GetCallServiceCaps returns caps in set of KCapsSetCWStatus capabilities. |
|
1780 RMobilePhone& mobilePhone = iEtelSessionMgr.GetPhoneL(KMainServer, KMainPhone); |
|
1781 TUint32 callServiceCaps; |
|
1782 TInt err = mobilePhone.GetCallServiceCaps(callServiceCaps); |
|
1783 CHECK_EQUALS_L(err, KErrNone, |
|
1784 _L("RMobilePhone::GetCallServiceCaps returned with an error")) |
|
1785 |
|
1786 TUint32 expectedCaps = RMobilePhone::KCapsSetCWStatus; |
|
1787 TUint32 unwantedCaps = 0; |
|
1788 CHECK_BITS_SET_L(callServiceCaps, expectedCaps, unwantedCaps, _L("RMobilePhone::GetCallServiceCaps returned incorrect caps")) |
|
1789 |
|
1790 // register on home network |
|
1791 TInt ret = iNetworkTsyTestHelper.WaitForRegisteredOnHomeNetworkL(mobilePhone); |
|
1792 CHECK_EQUALS_L(ret, KErrNone, |
|
1793 _L("RMobilePhone::NotifyNetworkRegistrationStatusChange network registration failed")); |
|
1794 |
|
1795 // Get voice line 1. |
|
1796 RMobileLine& mobileLine1 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1797 |
|
1798 // Get call 1. |
|
1799 RMobileCall& mobileCall1 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall1); |
|
1800 |
|
1801 // Get voice line 2. |
|
1802 RMobileLine& mobileLine2 = iEtelSessionMgr.GetLineL(KMainServer,KMainPhone,KVoiceLine); |
|
1803 |
|
1804 // Get call 2. |
|
1805 RMobileCall& mobileCall2 = iEtelSessionMgr.GetCallL(KMainServer,KMainPhone,KVoiceLine,KCall2); |
|
1806 |
|
1807 // |
|
1808 // SET UP END |
|
1809 // |
|
1810 |
|
1811 StartTest(); |
|
1812 |
|
1813 // |
|
1814 // TEST START |
|
1815 // |
|
1816 |
|
1817 // Activate call waiting for all services with RMobilePhone::SetCallWaitingStatus with aServiceGroup=EVoiceService and aAction=EServiceActionActivate |
|
1818 RMobilePhone::TMobileService mobileService = RMobilePhone::EVoiceService; |
|
1819 RMobilePhone::TMobilePhoneServiceAction mobilePhoneServiceAction = RMobilePhone::EServiceActionActivate; |
|
1820 TExtEtelRequestStatus mobilePhoneSetCallWaitingStatus(mobilePhone, EMobilePhoneSetCallWaitingStatus); |
|
1821 CleanupStack::PushL(mobilePhoneSetCallWaitingStatus); |
|
1822 mobilePhone.SetCallWaitingStatus(mobilePhoneSetCallWaitingStatus, mobileService, mobilePhoneServiceAction); |
|
1823 ASSERT_EQUALS(WaitForRequestWithTimeOut(mobilePhoneSetCallWaitingStatus, ETimeMedium), KErrNone, |
|
1824 _L("RMobilePhone::SetCallWaitingStatus timed-out")) |
|
1825 ASSERT_EQUALS(mobilePhoneSetCallWaitingStatus.Int(), KErrNone, |
|
1826 _L("RMobilePhone::SetCallWaitingStatus returned with an error")) |
|
1827 |
|
1828 // post notification for call status change |
|
1829 RMobileCall::TMobileCallStatus callStatus; |
|
1830 TExtEtelRequestStatus notifyDialStatus(mobileCall1,EMobileCallNotifyMobileCallStatusChange); |
|
1831 CleanupStack::PushL(notifyDialStatus); |
|
1832 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1833 |
|
1834 // Dial a number that answers call 1 with RCall::Dial |
|
1835 TCoreEtelRequestStatus<RMobileCall> dialStatus(mobileCall1, &RCall::DialCancel); |
|
1836 CleanupStack::PushL(dialStatus); |
|
1837 TPtrC number; |
|
1838 ASSERT_TRUE(GetStringFromConfig(KIniVoiceNumSection, KIniVoiceNumber1, number) != EFalse, _L("GetStringFromConfig returned with an error")); |
|
1839 mobileCall1.Dial(dialStatus, number); |
|
1840 |
|
1841 // Check RMobileCall::NotifyMobileCallStatusChange completes with EStatusDialling -> EStatusConnecting -> EStatusConnected. |
|
1842 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1843 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1844 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1845 notifyDialStatus,callStatus,RMobileCall::EStatusDialling,KErrNone); |
|
1846 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1847 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1848 _L("RMobileCall::GetMobileCallStatus did not complete as expected")); |
|
1849 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1850 notifyDialStatus,callStatus,RMobileCall::EStatusConnecting,KErrNone); |
|
1851 mobileCall1.NotifyMobileCallStatusChange(notifyDialStatus,callStatus); |
|
1852 ASSERT_EQUALS(WaitForRequestWithTimeOut(dialStatus, ETimeMedium), KErrNone, _L("RCall::Dial timed-out")) |
|
1853 ASSERT_EQUALS(mobileCall1.GetMobileCallStatus(callStatus), KErrNone, |
|
1854 _L("RMobileCall::GetMobileCallStatus returned with an error")); |
|
1855 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(mobileCall1, |
|
1856 notifyDialStatus,callStatus,RMobileCall::EStatusConnected,KErrNone); |
|
1857 |
|
1858 // Register for notification of an incoming call on line 2 with RLine::NotifyIncomingCall |
|
1859 TCoreEtelRequestStatus<RLine> incomingCallStatus(mobileLine2, &RLine::NotifyIncomingCallCancel); |
|
1860 CleanupStack::PushL(incomingCallStatus); |
|
1861 TName callName; |
|
1862 mobileLine2.NotifyIncomingCall(incomingCallStatus,callName); |
|
1863 |
|
1864 // Request incoming call from RPS. |
|
1865 RPSRequestIncomingCallL(EVoiceLine); |
|
1866 |
|
1867 // Check RLine::NotifyIncomingCall on line 2 completes with valid call name in aName. |
|
1868 ASSERT_EQUALS(WaitForRequestWithTimeOut(incomingCallStatus,ETimeMedium), KErrNone, |
|
1869 _L("RLine::NotifyIncomingCall did not complete without error")); |
|
1870 ASSERT_EQUALS(incomingCallStatus.Int(), KErrNone, |
|
1871 _L("RLine::NotifyIncomingCall set requestStatus to an error")); |
|
1872 ASSERT_TRUE(callName.Length() > 0, |
|
1873 _L("RLine::NotifyIncomingCall did not set the name")); |
|
1874 |
|
1875 // post notification for call status change |
|
1876 TCallId incomingCallId; |
|
1877 RMobileCall& incomingCall = iEtelSessionMgr.GetIncomingCallL(KMainServer, KMainPhone, KVoiceLine, callName, incomingCallId); |
|
1878 |
|
1879 // post notification for call status change |
|
1880 TExtEtelRequestStatus notifyIncomingCallStatus(incomingCall,EMobileCallNotifyMobileCallStatusChange); |
|
1881 CleanupStack::PushL(notifyIncomingCallStatus); |
|
1882 incomingCall.NotifyMobileCallStatusChange(notifyIncomingCallStatus,callStatus); |
|
1883 |
|
1884 // Hang up call 2 with RCall::HangUp |
|
1885 ASSERT_EQUALS(incomingCall.HangUp(), KErrNone, |
|
1886 _L("RCall::HangUp returned with and error")); |
|
1887 |
|
1888 // Check RMobileCall::NotifyMobileCallStatusChange on call 2 completes with EStatusIdle |
|
1889 iCallControlTsyTestHelper.WaitForMobileCallNotifyMobileCallStatusChange(incomingCall, |
|
1890 notifyIncomingCallStatus,callStatus,RMobileCall::EStatusIdle,KErrNone); |
|
1891 |
|
1892 // |
|
1893 // TEST END |
|
1894 // |
|
1895 |
|
1896 StartCleanup(); |
|
1897 |
|
1898 mobileCall1.HangUp(); |
|
1899 |
|
1900 // 1 mobilePhoneSetCallWaitingStatus |
|
1901 // 2 notifyDialStatus |
|
1902 // 3 dialStatus |
|
1903 // 4 incomingCallStatus |
|
1904 // 5 notifyIncomingCallStatus |
|
1905 |
|
1906 CleanupStack::PopAndDestroy(5, &mobilePhoneSetCallWaitingStatus); |
|
1907 |
|
1908 return TestStepResult(); |
|
1909 } |
|
1910 |
|
1911 TPtrC CCTSYIntegrationTestCallWaiting0012::GetTestStepName() |
|
1912 /** |
|
1913 * @return The test step name. |
|
1914 */ |
|
1915 { |
|
1916 return _L("CCTSYIntegrationTestCallWaiting0012"); |
|
1917 } |
|
1918 |
|
1919 |
|
1920 |