From 2acaf9b2490beb447406692674a7da2f6e458830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=E2=89=A1ZRS?= <12814349+LZRS@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:47:20 +0300 Subject: [PATCH] Fix failing testOnClickShouldDisplayDatePickerDialog Use normal Activity instead of AndroidX Activity --- .../JsonWizardFormFragmentPresenterRoboelectricTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/presenters/JsonWizardFormFragmentPresenterRoboelectricTest.java b/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/presenters/JsonWizardFormFragmentPresenterRoboelectricTest.java index 2c0bb07ee..42ba25609 100644 --- a/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/presenters/JsonWizardFormFragmentPresenterRoboelectricTest.java +++ b/android-json-form-wizard/src/test/java/com/vijay/jsonwizard/presenters/JsonWizardFormFragmentPresenterRoboelectricTest.java @@ -6,7 +6,6 @@ import android.content.pm.PackageManager; import android.net.Uri; import android.provider.MediaStore; -import androidx.appcompat.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.View; import android.widget.LinearLayout; @@ -162,7 +161,7 @@ public void testOnClickShouldSOpenPictureTakingActivity() { public void testOnClickShouldDisplayDatePickerDialog() { LinearLayout view = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.native_form_compound_button_parent, null); CustomTextView customTextView = new CustomTextView(context); - Activity activity = Robolectric.buildActivity(AppCompatActivity.class).create().get(); + Activity activity = Robolectric.buildActivity(Activity.class).create().get(); RadioButton radioButton = new RadioButton(context); view.setTag(R.id.specify_textview, customTextView); view.setTag(R.id.native_radio_button, radioButton);