use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertAudioCallInitatedInOneToOneConversation.
@Test
public void assertAudioCallInitatedInOneToOneConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
ICallingController mockCallingController = activity.getControllerFactory().getCallingController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_audio_call)).check(isVisible());
onView(withId(R.id.action_audio_call)).perform(click());
verify(mockCallingController).startCall(false);
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertVideoCallInitatedInOneToOneConversation.
@Test
public void assertVideoCallInitatedInOneToOneConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
ICallingController mockCallingController = activity.getControllerFactory().getCallingController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_video_call)).check(isVisible());
onView(withId(R.id.action_video_call)).perform(click());
verify(mockCallingController).startCall(true);
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertCursorImagesBackButtonVisible.
@Test
public void assertCursorImagesBackButtonVisible() throws Exception {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.GROUP);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
when(mockConversation.isActive()).thenReturn(true);
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.cursor_menu_item_camera)).check(isVisible());
onView(withId(R.id.cursor_menu_item_camera)).perform(click());
Thread.sleep(500);
onView(withId(R.id.rv__cursor_images)).check(isVisible());
onView(withId(R.id.gtv__cursor_image__nav_camera_back)).check(isGone());
onView(withId(R.id.rv__cursor_images)).perform(swipeLeft());
Thread.sleep(200);
onView(withId(R.id.gtv__cursor_image__nav_camera_back)).check(isVisible());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertFileUploadIconVisibleInOneToOneConversation.
@Test
public void assertFileUploadIconVisibleInOneToOneConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
when(mockConversation.isActive()).thenReturn(true);
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
Thread.sleep(500);
onView(withId(R.id.cursor_menu_item_more)).perform(click());
Thread.sleep(500);
onView(withId(R.id.cursor_menu_item_file)).check(isVisible());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ParticipantHeaderFragmentTest method assertGroupConversationNameCanBeEdited.
@Test
public void assertGroupConversationNameCanBeEdited() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
String conversationName = "A group";
when(mockConversation.getType()).thenReturn(IConversation.Type.GROUP);
when(mockConversation.getName()).thenReturn(conversationName);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
MockHelper.setupParticipantsMocks(mockConversation, activity);
attachFragment(ParticipantHeaderFragment.newInstance(IConnectStore.UserRequester.CONVERSATION), ParticipantHeaderFragment.TAG);
onView(withId(R.id.gtv__participants_header__pen_icon)).check(isVisible());
onView(withId(R.id.gtv__participants_header__pen_icon)).perform(click());
Thread.sleep(500);
onView(withId(R.id.gtv__participants_header__pen_icon)).check(isGone());
onView(withId(R.id.taet__participants__header__editable)).check(hasText(conversationName));
}
Aggregations