|
1 require 'CommonFunctions.rb' |
|
2 |
|
3 class TC_DialledCalls < CommonFunctions |
|
4 |
|
5 ## Initializes the Dialled view. Log events are created and application is started. |
|
6 ## Calls are sorted by Dialled option |
|
7 def initializeDialledView(caseName) |
|
8 initializeTest(caseName) |
|
9 selectView("Recent", "Dialled") |
|
10 end |
|
11 |
|
12 ## Initializes the Dialled view. Log events are created and application is started by pressing Send key |
|
13 ## Calls are sorted by Dialled option |
|
14 def intializeDialledViewSendKey(caseName) |
|
15 initializeTestSendKey(caseName) |
|
16 selectView("Recent", "Dialled") |
|
17 end |
|
18 |
|
19 ## Test that last dialled CS call is shown in dialled view |
|
20 def last_dialled_CS_call_in_dialled_view |
|
21 result = last_call("case1", "+35812345790", DirOutIcon_Const, VoiceIcon_Const) |
|
22 return result |
|
23 end |
|
24 |
|
25 ## Test that last dialled video call is shown in dialled view |
|
26 def last_dialled_video_call_in_dialled_view |
|
27 result = last_call("case2", "+358123457918888", DirOutIcon_Const, VideoIcon_Const) |
|
28 return result |
|
29 end |
|
30 |
|
31 ## Test initiating a quick CS callback in dialled calls view |
|
32 def initiate_CS_callback_in_dialled_view |
|
33 intializeDialledViewSendKey("case7") |
|
34 # call to function in CommonFunctions.rb |
|
35 initiate_call_with_send_key() |
|
36 end |
|
37 |
|
38 ## Test initiating a quick video callback in dialled calls view |
|
39 def initiate_video_callback_in_dialled_view |
|
40 intializeDialledViewSendKey("case9") |
|
41 # call to function in CommonFunctions.rb |
|
42 initiate_call_with_send_key() |
|
43 end |
|
44 |
|
45 ## Test initiating a quick video callback in dialled calls view once the |
|
46 ## list is scrolled down |
|
47 def initiate_video_callback_in_dialled_view_scrolling |
|
48 intializeDialledViewSendKey("case9") |
|
49 # call to function in CommonFunctions.rb |
|
50 # Scroll down the list!! IMPLEMENT THIS |
|
51 initiate_call_with_send_key() |
|
52 end |
|
53 |
|
54 ## Test initiating CS call to first event in dialled calls view |
|
55 def initiate_CS_call_to_first_event_in_dialled_view |
|
56 initializeDialledView("case8") |
|
57 # call to function in CommonFunctions.rb |
|
58 initiate_call("0", "+3580123456789") |
|
59 end |
|
60 |
|
61 ## Test initiating CS call to last event in dialled calls view |
|
62 def initiate_CS_call_to_last_event_in_dialled_view |
|
63 initializeDialledView("case8") |
|
64 # call to function in CommonFunctions.rb |
|
65 initiate_call("1", "+358012345678910") |
|
66 end |
|
67 |
|
68 ## Test that contact name is displyed correctly in dialled view |
|
69 def matching_contact_name_dialled_CS_call |
|
70 initializeDialledView("case10") |
|
71 #match_conctact("2", "Test") |
|
72 verify_event(1, "Test", DirOutIcon_Const, VoiceIcon_Const) |
|
73 @appControl.closeApplication() |
|
74 return 0 |
|
75 end |
|
76 |
|
77 ## Test that contact name is displyed correctly in dialled view |
|
78 def matching_contact_name_dialled_video_call |
|
79 initializeDialledView("case10") |
|
80 verify_event(0, "Testing The Test", DirOutIcon_Const, VideoIcon_Const) |
|
81 @appControl.closeApplication() |
|
82 return 0 |
|
83 end |
|
84 |
|
85 |
|
86 ## Test pressing Send key in Idle mode and verify that dialled calls view is opened |
|
87 def pressing_send_key_in_idle_mode |
|
88 intializeDialledViewSendKey("case8") |
|
89 sleep 5 |
|
90 #my_app = @my_sut.application.attribute("FullName") |
|
91 #puts my_app |
|
92 #@my_sut.application.close |
|
93 #my_app = @my_sut.application.attribute("FullName") |
|
94 #puts my_app |
|
95 # Verfiy that the application is logs and the menu is dialled |
|
96 # case is not finished |
|
97 # Check the UI components that must be there. If not there, case fails |
|
98 #dialledCallsView = my_app.HbMainWindow.HbContentWidget.LogsDialledCallsView.HbWidget |
|
99 #@log.debug('Verifying that the view name is "Recent calls"') |
|
100 #dialledCallsView.HbLabel(:text=>'Dialed calls') |
|
101 end |
|
102 end |