From 920a0619a1535b79e8a8b52aa70ecd0024f7eada Mon Sep 17 00:00:00 2001 From: Tongyu Li Date: Thu, 30 Nov 2023 19:35:27 -0800 Subject: [PATCH 1/7] codacy fix trial 1 --- .../BookCancelStudyRoomsFailure2ATest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java index 48377ad..54e167b 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java @@ -51,7 +51,7 @@ public void bookStudyRoomFailure2ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + Matchers(ViewMatchers(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), From 08446507b5d4683a69de12445a147cad1d6b0800 Mon Sep 17 00:00:00 2001 From: Tongyu Li Date: Thu, 30 Nov 2023 19:48:46 -0800 Subject: [PATCH 2/7] codacy fix trial 2 --- .../BookCancelStudyRoomSuccessTest.java | 3 ++- .../BookCancelStudyRoomsFailure2ATest.java | 3 +-- .../BookCancelStudyRoomsFailure4ATest.java | 3 +-- .../ConfirmAttendanceFailure3ATest.java | 3 +-- .../ConfirmAttendanceSuccessTest.java | 3 +-- .../FilterStudyRoomsFailure8ATest.java | 3 +-- .../FilterStudyRoomsFailure8BTest.java | 3 +-- .../FilterStudyRoomsSuccessTest.java | 3 +-- .../AttendanceConfirmationIn3ClicksTest.java | 3 +-- .../SearchFilterShowsResultsIn1SecondTest.java | 3 +-- .../main/java/com/javajedis/bookit/SearchActivity.java | 10 +++------- 11 files changed, 14 insertions(+), 26 deletions(-) diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java index e5601df..8c59967 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java @@ -18,6 +18,7 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; +import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -54,7 +55,7 @@ public void bookCancelStudyRoomSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java index 54e167b..79fa315 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java @@ -32,7 +32,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.junit.Rule; import org.junit.Test; @@ -51,7 +50,7 @@ public void bookStudyRoomFailure2ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers(ViewMatchers(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java index a0ab75b..25a1e77 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java @@ -34,7 +34,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -56,7 +55,7 @@ public void bookCancelFailure4ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java index d0d5765..67db3ba 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java @@ -31,7 +31,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.junit.Rule; import org.junit.Test; @@ -55,7 +54,7 @@ public void confirmAttendanceFailure3ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java index 3ca143d..60f7cac 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java @@ -30,7 +30,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -56,7 +55,7 @@ public void confirmAttendanceSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java index 2452655..811e627 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java @@ -28,7 +28,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.junit.Rule; import org.junit.Test; @@ -47,7 +46,7 @@ public void filterStudyRoomsFailure8ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java index d46ce1c..bd0f288 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java @@ -33,7 +33,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -59,7 +58,7 @@ public void filterStudyRoomsFailure8BTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java index 6d4aad8..c9bb9d0 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java @@ -35,7 +35,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -61,7 +60,7 @@ public void filterStudyRoomsSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java index ba13794..f6f0c8c 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java @@ -31,7 +31,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -57,7 +56,7 @@ public void attendanceConfirmationIn3ClicksTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java index 3494285..549c08b 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java @@ -36,7 +36,6 @@ import org.hamcrest.Description; import org.hamcrest.Matcher; -import org.hamcrest.Matchers; import org.hamcrest.TypeSafeMatcher; import org.hamcrest.core.IsInstanceOf; import org.junit.Rule; @@ -61,7 +60,7 @@ public void filterStudyRoomsSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(ViewMatchers.withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/main/java/com/javajedis/bookit/SearchActivity.java b/front_end/app/src/main/java/com/javajedis/bookit/SearchActivity.java index 2f2216a..3c278cf 100644 --- a/front_end/app/src/main/java/com/javajedis/bookit/SearchActivity.java +++ b/front_end/app/src/main/java/com/javajedis/bookit/SearchActivity.java @@ -41,7 +41,6 @@ public class SearchActivity extends AppCompatActivity implements RecyclerViewInt "IRC", "LASR", "LIFE", "LSK", "MATH", "MATX", "MCLD", "MCML", "ORCH", "OSB1", "PHRM", "PCN", "SCRF", "SOWK", "SPPH", "SWNG", "UCEN", "WESB"}; - private final String[] allBuildingNames = allBuildingCodes; private final ArrayList informalLearningSpaceBuildingCodes = new ArrayList<>(); private final ArrayList informalLearningSpaceBuildingNames = new ArrayList<>(); private final ArrayList lectureHallBuildingCodes = new ArrayList<>(); @@ -50,7 +49,6 @@ public class SearchActivity extends AppCompatActivity implements RecyclerViewInt private final ArrayList studyRoomBuildingNames = new ArrayList<>(); private ArrayList showingBuildingCodes; - private ArrayList showingBuildingNames; private ArrayList showingBuildingList; private String requestBuildingType = ""; private TextView guideText; @@ -151,7 +149,6 @@ private void setButtonListener(Button button, String spaceType) { switch (spaceType) { case "": showingBuildingCodes = new ArrayList<>(); - showingBuildingNames = new ArrayList<>(); informalLearningSpaceButton.setBackgroundResource(R.drawable.bottom_button); lectureHallButton.setBackgroundResource(R.drawable.top_button); @@ -159,7 +156,6 @@ private void setButtonListener(Button button, String spaceType) { break; case "ils": showingBuildingCodes = informalLearningSpaceBuildingCodes; - showingBuildingNames = informalLearningSpaceBuildingNames; // setting button background informalLearningSpaceButton.setBackgroundResource(R.drawable.bottom_button); lectureHallButton.setBackgroundResource(R.drawable.top_button); @@ -167,7 +163,6 @@ private void setButtonListener(Button button, String spaceType) { break; case "lecturehalls": showingBuildingCodes = lectureHallBuildingCodes; - showingBuildingNames = lectureHallBuildingNames; // setting button background informalLearningSpaceButton.setBackgroundResource(R.drawable.top_button); lectureHallButton.setBackgroundResource(R.drawable.bottom_button); @@ -175,7 +170,6 @@ private void setButtonListener(Button button, String spaceType) { break; case "studyrooms": showingBuildingCodes = studyRoomBuildingCodes; - showingBuildingNames = studyRoomBuildingNames; // setting button background informalLearningSpaceButton.setBackgroundResource(R.drawable.top_button); lectureHallButton.setBackgroundResource(R.drawable.top_button); @@ -183,7 +177,9 @@ private void setButtonListener(Button button, String spaceType) { break; default: showingBuildingCodes = new ArrayList<>(Arrays.asList(allBuildingCodes)); - showingBuildingCodes = new ArrayList<>(Arrays.asList(allBuildingNames)); + informalLearningSpaceButton.setBackgroundResource(R.drawable.top_button); + lectureHallButton.setBackgroundResource(R.drawable.top_button); + studyRoomButton.setBackgroundResource(R.drawable.top_button); break; } From c74bbe4decd9f40d0a0df3266b5b45a1e9dcb2d2 Mon Sep 17 00:00:00 2001 From: Tongyu Li Date: Thu, 30 Nov 2023 19:53:11 -0800 Subject: [PATCH 3/7] codacy fix trial 3 (this should be it) --- .../BookCancelStudyRoomSuccessTest.java | 3 +-- .../BookCancelStudyRoomsFailure2ATest.java | 3 +-- .../BookCancelStudyRoomsFailure4ATest.java | 3 +-- .../ConfirmAttendanceFailure3ATest.java | 3 +-- .../ConfirmAttendanceSuccessTest.java | 3 +-- .../FilterStudyRoomsFailure8ATest.java | 3 +-- .../FilterStudyRoomsFailure8BTest.java | 3 +-- .../FilterStudyRoomsSuccessTest.java | 3 +-- .../AttendanceConfirmationIn3ClicksTest.java | 3 +-- .../SearchFilterShowsResultsIn1SecondTest.java | 3 +-- 10 files changed, 10 insertions(+), 20 deletions(-) diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java index 8c59967..e5601df 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomSuccessTest.java @@ -18,7 +18,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -55,7 +54,7 @@ public void bookCancelStudyRoomSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java index 79fa315..6ed57c8 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure2ATest.java @@ -18,7 +18,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -50,7 +49,7 @@ public void bookStudyRoomFailure2ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java index 25a1e77..9cd60e2 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/book_cancel_study_rooms_use_case/BookCancelStudyRoomsFailure4ATest.java @@ -20,7 +20,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -55,7 +54,7 @@ public void bookCancelFailure4ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java index 67db3ba..d8264a4 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceFailure3ATest.java @@ -16,7 +16,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -54,7 +53,7 @@ public void confirmAttendanceFailure3ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java index 60f7cac..8eefcd4 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/confirm_attendance_use_case/ConfirmAttendanceSuccessTest.java @@ -16,7 +16,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -55,7 +54,7 @@ public void confirmAttendanceSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java index 811e627..3a08a6a 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8ATest.java @@ -15,7 +15,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -46,7 +45,7 @@ public void filterStudyRoomsFailure8ATest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java index bd0f288..70dd427 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsFailure8BTest.java @@ -18,7 +18,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -58,7 +57,7 @@ public void filterStudyRoomsFailure8BTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java index c9bb9d0..04aed9b 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/filter_study_rooms_use_case/FilterStudyRoomsSuccessTest.java @@ -21,7 +21,6 @@ import androidx.test.espresso.DataInteraction; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -60,7 +59,7 @@ public void filterStudyRoomsSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java index f6f0c8c..8e2df6b 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/AttendanceConfirmationIn3ClicksTest.java @@ -17,7 +17,6 @@ import android.view.ViewParent; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -56,7 +55,7 @@ public void attendanceConfirmationIn3ClicksTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), diff --git a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java index 549c08b..9470c81 100644 --- a/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java +++ b/front_end/app/src/androidTest/java/com/javajedis/bookit/nonfunctional_requirements/SearchFilterShowsResultsIn1SecondTest.java @@ -22,7 +22,6 @@ import androidx.test.espresso.DataInteraction; import androidx.test.espresso.ViewInteraction; -import androidx.test.espresso.matcher.ViewMatchers; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.ext.junit.runners.AndroidJUnit4; import androidx.test.filters.LargeTest; @@ -60,7 +59,7 @@ public void filterStudyRoomsSuccessTest() { ViewInteraction ic = onView( allOf(withText("Sign in"), childAtPosition( - allOf(ViewMatchers.withId(R.id.sign_in_button), + allOf(withId(R.id.sign_in_button), childAtPosition( withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")), 0)), From e755d0c5cf5796be2219839f97a010f309be6605 Mon Sep 17 00:00:00 2001 From: JavaJedis <146999442+JavaJedis@users.noreply.github.com> Date: Thu, 30 Nov 2023 20:47:32 -0800 Subject: [PATCH 4/7] test github actions --- front_end/dummy.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/front_end/dummy.txt b/front_end/dummy.txt index b920295..f393483 100644 --- a/front_end/dummy.txt +++ b/front_end/dummy.txt @@ -1 +1,2 @@ -yo \ No newline at end of file +yo +hello From eeaa2924615c4be2679356a7613224299d57ff26 Mon Sep 17 00:00:00 2001 From: JavaJedis <146999442+JavaJedis@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:01:33 -0800 Subject: [PATCH 5/7] GitHub action test 01 --- front_end/dummy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/front_end/dummy.txt b/front_end/dummy.txt index f393483..1f8d3d0 100644 --- a/front_end/dummy.txt +++ b/front_end/dummy.txt @@ -1,2 +1,3 @@ yo hello +this is a test From c7214d6b59b7ff0e9379df8dc54b613bd6260d2f Mon Sep 17 00:00:00 2001 From: JavaJedis <146999442+JavaJedis@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:15:20 -0800 Subject: [PATCH 6/7] GitHub Action 02 --- front_end/dummy.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/front_end/dummy.txt b/front_end/dummy.txt index 1f8d3d0..092bfb9 100644 --- a/front_end/dummy.txt +++ b/front_end/dummy.txt @@ -1,3 +1 @@ yo -hello -this is a test From a415aba5317c9a85e912cfdd8f39ac6d94a5c9a7 Mon Sep 17 00:00:00 2001 From: JavaJedis <146999442+JavaJedis@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:22:44 -0800 Subject: [PATCH 7/7] GitHub action --- front_end/dummy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/front_end/dummy.txt b/front_end/dummy.txt index 092bfb9..f393483 100644 --- a/front_end/dummy.txt +++ b/front_end/dummy.txt @@ -1 +1,2 @@ yo +hello