Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/JavaJedis/BookIt
Browse files Browse the repository at this point in the history
  • Loading branch information
Debian authored and Debian committed Dec 1, 2023
2 parents dd4385b + a415aba commit d364e9c
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,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;
Expand All @@ -51,7 +49,7 @@ public void bookStudyRoomFailure2ATest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,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;
Expand All @@ -56,7 +54,7 @@ public void bookCancelFailure4ATest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,7 +30,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;
Expand All @@ -55,7 +53,7 @@ public void confirmAttendanceFailure3ATest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -30,7 +29,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;
Expand All @@ -56,7 +54,7 @@ public void confirmAttendanceSuccessTest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +27,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;
Expand All @@ -47,7 +45,7 @@ public void filterStudyRoomsFailure8ATest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -33,7 +32,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;
Expand All @@ -59,7 +57,7 @@ public void filterStudyRoomsFailure8BTest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,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;
Expand All @@ -61,7 +59,7 @@ public void filterStudyRoomsSuccessTest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -31,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;
Expand All @@ -57,7 +55,7 @@ public void attendanceConfirmationIn3ClicksTest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -36,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;
Expand All @@ -61,7 +59,7 @@ public void filterStudyRoomsSuccessTest() {
ViewInteraction ic = onView(
allOf(withText("Sign in"),
childAtPosition(
Matchers.allOf(ViewMatchers.withId(R.id.sign_in_button),
allOf(withId(R.id.sign_in_button),
childAtPosition(
withClassName(is("androidx.constraintlayout.widget.ConstraintLayout")),
0)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> informalLearningSpaceBuildingCodes = new ArrayList<>();
private final ArrayList<String> informalLearningSpaceBuildingNames = new ArrayList<>();
private final ArrayList<String> lectureHallBuildingCodes = new ArrayList<>();
Expand All @@ -50,7 +49,6 @@ public class SearchActivity extends AppCompatActivity implements RecyclerViewInt

private final ArrayList<String> studyRoomBuildingNames = new ArrayList<>();
private ArrayList<String> showingBuildingCodes;
private ArrayList<String> showingBuildingNames;
private ArrayList<String> showingBuildingList;
private String requestBuildingType = "";
private TextView guideText;
Expand Down Expand Up @@ -151,39 +149,37 @@ 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);
studyRoomButton.setBackgroundResource(R.drawable.top_button);
break;
case "ils":
showingBuildingCodes = informalLearningSpaceBuildingCodes;
showingBuildingNames = informalLearningSpaceBuildingNames;
// setting button background
informalLearningSpaceButton.setBackgroundResource(R.drawable.bottom_button);
lectureHallButton.setBackgroundResource(R.drawable.top_button);
studyRoomButton.setBackgroundResource(R.drawable.top_button);
break;
case "lecturehalls":
showingBuildingCodes = lectureHallBuildingCodes;
showingBuildingNames = lectureHallBuildingNames;
// setting button background
informalLearningSpaceButton.setBackgroundResource(R.drawable.top_button);
lectureHallButton.setBackgroundResource(R.drawable.bottom_button);
studyRoomButton.setBackgroundResource(R.drawable.top_button);
break;
case "studyrooms":
showingBuildingCodes = studyRoomBuildingCodes;
showingBuildingNames = studyRoomBuildingNames;
// setting button background
informalLearningSpaceButton.setBackgroundResource(R.drawable.top_button);
lectureHallButton.setBackgroundResource(R.drawable.top_button);
studyRoomButton.setBackgroundResource(R.drawable.bottom_button);
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;
}

Expand Down
3 changes: 2 additions & 1 deletion front_end/dummy.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
yo
yo
hello

0 comments on commit d364e9c

Please sign in to comment.