From 0660452851028838dcc0af7d2660e1c01046823a Mon Sep 17 00:00:00 2001 From: Bala Date: Sun, 23 Jun 2019 01:29:03 -0400 Subject: [PATCH 01/11] upgrading gradle --- .idea/gradle.xml | 3 + app/app.iml | 92 ++++++++++++------------ build.gradle | 4 +- gradle/wrapper/gradle-wrapper.properties | 5 +- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 7ac24c77..f43d4284 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -3,6 +3,9 @@ \ No newline at end of file diff --git a/build.gradle b/build.gradle index f1b98cf2..b5d98d11 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.1' + classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.google.gms:google-services:1.3.0-beta1' // NOTE: Do not place your application dependencies here; they belong @@ -23,7 +23,7 @@ buildscript { google() } dependencies { - classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' + classpath 'com.jakewharton:butterknife-gradle-plugin:9.0.0-rc2' } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d5d5c1c0..5c69f83c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,6 @@ -#Tue Nov 06 17:37:41 IST 2018 - +#Sun Jun 23 01:15:38 EDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip From f63f4a7fd48fbacba7c80ec3046c4f26d822336c Mon Sep 17 00:00:00 2001 From: Bala Date: Sun, 23 Jun 2019 01:44:11 -0400 Subject: [PATCH 02/11] first recording --- app/app.iml | 26 +++- app/build.gradle | 5 + .../minimaltodo/Main/MainActivityTest.java | 141 ++++++++++++++++++ 3 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java diff --git a/app/app.iml b/app/app.iml index dcaedb74..5978da24 100644 --- a/app/app.iml +++ b/app/app.iml @@ -93,7 +93,9 @@ + + @@ -128,18 +130,32 @@ - - - + + + + + + + + + + + + + + + - + + + - + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 865b2779..24dcaf05 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -18,6 +18,7 @@ android { targetSdkVersion 23 versionCode 3 versionName "1.2" + testInstrumentationRunner = 'android.support.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -43,4 +44,8 @@ dependencies { implementation 'com.android.support:design:23.1.0' implementation 'com.android.support:appcompat-v7:23.1.0' implementation 'com.android.support:support-v13:23.1.0' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2', { + exclude group: 'com.android.support', module: 'support-annotations' + } + androidTestImplementation 'com.android.support.test:rules:1.0.2' } diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java new file mode 100644 index 00000000..83dbbd9a --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java @@ -0,0 +1,141 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main; + + +import android.support.test.espresso.ViewInteraction; +import android.support.test.filters.LargeTest; +import android.support.test.rule.ActivityTestRule; +import android.support.test.runner.AndroidJUnit4; +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static android.support.test.espresso.Espresso.onView; +import static android.support.test.espresso.action.ViewActions.click; +import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard; +import static android.support.test.espresso.action.ViewActions.replaceText; +import static android.support.test.espresso.assertion.ViewAssertions.matches; +import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; +import static android.support.test.espresso.matcher.ViewMatchers.withClassName; +import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@LargeTest +@RunWith(AndroidJUnit4.class) +public class MainActivityTest { + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Test + public void mainActivityTest() { + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction floatingActionButton = onView( + allOf(withId(R.id.addToDoItemFAB), + childAtPosition( + allOf(withId(R.id.myCoordinatorLayout), + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 0)), + 2), + isDisplayed())); + floatingActionButton.perform(click()); + + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction appCompatEditText = onView( + allOf(withId(R.id.userToDoEditText), + childAtPosition( + allOf(withId(R.id.toDoCustomTextInput), + childAtPosition( + withId(R.id.editTextParentLinearLayout), + 0)), + 0), + isDisplayed())); + appCompatEditText.perform(replaceText("Hello"), closeSoftKeyboard()); + + ViewInteraction appCompatEditText2 = onView( + allOf(withId(R.id.userToDoDescription), + childAtPosition( + allOf(withId(R.id.toDoCustomTextInput01), + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 1)), + 0), + isDisplayed())); + appCompatEditText2.perform(replaceText("My first test"), closeSoftKeyboard()); + + ViewInteraction floatingActionButton2 = onView( + allOf(withId(R.id.makeToDoFloatingActionButton), + childAtPosition( + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 1), + 1), + isDisplayed())); + floatingActionButton2.perform(click()); + + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction textView = onView( + allOf(withId(R.id.toDoListItemTextview), withText("Hello"), + childAtPosition( + childAtPosition( + withId(R.id.listItemLinearLayout), + 1), + 0), + isDisplayed())); + textView.check(matches(withText("Hello"))); + } + + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} From 6823cfbcf22d2062593f4a0eca19e367cf6a8839 Mon Sep 17 00:00:00 2001 From: AlcirDavid Date: Mon, 24 Jun 2019 01:45:33 -0400 Subject: [PATCH 03/11] Fix compiling issues --- app/app.iml | 121 +++++++++++------- app/build.gradle | 21 +-- .../minimaltodo/Main/MainActivityTest.java | 26 ++-- .../minimaltodo/About/AboutActivity.java | 11 +- .../minimaltodo/About/AboutFragment.java | 6 +- .../minimaltodo/AddToDo/AddToDoActivity.java | 4 +- .../minimaltodo/AddToDo/AddToDoFragment.java | 15 +-- .../AppDefault/AppDefaultActivity.java | 10 +- .../AppDefault/AppDefaultFragment.java | 6 +- .../CustomRecyclerScrollViewListener.java | 2 +- .../minimaltodo/Main/MainActivity.java | 9 +- .../minimaltodo/Main/MainFragment.java | 17 +-- .../Reminder/ReminderActivity.java | 2 +- .../Reminder/ReminderFragment.java | 6 +- .../Settings/SettingsActivity.java | 9 +- .../Utility/CustomTextInputLayout.java | 4 +- .../Utility/ItemTouchHelperClass.java | 4 +- .../Utility/RecyclerViewEmptySupport.java | 3 +- .../Utility/ScrollingFABBehaviour.java | 8 +- .../main/res/layout/activity_add_to_do.xml | 4 +- app/src/main/res/layout/activity_main.xml | 6 +- app/src/main/res/layout/activity_settings.xml | 4 +- .../main/res/layout/activity_todo_test.xml | 12 +- app/src/main/res/layout/base_toolbar.xml | 4 +- .../main/res/layout/fragment_add_to_do.xml | 8 +- app/src/main/res/layout/fragment_main.xml | 39 +++--- app/src/main/res/layout/list_circle_try.xml | 15 ++- .../main/res/layout/list_item_view_future.xml | 2 +- app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/strings.xml | 2 + gradle.properties | 4 +- 31 files changed, 215 insertions(+), 170 deletions(-) diff --git a/app/app.iml b/app/app.iml index 5978da24..ce714188 100644 --- a/app/app.iml +++ b/app/app.iml @@ -4,6 +4,8 @@ @@ -32,15 +34,15 @@ - - - + + + - - + + @@ -70,13 +72,6 @@ - - - - - - - @@ -84,12 +79,18 @@ + + + + + + + - @@ -97,17 +98,10 @@ - - - - - - - @@ -115,12 +109,9 @@ - - - @@ -128,34 +119,76 @@ - + - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + - - - + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 24dcaf05..930c08f5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,15 +10,15 @@ android { storePassword '' } } - compileSdkVersion 23 + compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.avjindersinghsekhon.minimaltodo" minSdkVersion 16 - targetSdkVersion 23 + targetSdkVersion 28 versionCode 3 versionName "1.2" - testInstrumentationRunner = 'android.support.test.runner.AndroidJUnitRunner' + testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { @@ -34,18 +34,19 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.google.android.gms:play-services-analytics:7.8.0' + implementation 'com.google.android.gms:play-services-analytics:17.0.0' implementation 'uk.co.chrisjenx:calligraphy:2.1.0' implementation 'com.github.ganfra:material-spinner:1.1.0' implementation 'com.wdullaer:materialdatetimepicker:1.5.1' implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' implementation 'com.github.ganfra:material-spinner:1.1.0' - implementation 'com.android.support:recyclerview-v7:23.1.0' - implementation 'com.android.support:design:23.1.0' - implementation 'com.android.support:appcompat-v7:23.1.0' - implementation 'com.android.support:support-v13:23.1.0' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2', { + implementation 'androidx.recyclerview:recyclerview:1.0.0' + implementation 'com.google.android.material:material:1.1.0-alpha07' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.legacy:legacy-support-v13:1.0.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0', { exclude group: 'com.android.support', module: 'support-annotations' } - androidTestImplementation 'com.android.support.test:rules:1.0.2' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test:rules:1.2.0' } diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java index 83dbbd9a..893c65f4 100644 --- a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java @@ -1,10 +1,10 @@ package com.example.avjindersinghsekhon.minimaltodo.Main; -import android.support.test.espresso.ViewInteraction; -import android.support.test.filters.LargeTest; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.ext.junit.runners.AndroidJUnit4; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; @@ -18,15 +18,15 @@ import org.junit.Test; import org.junit.runner.RunWith; -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.click; -import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard; -import static android.support.test.espresso.action.ViewActions.replaceText; -import static android.support.test.espresso.assertion.ViewAssertions.matches; -import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; -import static android.support.test.espresso.matcher.ViewMatchers.withClassName; -import static android.support.test.espresso.matcher.ViewMatchers.withId; -import static android.support.test.espresso.matcher.ViewMatchers.withText; +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.replaceText; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.is; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutActivity.java index 95463fdb..d746b39e 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutActivity.java @@ -5,14 +5,15 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v4.app.NavUtils; -import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.MenuItem; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.Toolbar; +import androidx.core.app.NavUtils; +import androidx.fragment.app.Fragment; + import com.example.avjindersinghsekhon.minimaltodo.Analytics.AnalyticsApplication; import com.example.avjindersinghsekhon.minimaltodo.AppDefault.AppDefaultActivity; import com.example.avjindersinghsekhon.minimaltodo.Main.MainFragment; @@ -44,7 +45,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // mId = (UUID)i.getSerializableExtra(TodoNotificationService.TODOUUID); - final Drawable backArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha); + final Drawable backArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_material); if (backArrow != null) { backArrow.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP); } diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutFragment.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutFragment.java index 11e26df5..4d019c21 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutFragment.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/About/AboutFragment.java @@ -1,9 +1,9 @@ package com.example.avjindersinghsekhon.minimaltodo.About; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v7.widget.Toolbar; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.Toolbar; import android.view.View; import android.widget.TextView; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoActivity.java index cfe60324..78d52714 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoActivity.java @@ -1,8 +1,8 @@ package com.example.avjindersinghsekhon.minimaltodo.AddToDo; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; import com.example.avjindersinghsekhon.minimaltodo.AppDefault.AppDefaultActivity; import com.example.avjindersinghsekhon.minimaltodo.R; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoFragment.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoFragment.java index 01ea89a6..357e2040 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoFragment.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AddToDo/AddToDoFragment.java @@ -9,12 +9,6 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.NavUtils; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.SwitchCompat; -import android.support.v7.widget.Toolbar; import android.text.Editable; import android.text.TextWatcher; import android.text.format.DateFormat; @@ -28,15 +22,20 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; -import android.content.ClipboardManager; import android.widget.Toast; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.SwitchCompat; +import androidx.appcompat.widget.Toolbar; +import androidx.core.app.NavUtils; + import com.example.avjindersinghsekhon.minimaltodo.Analytics.AnalyticsApplication; import com.example.avjindersinghsekhon.minimaltodo.AppDefault.AppDefaultFragment; -import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; import com.example.avjindersinghsekhon.minimaltodo.Main.MainFragment; import com.example.avjindersinghsekhon.minimaltodo.R; import com.example.avjindersinghsekhon.minimaltodo.Utility.ToDoItem; +import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.wdullaer.materialdatetimepicker.date.DatePickerDialog; import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout; import com.wdullaer.materialdatetimepicker.time.TimePickerDialog; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultActivity.java index f856518f..ba84fa55 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultActivity.java @@ -1,11 +1,11 @@ package com.example.avjindersinghsekhon.minimaltodo.AppDefault; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.appcompat.app.AppCompatActivity; import com.example.avjindersinghsekhon.minimaltodo.R; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultFragment.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultFragment.java index 9c61f10f..66b269df 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultFragment.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/AppDefault/AppDefaultFragment.java @@ -1,9 +1,9 @@ package com.example.avjindersinghsekhon.minimaltodo.AppDefault; import android.os.Bundle; -import android.support.annotation.LayoutRes; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.LayoutRes; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/CustomRecyclerScrollViewListener.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/CustomRecyclerScrollViewListener.java index 78d61784..97479899 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/CustomRecyclerScrollViewListener.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/CustomRecyclerScrollViewListener.java @@ -1,6 +1,6 @@ package com.example.avjindersinghsekhon.minimaltodo.Main; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; public abstract class CustomRecyclerScrollViewListener extends RecyclerView.OnScrollListener { diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivity.java index a981c20f..97df9341 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivity.java @@ -2,12 +2,13 @@ import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.app.ActionBar; import android.view.Menu; import android.view.MenuItem; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.fragment.app.Fragment; + import com.example.avjindersinghsekhon.minimaltodo.About.AboutActivity; import com.example.avjindersinghsekhon.minimaltodo.AppDefault.AppDefaultActivity; import com.example.avjindersinghsekhon.minimaltodo.R; @@ -17,7 +18,7 @@ public class MainActivity extends AppDefaultActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - final android.support.v7.widget.Toolbar toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbar); + final androidx.appcompat.widget.Toolbar toolbar = (androidx.appcompat.widget.Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainFragment.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainFragment.java index 8577de1e..f84d64f0 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainFragment.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainFragment.java @@ -7,14 +7,6 @@ import android.graphics.Color; import android.graphics.Typeface; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.DefaultItemAnimator; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -27,6 +19,13 @@ import android.widget.LinearLayout; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import androidx.recyclerview.widget.DefaultItemAnimator; +import androidx.recyclerview.widget.ItemTouchHelper; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import com.amulyakhare.textdrawable.TextDrawable; import com.amulyakhare.textdrawable.util.ColorGenerator; import com.example.avjindersinghsekhon.minimaltodo.About.AboutActivity; @@ -42,6 +41,8 @@ import com.example.avjindersinghsekhon.minimaltodo.Utility.StoreRetrieveData; import com.example.avjindersinghsekhon.minimaltodo.Utility.ToDoItem; import com.example.avjindersinghsekhon.minimaltodo.Utility.TodoNotificationService; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; import org.json.JSONException; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderActivity.java index 15cc0e9c..4dca36bc 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderActivity.java @@ -1,7 +1,7 @@ package com.example.avjindersinghsekhon.minimaltodo.Reminder; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.example.avjindersinghsekhon.minimaltodo.AppDefault.AppDefaultActivity; import com.example.avjindersinghsekhon.minimaltodo.R; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderFragment.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderFragment.java index 0d4ca7a0..57db8d46 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderFragment.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Reminder/ReminderFragment.java @@ -4,9 +4,9 @@ import android.content.SharedPreferences; import android.graphics.Color; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Settings/SettingsActivity.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Settings/SettingsActivity.java index 30f5b588..19383b81 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Settings/SettingsActivity.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Settings/SettingsActivity.java @@ -5,11 +5,12 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.app.NavUtils; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.MenuItem; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.app.NavUtils; + import com.example.avjindersinghsekhon.minimaltodo.Analytics.AnalyticsApplication; import com.example.avjindersinghsekhon.minimaltodo.Main.MainFragment; import com.example.avjindersinghsekhon.minimaltodo.R; @@ -40,7 +41,7 @@ protected void onCreate(Bundle savedInstanceState) { Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); - final Drawable backArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha); + final Drawable backArrow = getResources().getDrawable(R.drawable.abc_ic_ab_back_material); if (backArrow != null) { backArrow.setColorFilter(Color.WHITE, PorterDuff.Mode.SRC_ATOP); diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/CustomTextInputLayout.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/CustomTextInputLayout.java index b6eb9d16..8e97e23b 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/CustomTextInputLayout.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/CustomTextInputLayout.java @@ -3,8 +3,8 @@ import android.content.Context; import android.graphics.Canvas; -import android.support.design.widget.TextInputLayout; -import android.support.v4.view.ViewCompat; +import com.google.android.material.textfield.TextInputLayout; +import androidx.core.view.ViewCompat; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ItemTouchHelperClass.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ItemTouchHelperClass.java index aceba80d..a14ed28b 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ItemTouchHelperClass.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ItemTouchHelperClass.java @@ -1,7 +1,7 @@ package com.example.avjindersinghsekhon.minimaltodo.Utility; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.ItemTouchHelper; public class ItemTouchHelperClass extends ItemTouchHelper.Callback { private ItemTouchHelperAdapter adapter; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/RecyclerViewEmptySupport.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/RecyclerViewEmptySupport.java index 688577b0..84a95dde 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/RecyclerViewEmptySupport.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/RecyclerViewEmptySupport.java @@ -1,10 +1,11 @@ package com.example.avjindersinghsekhon.minimaltodo.Utility; import android.content.Context; -import android.support.v7.widget.RecyclerView; import android.util.AttributeSet; import android.view.View; +import androidx.recyclerview.widget.RecyclerView; + public class RecyclerViewEmptySupport extends RecyclerView { private View emptyView; diff --git a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ScrollingFABBehaviour.java b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ScrollingFABBehaviour.java index ac1cdfbb..752a22cb 100644 --- a/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ScrollingFABBehaviour.java +++ b/app/src/main/java/com/example/avjindersinghsekhon/minimaltodo/Utility/ScrollingFABBehaviour.java @@ -1,10 +1,10 @@ package com.example.avjindersinghsekhon.minimaltodo.Utility; import android.content.Context; -import android.support.design.widget.CoordinatorLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.Toolbar; +import androidx.coordinatorlayout.widget.CoordinatorLayout; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; +import androidx.appcompat.widget.Toolbar; import android.util.AttributeSet; import android.view.View; diff --git a/app/src/main/res/layout/activity_add_to_do.xml b/app/src/main/res/layout/activity_add_to_do.xml index 0a1fcc4f..b8c8f60a 100644 --- a/app/src/main/res/layout/activity_add_to_do.xml +++ b/app/src/main/res/layout/activity_add_to_do.xml @@ -1,4 +1,4 @@ - - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 19f8ae7a..6cc0461c 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -6,9 +6,9 @@ android:layout_height="match_parent" android:orientation="vertical"> - @@ -16,5 +16,5 @@ - + diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 3bb3d02d..6af3d6a0 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -6,7 +6,7 @@ android:layout_width="match_parent" > - - + - @@ -93,7 +93,7 @@ android:textColor="@color/secondary_text" android:textSize="16sp" /> - - - - + + diff --git a/app/src/main/res/layout/base_toolbar.xml b/app/src/main/res/layout/base_toolbar.xml index 00d364c5..4b62053f 100644 --- a/app/src/main/res/layout/base_toolbar.xml +++ b/app/src/main/res/layout/base_toolbar.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/main/res/layout/fragment_add_to_do.xml b/app/src/main/res/layout/fragment_add_to_do.xml index 6f7fb117..ee59fdc8 100644 --- a/app/src/main/res/layout/fragment_add_to_do.xml +++ b/app/src/main/res/layout/fragment_add_to_do.xml @@ -9,7 +9,7 @@ - @@ -121,7 +121,7 @@ android:textColor="@color/secondary_text" android:textSize="16sp" /> - - - + diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 946ea4e6..d20f993f 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -1,17 +1,18 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/myParentLayout" + android:layout_width="match_parent" + android:orientation="vertical" + android:gravity="center" + android:layout_height="match_parent"> - + - + android:layout_height="match_parent" + android:background="@color/white" + tools:listitem="@android:layout/simple_list_item_checked" + app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" + /> - - - + diff --git a/app/src/main/res/layout/list_circle_try.xml b/app/src/main/res/layout/list_circle_try.xml index 86280a23..467317de 100644 --- a/app/src/main/res/layout/list_circle_try.xml +++ b/app/src/main/res/layout/list_circle_try.xml @@ -1,12 +1,13 @@ + android:layout_width="match_parent" + android:id="@+id/listItemLinearLayout" + android:layout_marginBottom="1dp" + android:gravity="center" + android:orientation="horizontal" + android:layout_height="wrap_content" + android:background="@color/white" + xmlns:tools="http://schemas.android.com/tools"> #727272 #FFFFFF #B6B6B6 + #FFFFFF #757575 #E0E0E0 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index eca435ed..7d28dc83 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,4 +29,6 @@ Snooze Remove Please enter a Todo + + com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior diff --git a/gradle.properties b/gradle.properties index 1d3591c8..915f0e66 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,6 @@ # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true \ No newline at end of file +# org.gradle.parallel=true +android.enableJetifier=true +android.useAndroidX=true \ No newline at end of file From 16807fa1e88ed0835fab57576b6987e06856b889 Mon Sep 17 00:00:00 2001 From: Bala Date: Tue, 25 Jun 2019 02:08:13 -0400 Subject: [PATCH 04/11] Recorded two scripts --- .../minimaltodo/ApplicationTest.java | 13 -- .../Main/{MainActivityTest.java => Save.java} | 54 ++---- .../Main/SaveWithReminderData.java | 169 ++++++++++++++++++ .../minimaltodo/TestStoreRetrieveData.java | 49 ++--- .../minimaltodo/TestTodoItem.java | 35 ++-- 5 files changed, 234 insertions(+), 86 deletions(-) delete mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/ApplicationTest.java rename app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/{MainActivityTest.java => Save.java} (70%) create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/SaveWithReminderData.java diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/ApplicationTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/ApplicationTest.java deleted file mode 100644 index 259de29f..00000000 --- a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/ApplicationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.avjindersinghsekhon.minimaltodo; - -import android.app.Application; -import android.test.ApplicationTestCase; - -/** - * Testing Fundamentals - */ -public class ApplicationTest extends ApplicationTestCase { - public ApplicationTest() { - super(Application.class); - } -} \ No newline at end of file diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Save.java similarity index 70% rename from app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java rename to app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Save.java index 893c65f4..1448b26e 100644 --- a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/MainActivityTest.java +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Save.java @@ -1,14 +1,15 @@ package com.example.avjindersinghsekhon.minimaltodo.Main; -import androidx.test.espresso.ViewInteraction; -import androidx.test.filters.LargeTest; -import androidx.test.rule.ActivityTestRule; -import androidx.test.ext.junit.runners.AndroidJUnit4; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + import com.example.avjindersinghsekhon.minimaltodo.R; import org.hamcrest.Description; @@ -26,13 +27,12 @@ import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.withClassName; import static androidx.test.espresso.matcher.ViewMatchers.withId; -import static androidx.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.Matchers.allOf; import static org.hamcrest.Matchers.is; @LargeTest @RunWith(AndroidJUnit4.class) -public class MainActivityTest { +public class Save { @Rule public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); @@ -43,7 +43,7 @@ public void mainActivityTest() { // The recommended way to handle such scenarios is to use Espresso idling resources: // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html try { - Thread.sleep(7000); + Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } @@ -53,7 +53,7 @@ public void mainActivityTest() { childAtPosition( allOf(withId(R.id.myCoordinatorLayout), childAtPosition( - withClassName(is("android.widget.LinearLayout")), + withId(R.id.myParentLayout), 0)), 2), isDisplayed())); @@ -63,7 +63,7 @@ public void mainActivityTest() { // The recommended way to handle such scenarios is to use Espresso idling resources: // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html try { - Thread.sleep(7000); + Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } @@ -71,24 +71,22 @@ public void mainActivityTest() { ViewInteraction appCompatEditText = onView( allOf(withId(R.id.userToDoEditText), childAtPosition( - allOf(withId(R.id.toDoCustomTextInput), - childAtPosition( - withId(R.id.editTextParentLinearLayout), - 0)), + childAtPosition( + withId(R.id.toDoCustomTextInput), + 0), 0), isDisplayed())); - appCompatEditText.perform(replaceText("Hello"), closeSoftKeyboard()); + appCompatEditText.perform(replaceText("Title"), closeSoftKeyboard()); ViewInteraction appCompatEditText2 = onView( allOf(withId(R.id.userToDoDescription), childAtPosition( - allOf(withId(R.id.toDoCustomTextInput01), - childAtPosition( - withClassName(is("android.widget.LinearLayout")), - 1)), + childAtPosition( + withId(R.id.toDoCustomTextInput01), + 0), 0), isDisplayed())); - appCompatEditText2.perform(replaceText("My first test"), closeSoftKeyboard()); + appCompatEditText2.perform(replaceText("Description Test"), closeSoftKeyboard()); ViewInteraction floatingActionButton2 = onView( allOf(withId(R.id.makeToDoFloatingActionButton), @@ -100,24 +98,6 @@ public void mainActivityTest() { isDisplayed())); floatingActionButton2.perform(click()); - // Added a sleep statement to match the app's execution delay. - // The recommended way to handle such scenarios is to use Espresso idling resources: - // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html - try { - Thread.sleep(7000); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - ViewInteraction textView = onView( - allOf(withId(R.id.toDoListItemTextview), withText("Hello"), - childAtPosition( - childAtPosition( - withId(R.id.listItemLinearLayout), - 1), - 0), - isDisplayed())); - textView.check(matches(withText("Hello"))); } private static Matcher childAtPosition( diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/SaveWithReminderData.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/SaveWithReminderData.java new file mode 100644 index 00000000..cba0a2e2 --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/SaveWithReminderData.java @@ -0,0 +1,169 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main; + + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.replaceText; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@LargeTest +@RunWith(AndroidJUnit4.class) +public class SaveWithReminderData { + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Test + public void mainActivityTest2() { + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction floatingActionButton = onView( + allOf(withId(R.id.addToDoItemFAB), + childAtPosition( + allOf(withId(R.id.myCoordinatorLayout), + childAtPosition( + withId(R.id.myParentLayout), + 0)), + 2), + isDisplayed())); + floatingActionButton.perform(click()); + + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction appCompatEditText = onView( + allOf(withId(R.id.userToDoEditText), + childAtPosition( + childAtPosition( + withId(R.id.toDoCustomTextInput), + 0), + 0), + isDisplayed())); + appCompatEditText.perform(replaceText("Test 2"), closeSoftKeyboard()); + + ViewInteraction appCompatEditText2 = onView( + allOf(withId(R.id.userToDoDescription), + childAtPosition( + childAtPosition( + withId(R.id.toDoCustomTextInput01), + 0), + 0), + isDisplayed())); + appCompatEditText2.perform(replaceText("Desc%"), closeSoftKeyboard()); + + ViewInteraction switchCompat = onView( + allOf(withId(R.id.toDoHasDateSwitchCompat), + childAtPosition( + childAtPosition( + withId(R.id.todoReminderAndDateContainerLayout), + 0), + 2), + isDisplayed())); + switchCompat.perform(click()); + + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(7000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction appCompatEditText3 = onView( + allOf(withId(R.id.newTodoTimeEditText), withText("3:00 AM"), + childAtPosition( + childAtPosition( + withId(R.id.toDoEnterDateLinearLayout), + 0), + 2), + isDisplayed())); + appCompatEditText3.perform(click()); + + // Added a sleep statement to match the app's execution delay. + // The recommended way to handle such scenarios is to use Espresso idling resources: + // https://google.github.io/android-testing-support-library/docs/espresso/idling-resource/index.html + try { + Thread.sleep(100); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + ViewInteraction appCompatButton = onView( + allOf(withId(R.id.ok), withText("OK"), + childAtPosition( + allOf(withId(R.id.done_background), + childAtPosition( + withId(R.id.time_picker_dialog), + 1)), + 1), + isDisplayed())); + appCompatButton.perform(click()); + + ViewInteraction floatingActionButton2 = onView( + allOf(withId(R.id.makeToDoFloatingActionButton), + childAtPosition( + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 1), + 1), + isDisplayed())); + floatingActionButton2.perform(click()); + } + + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestStoreRetrieveData.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestStoreRetrieveData.java index f698fe54..01e0a30c 100644 --- a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestStoreRetrieveData.java +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestStoreRetrieveData.java @@ -24,13 +24,20 @@ package com.example.avjindersinghsekhon.minimaltodo; import android.content.Context; -import android.test.ActivityUnitTestCase; + +import androidx.test.platform.app.InstrumentationRegistry; import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.Main.MainFragment; import com.example.avjindersinghsekhon.minimaltodo.Utility.StoreRetrieveData; import com.example.avjindersinghsekhon.minimaltodo.Utility.ToDoItem; +import org.junit.After; +import org.junit.Assert; + import org.json.JSONArray; +import org.junit.Before; +import org.junit.Test; import java.util.ArrayList; import java.util.Date; @@ -38,29 +45,28 @@ /** * Test cases for StoreRetrieveData class */ -public class TestStoreRetrieveData extends ActivityUnitTestCase { +public class TestStoreRetrieveData{ private MainActivity mMainActivity; private ArrayList mOriginalData; ArrayList mTestData; + public TestStoreRetrieveData() { - super(MainActivity.class); // Create some test data mTestData = new ArrayList<>(); for (int i = 1; i < 11; i++) { mTestData.add(new ToDoItem( - "item" + i, + "item" + i,"item Desc" + i, false, new Date())); } } - @Override + @Before protected void setUp() throws Exception { - super.setUp(); - mMainActivity = getActivity(); + mMainActivity = new MainActivity(); mOriginalData = new ArrayList<>(); // Save the original data and wipe out the storage @@ -77,14 +83,12 @@ protected void setUp() throws Exception { } } catch (Exception e) { - fail("Couldn't store data: " + e.getMessage()); + Assert.fail("Couldn't store data: " + e.getMessage()); } } - @Override + @After protected void tearDown() throws Exception { - super.tearDown(); - // Let's restore the data we might have wiped out during setUp()... StoreRetrieveData dataStorage = getDataStorage(); dataStorage.saveToFile(mOriginalData); @@ -93,6 +97,7 @@ protected void tearDown() throws Exception { /** * We should have an empty data storage at hand for the starters */ + @Test public void testPreconditions() { StoreRetrieveData dataStorage = getDataStorage(); @@ -100,15 +105,16 @@ public void testPreconditions() { try { items = dataStorage.loadFromFile(); } catch (Exception e) { - fail("Couldn't read from data storage: " + e.getMessage()); + Assert.fail("Couldn't read from data storage: " + e.getMessage()); } - assertEquals(0, items.size()); + Assert.assertEquals(0, items.size()); } /** * Write items to data storage and ensure those same items can be retrieved from the storage. */ + @Test public void testWritingToAndReadingFromTheDataStorage() { StoreRetrieveData dataStorage = getDataStorage(); ArrayList retrievedItems = new ArrayList<>(); @@ -117,18 +123,18 @@ public void testWritingToAndReadingFromTheDataStorage() { try { dataStorage.saveToFile(mTestData); } catch (Exception e) { - fail("Couldn't store data: " + e.getMessage()); + Assert.fail("Couldn't store data: " + e.getMessage()); } // Read from storage try { retrievedItems = dataStorage.loadFromFile(); } catch (Exception e) { - fail("Couldn't read from data storage: " + e.getMessage()); + Assert.fail("Couldn't read from data storage: " + e.getMessage()); } // We should have equal amount of items than what we just stored - assertEquals(mTestData.size(), retrievedItems.size()); + Assert.assertEquals(mTestData.size(), retrievedItems.size()); // The content should be same as well... for (ToDoItem retrievedItem : retrievedItems) { @@ -149,7 +155,7 @@ public void testWritingToAndReadingFromTheDataStorage() { } if (!found) { - fail("Content mis-match between test data and data retrieved from the storage!"); + Assert.fail("Content mis-match between test data and data retrieved from the storage!"); } } } @@ -157,17 +163,18 @@ public void testWritingToAndReadingFromTheDataStorage() { /** * Ensure JSONArray conversion works as intended */ + @Test public void testArrayListToJsonArrayConversion() { try { JSONArray array = StoreRetrieveData.toJSONArray(mTestData); - assertEquals(mTestData.size(), array.length()); + Assert.assertEquals(mTestData.size(), array.length()); } catch (Exception e) { - fail("Exception thrown when converting to JSONArray: " + e.getMessage()); + Assert.fail("Exception thrown when converting to JSONArray: " + e.getMessage()); } } private StoreRetrieveData getDataStorage() { - Context context = getInstrumentation().getTargetContext(); - return new StoreRetrieveData(context, MainActivity.FILENAME); + Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); + return new StoreRetrieveData(context, MainFragment.FILENAME); } } diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestTodoItem.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestTodoItem.java index 8a4faf04..14c78b13 100644 --- a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestTodoItem.java +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/TestTodoItem.java @@ -25,17 +25,19 @@ import com.example.avjindersinghsekhon.minimaltodo.Utility.ToDoItem; -import junit.framework.TestCase; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Assert; +import org.junit.Test; + import java.util.Date; /** * JUnit tests to verify functionality of ToDoItem class. */ -public class TestTodoItem extends TestCase { +public class TestTodoItem { private final Date CURRENT_DATE = new Date(); private final String TEXT_BODY = "This is some text"; private final boolean REMINDER_OFF = false; @@ -44,32 +46,35 @@ public class TestTodoItem extends TestCase { /** * Check we can construct a ToDoItem object using the three parameter constructor */ + @Test public void testThreeParameterConstructor() { ToDoItem toDoItem = getToDoItem(REMINDER_OFF); - assertEquals(TEXT_BODY, toDoItem.getToDoText()); - assertEquals(REMINDER_OFF, toDoItem.hasReminder()); - assertEquals(CURRENT_DATE, toDoItem.getToDoDate()); + Assert.assertEquals(TEXT_BODY, toDoItem.getToDoText()); + Assert.assertEquals(REMINDER_OFF, toDoItem.hasReminder()); + Assert.assertEquals(CURRENT_DATE, toDoItem.getToDoDate()); } /** * Ensure we can marshall ToDoItem objects to Json */ + @Test public void testObjectMarshallingToJson() { ToDoItem toDoItem = getToDoItem(REMINDER_ON); try { JSONObject json = toDoItem.toJSON(); - assertEquals(TEXT_BODY, json.getString("todotext")); - assertEquals(REMINDER_ON, json.getBoolean("todoreminder")); - assertEquals(String.valueOf(CURRENT_DATE.getTime()), json.getString("tododate")); + Assert.assertEquals(TEXT_BODY, json.getString("todotext")); + Assert.assertEquals(REMINDER_ON, json.getBoolean("todoreminder")); + Assert.assertEquals(String.valueOf(CURRENT_DATE.getTime()), json.getString("tododate")); } catch (JSONException e) { - fail("Exception thrown during test execution: " + e.getMessage()); + Assert.fail("Exception thrown during test execution: " + e.getMessage()); } } /** * Ensure we can create ToDoItem objects from Json data by using the json constructor */ + @Test public void testObjectUnmarshallingFromJson() { ToDoItem originalItem = getToDoItem(REMINDER_OFF); @@ -77,17 +82,17 @@ public void testObjectUnmarshallingFromJson() { JSONObject json = originalItem.toJSON(); ToDoItem itemFromJson = new ToDoItem(json); - assertEquals(originalItem.getToDoText(), itemFromJson.getToDoText()); - assertEquals(originalItem.getToDoDate(), itemFromJson.getToDoDate()); - assertEquals(originalItem.hasReminder(), itemFromJson.hasReminder()); - assertEquals(originalItem.getIdentifier(), itemFromJson.getIdentifier()); + Assert.assertEquals(originalItem.getToDoText(), itemFromJson.getToDoText()); + Assert.assertEquals(originalItem.getToDoDate(), itemFromJson.getToDoDate()); + Assert.assertEquals(originalItem.hasReminder(), itemFromJson.hasReminder()); + Assert.assertEquals(originalItem.getIdentifier(), itemFromJson.getIdentifier()); } catch (JSONException e) { - fail("Exception thrown during test execution: " + e.getMessage()); + Assert.fail("Exception thrown during test execution: " + e.getMessage()); } } private ToDoItem getToDoItem(boolean hasReminder) { - return new ToDoItem(TEXT_BODY, hasReminder, CURRENT_DATE); + return new ToDoItem(TEXT_BODY,TEXT_BODY, hasReminder, CURRENT_DATE); } } From 5ef8545b5bf51d7442ce24aadf55ee1b83e715ea Mon Sep 17 00:00:00 2001 From: Bala Date: Thu, 4 Jul 2019 15:29:52 -0400 Subject: [PATCH 05/11] Bala Commit test case --- .../minimaltodo/Main/Bala/BalaTestSuite.java | 15 ++ .../minimaltodo/Main/Bala/DeletePageTest.java | 85 ++++++++++++ .../Main/Bala/DeleteUndoPageTest.java | 102 ++++++++++++++ .../Main/Bala/EditClosePageTest.java | 116 ++++++++++++++++ .../Main/Bala/EditModifyClosePageTest.java | 131 ++++++++++++++++++ .../Main/Bala/EditModifySavePageTest.java | 122 ++++++++++++++++ .../Main/Bala/EditVerifyClosePageTest.java | 119 ++++++++++++++++ .../minimaltodo/Main/Bala/ListPageTest.java | 98 +++++++++++++ 8 files changed, 788 insertions(+) create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/BalaTestSuite.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeletePageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeleteUndoPageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditClosePageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifyClosePageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifySavePageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditVerifyClosePageTest.java create mode 100644 app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/ListPageTest.java diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/BalaTestSuite.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/BalaTestSuite.java new file mode 100644 index 00000000..d6241c0b --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/BalaTestSuite.java @@ -0,0 +1,15 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +/** + * Runs all unit tests. + */ +@RunWith(Suite.class) +@Suite.SuiteClasses({DeletePageTest.class , + + ListPageTest.class,EditClosePageTest.class +,EditModifyClosePageTest.class,EditModifySavePageTest.class,EditVerifyClosePageTest.class,DeleteUndoPageTest.class,}) +public class BalaTestSuite { +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeletePageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeletePageTest.java new file mode 100644 index 00000000..850ac86b --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeletePageTest.java @@ -0,0 +1,85 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.action.ViewActions.click; +import static org.hamcrest.Matchers.allOf; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class DeletePageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void delete() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeleteUndoPageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeleteUndoPageTest.java new file mode 100644 index 00000000..c8d95e1d --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/DeleteUndoPageTest.java @@ -0,0 +1,102 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class DeleteUndoPageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void delete() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + try { + Thread.sleep(20); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + /* ViewInteraction appCompatButton = onView( + allOf(withId(R.id.snackbar_action), withText("UNDO"), + childAtPosition( + childAtPosition( + withClassName(is("com.google.android.material.snackbar.Snackbar$SnackbarLayout")), + 0), + 1), + isDisplayed())); + appCompatButton.perform(click());*/ + } + + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditClosePageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditClosePageTest.java new file mode 100644 index 00000000..3d2cfc31 --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditClosePageTest.java @@ -0,0 +1,116 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class EditClosePageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void edit() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(click()); + ViewInteraction appCompatImageButton = onView( + allOf(withContentDescription("Navigate up"), + childAtPosition( + allOf(withId(R.id.toolbar), + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 0)), + 0), + isDisplayed())); + appCompatImageButton.perform(click()); + + } + @After + public void delete() { + + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifyClosePageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifyClosePageTest.java new file mode 100644 index 00000000..a661b51e --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifyClosePageTest.java @@ -0,0 +1,131 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.replaceText; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class EditModifyClosePageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + private static final String REPLACE_TITLE = "Replace Test Title"; + private static final String REPLACE_DESCRIPTION = "Replace Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void edit() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(click()); + onView(withId(R.id.userToDoEditText)).perform(replaceText(REPLACE_TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(replaceText(REPLACE_DESCRIPTION), closeSoftKeyboard()); + ViewInteraction appCompatImageButton = onView( + allOf(withContentDescription("Navigate up"), + childAtPosition( + allOf(withId(R.id.toolbar), + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 0)), + 0), + isDisplayed())); + appCompatImageButton.perform(click()); + ViewInteraction textView2 = onView( + allOf(withId(R.id.toDoListItemTextview), + childAtPosition( + childAtPosition( + withId(R.id.listItemLinearLayout), + 1), + 0), + isDisplayed())); + textView2.check(matches(withText(TITLE))); + } + @After + public void delete() { + + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifySavePageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifySavePageTest.java new file mode 100644 index 00000000..7434fe4d --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditModifySavePageTest.java @@ -0,0 +1,122 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.replaceText; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class EditModifySavePageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + private static final String REPLACE_TITLE = "Replace Test Title"; + private static final String REPLACE_DESCRIPTION = "Replace Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void edit() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(click()); + onView(withId(R.id.userToDoEditText)).perform(replaceText(REPLACE_TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(replaceText(REPLACE_DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + ViewInteraction textView2 = onView( + allOf(withId(R.id.toDoListItemTextview), + childAtPosition( + childAtPosition( + withId(R.id.listItemLinearLayout), + 1), + 0), + isDisplayed())); + textView2.check(matches(withText(REPLACE_TITLE))); + } + @After + public void delete() { + + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditVerifyClosePageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditVerifyClosePageTest.java new file mode 100644 index 00000000..dd33dbac --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/EditVerifyClosePageTest.java @@ -0,0 +1,119 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withClassName; +import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; +import static org.hamcrest.Matchers.allOf; +import static org.hamcrest.Matchers.is; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class EditVerifyClosePageTest { + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + @Test + public void edit() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(click()); + onView(withId(R.id.userToDoEditText)).check(matches(withText(TITLE))); + ViewInteraction appCompatImageButton = onView( + allOf(withContentDescription("Navigate up"), + childAtPosition( + allOf(withId(R.id.toolbar), + childAtPosition( + withClassName(is("android.widget.LinearLayout")), + 0)), + 0), + isDisplayed())); + appCompatImageButton.perform(click()); + + } + @After + public void delete() { + + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } +} diff --git a/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/ListPageTest.java b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/ListPageTest.java new file mode 100644 index 00000000..f2c04e14 --- /dev/null +++ b/app/src/androidTest/java/com/example/avjindersinghsekhon/minimaltodo/Main/Bala/ListPageTest.java @@ -0,0 +1,98 @@ +package com.example.avjindersinghsekhon.minimaltodo.Main.Bala; + +import android.view.View; +import android.view.ViewGroup; +import android.view.ViewParent; + +import androidx.recyclerview.widget.RecyclerView; +import androidx.test.espresso.ViewInteraction; +import androidx.test.filters.LargeTest; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; + +import com.example.avjindersinghsekhon.minimaltodo.Main.MainActivity; +import com.example.avjindersinghsekhon.minimaltodo.R; + +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.hamcrest.TypeSafeMatcher; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; +import static androidx.test.espresso.action.ViewActions.swipeLeft; +import static androidx.test.espresso.action.ViewActions.typeText; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.action.ViewActions.click; +import static org.hamcrest.Matchers.allOf; + +@RunWith(AndroidJUnit4.class) +@LargeTest +public class ListPageTest { + + private static final String TITLE = "Test Title"; + private static final String DESCRIPTION = "Test Description"; + + @Rule + public ActivityTestRule mActivityTestRule = new ActivityTestRule<>(MainActivity.class); + + @Before + public void init() { + onView(withId(R.id.addToDoItemFAB)).perform(click()); + onView(withId(R.id.userToDoEditText)).perform(typeText(TITLE), closeSoftKeyboard()); + onView(withId(R.id.userToDoDescription)).perform(typeText(DESCRIPTION), closeSoftKeyboard()); + onView(withId(R.id.makeToDoFloatingActionButton)).perform(click()); + } + + @Test + public void list() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + + } + + @After + public void delete() { + RecyclerView recyclerView = mActivityTestRule.getActivity().findViewById(R.id.toDoRecyclerView); + int itemCount = recyclerView.getAdapter().getItemCount(); + System.out.println(itemCount); + ViewInteraction linearLayout = onView( + allOf(withId(R.id.listItemLinearLayout), + childAtPosition( + allOf(withId(R.id.toDoRecyclerView), + childAtPosition( + withId(R.id.myCoordinatorLayout), + 1)), + 0), + isDisplayed())); + linearLayout.perform(swipeLeft()); + + } + private static Matcher childAtPosition( + final Matcher parentMatcher, final int position) { + + return new TypeSafeMatcher() { + @Override + public void describeTo(Description description) { + description.appendText("Child at position " + position + " in parent "); + parentMatcher.describeTo(description); + } + + @Override + public boolean matchesSafely(View view) { + ViewParent parent = view.getParent(); + return parent instanceof ViewGroup && parentMatcher.matches(parent) + && view.equals(((ViewGroup) parent).getChildAt(position)); + } + }; + } + + + +} From 8a09a043cce4348f750bbcad4933dd5c15cb383c Mon Sep 17 00:00:00 2001 From: AlcirDavid Date: Thu, 4 Jul 2019 16:33:12 -0400 Subject: [PATCH 06/11] update tools.build:gradle version --- .idea/misc.xml | 20 ++- app/app.iml | 161 +++++++++-------------- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 +- 4 files changed, 85 insertions(+), 102 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 99202cc2..64a67ca1 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,27 +5,41 @@ - + diff --git a/app/app.iml b/app/app.iml index ce714188..fa1249b5 100644 --- a/app/app.iml +++ b/app/app.iml @@ -5,7 +5,7 @@ @@ -26,24 +26,24 @@ - - + + - + - + - + @@ -86,109 +86,78 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + + + + - - - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle index b5d98d11..a35f06ea 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + classpath 'com.android.tools.build:gradle:3.5.0-beta05' classpath 'com.google.gms:google-services:1.3.0-beta1' // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5c69f83c..8de23213 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Jun 23 01:15:38 EDT 2019 +#Thu Jul 04 16:31:34 EDT 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip From 750440858b1297c0c480cc65dc6ed012350f7f6c Mon Sep 17 00:00:00 2001 From: AlcirDavid Date: Fri, 5 Jul 2019 20:18:33 -0400 Subject: [PATCH 07/11] update gradle version --- app/app.iml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/app.iml b/app/app.iml index fa1249b5..1d9ddac4 100644 --- a/app/app.iml +++ b/app/app.iml @@ -4,7 +4,7 @@ @@ -20,7 +20,7 @@