logsui/tsrc/MATTItests/TC_ReceivedCalls.rb
changeset 0 4a5361db8937
equal deleted inserted replaced
-1:000000000000 0:4a5361db8937
       
     1 require 'CommonFunctions.rb'
       
     2 
       
     3 class TC_ReceivedCalls < CommonFunctions
       
     4 	
       
     5 	## Initializes the Received view. Log events are created and application is started.
       
     6 	## Calls are sorted by Received option
       
     7 	def initializeReceivedView(caseName)
       
     8 		initializeTest(caseName)
       
     9 		selectView("Recent", "Received")
       
    10 	end
       
    11 	
       
    12 	## Initializes the Received view. Log events are created and application is started by pressing Send key
       
    13 	## Calls are sorted by Received option
       
    14 	def initializeReceivedViewSendKey(caseName)
       
    15 		initializeTestSendKey(caseName)
       
    16 		selectView("Recent", "Received")
       
    17 	end
       
    18 	
       
    19   ## Test that last received CS call is shown in received view
       
    20   def last_received_CS_call_in_received_view
       
    21   	result = last_call("case3", "358123457918889", DirInIcon_Const, VoiceIcon_Const)
       
    22   	return result
       
    23   end
       
    24   
       
    25   ## Test that last received video call is shown in received view
       
    26   def last_received_video_call_in_received_view
       
    27   	result = last_call("case4", "358123457918810", DirInIcon_Const, VideoIcon_Const)
       
    28   	return result
       
    29   end
       
    30 	
       
    31 	## Test initiating CS call to first event in received calls view
       
    32 	def initiate_CS_call_to_first_event_in_received_view
       
    33 		initializeReceivedView("case8")
       
    34 		# call to function in CommonFunctions.rb
       
    35   	initiate_call("0", "880123456789")
       
    36 	end
       
    37 	
       
    38 	## Test initiating CS call to last event in received calls view
       
    39 	def initiate_CS_call_to_last_event_in_received_view
       
    40 		initializeReceivedView("case8")
       
    41 		# call to function in CommonFunctions.rb
       
    42   	initiate_call("1", "88012345678910")
       
    43 	end
       
    44 	
       
    45 	## Test initiating a quick CS callback in received calls view
       
    46 	def initiate_CS_callback_in_received_view
       
    47 		initializeReceivedViewSendKey("case7")
       
    48 		# call to function in CommonFunctions.rb
       
    49   	initiate_call_with_send_key()
       
    50 	end
       
    51 	
       
    52 	## Test that contact name is displyed correctly in received view
       
    53 	def matching_contact_name_received_CS_call
       
    54 		initializeReceivedView("case10")
       
    55 		verify_event(0, "Testing1 050", DirInIcon_Const, VoiceIcon_Const)
       
    56 		@appControl.closeApplication()
       
    57 		return 0
       
    58 	end
       
    59 	
       
    60 end