Some more fixes for basic tests: all of them are now passing
This commit is contained in:
parent
2d28121e0e
commit
e5c069c58e
3 changed files with 25 additions and 1 deletions
|
@ -58,6 +58,16 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
|||
private boolean editOnClick = false, editConsumed = false, onlyDisplayChatAddress = false;
|
||||
private String sipAddressToAdd;
|
||||
|
||||
private static ContactsFragment instance;
|
||||
|
||||
static final boolean isInstanciated() {
|
||||
return instance != null;
|
||||
}
|
||||
|
||||
public static final ContactsFragment instance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
|
@ -166,6 +176,7 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
|||
|
||||
@Override
|
||||
public void onResume() {
|
||||
instance = this;
|
||||
super.onResume();
|
||||
|
||||
if (editConsumed) {
|
||||
|
@ -181,6 +192,12 @@ public class ContactsFragment extends Fragment implements OnClickListener, OnIte
|
|||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
instance = null;
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
public void invalidate() {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
|
|
|
@ -27,7 +27,6 @@ public class CallsVideo extends SampleTest {
|
|||
@MediumTest
|
||||
@LargeTest
|
||||
public void testAInit() {
|
||||
|
||||
//Enable video
|
||||
goToSettings();
|
||||
|
||||
|
@ -46,6 +45,8 @@ public class CallsVideo extends SampleTest {
|
|||
solo.goBack();
|
||||
solo.sleep(1000);
|
||||
Assert.assertTrue(LinphoneManager.getLc().isVideoEnabled());
|
||||
Assert.assertTrue(LinphoneManager.getLc().getVideoAutoAcceptPolicy());
|
||||
Assert.assertTrue(LinphoneManager.getLc().getVideoAutoInitiatePolicy());
|
||||
}
|
||||
|
||||
@SmallTest
|
||||
|
@ -53,6 +54,7 @@ public class CallsVideo extends SampleTest {
|
|||
@LargeTest
|
||||
public void testBOutgoingCallWithDefaultConfig() {
|
||||
LinphoneTestManager.getInstance().declineCall = false; // Just in case
|
||||
LinphoneTestManager.getLc().enableVideo(true, true);
|
||||
|
||||
solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain));
|
||||
solo.clickOnView(solo.getView(org.linphone.R.id.Call));
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.linphone.test;
|
|||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.linphone.ContactsFragment;
|
||||
import org.linphone.LinphoneActivity;
|
||||
|
||||
import android.test.suitebuilder.annotation.LargeTest;
|
||||
|
@ -50,6 +51,10 @@ public class Contacts extends SampleTest {
|
|||
solo.enterText(2, iContext.getString(org.linphone.test.R.string.contact_number));
|
||||
solo.clickOnText(aContext.getString(org.linphone.R.string.button_ok));
|
||||
|
||||
if (ContactsFragment.instance() != null) {
|
||||
ContactsFragment.instance().invalidate();
|
||||
solo.sleep(1000);
|
||||
}
|
||||
Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name)));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue