use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertNoAudioCallButtonInNonActiveConversation.
@Test
public void assertNoAudioCallButtonInNonActiveConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(false);
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.action_audio_call)).check(CustomViewAssertions.isNull());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertAudioMessageIconVisibleInGroupConversation.
@Test
public void assertAudioMessageIconVisibleInGroupConversation() throws InterruptedException {
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_audio_message)).check(isVisible());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertFileUploadIconVisibleInGroupConversation.
@Test
public void assertFileUploadIconVisibleInGroupConversation() throws InterruptedException {
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);
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 ConversationFragmentTest method assertCursorImagesVisible.
@Test
public void assertCursorImagesVisible() 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());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertToolbarOneToOneParticipants.
@Test
public void assertToolbarOneToOneParticipants() {
String conversationName = "ConversationName";
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getName()).thenReturn(conversationName);
when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
IConversationScreenController mockScreenController = activity.getControllerFactory().getConversationScreenController();
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withText(conversationName)).perform(click());
verify(mockScreenController).showParticipants(any(View.class), anyBoolean());
}
Aggregations