use of com.waz.api.IConversation in project wire-android by wireapp.
the class AudioRecordingTest method verifyPlayButtonIsVisibleAfterLongPressiingAudioMessageButton.
@Test
public void verifyPlayButtonIsVisibleAfterLongPressiingAudioMessageButton() 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);
onView(withId(R.id.cursor_menu_item_audio_message)).check(isVisible());
onView(withId(R.id.cursor_menu_item_audio_message)).perform(ViewActions.longClick());
String label = activity.getString(R.string.glyph__play);
onView(withId(R.id.gtv__audido_message__recording__bottom_button)).check(hasText(label));
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class AudioRecordingTest method verifyCancellingOfAudioMessageRecordingView.
@Test
public void verifyCancellingOfAudioMessageRecordingView() 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);
onView(withId(R.id.cursor_menu_item_audio_message)).check(isVisible());
onView(withId(R.id.cursor_menu_item_audio_message)).perform(ViewActions.longClick());
onView(withId(R.id.fl__audio_message__recording__cancel_button_container)).check(isVisible());
onView(withId(R.id.fl__audio_message__recording__cancel_button_container)).perform(ViewActions.click());
onView(withId(R.id.amrv_audio_message_recording)).check(isInvisible());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertAudioCallInitatedInGroupConversation.
@Test
public void assertAudioCallInitatedInGroupConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.GROUP);
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 assertToolbarVisibleInGroupConversation.
@Test
public void assertToolbarVisibleInGroupConversation() throws InterruptedException {
IConversation mockConversation = mock(IConversation.class);
when(mockConversation.getType()).thenReturn(IConversation.Type.GROUP);
when(mockConversation.isMemberOfConversation()).thenReturn(true);
MockHelper.setupConversationMocks(mockConversation, activity);
attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
onView(withId(R.id.t_conversation_toolbar)).check(isVisible());
}
use of com.waz.api.IConversation in project wire-android by wireapp.
the class ConversationFragmentTest method assertGIFIconVisibleInOneToOneConversation.
@Test
public void assertGIFIconVisibleInOneToOneConversation() 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_gif)).check(isVisible());
}
Aggregations