Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Search menu functionality and film grading refractor #113

Merged
merged 24 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c8b11e2
Film Review element refractored into a Fragment and slightly modified…
markh0rr Mar 30, 2023
cb51462
class structure fix weird problem
markh0rr Mar 30, 2023
eb945cf
fixed authentication problem when not signed in on phone
PH-14 Mar 30, 2023
43d99a4
fragment switcher interface, easteregg : you can open the newitemfrag…
markh0rr Mar 30, 2023
4760c03
merged the fix
markh0rr Mar 30, 2023
d657379
added bundle argument handler
PH-14 Mar 30, 2023
ea35d7d
fixed merge conflicts
PH-14 Mar 30, 2023
2eb3971
typo fix
markh0rr Mar 30, 2023
291682d
added return to mainactivity
PH-14 Mar 30, 2023
e2fa995
Merge branch 'searchMenuFunctionalityAndFilmGradingRefractor' of gith…
PH-14 Mar 30, 2023
cefe6b1
search with recycler view works and start reviews fragment on click
markh0rr Mar 30, 2023
30ad29f
linked grading to profile
PH-14 Mar 30, 2023
4e8c2ca
code cleanup
PH-14 Mar 30, 2023
fe5af3d
API call works and is implemented in the search
markh0rr Mar 30, 2023
2df14b4
merge and problem fixed
markh0rr Mar 30, 2023
575c5ad
problem on click fixed, the movie search is functional
markh0rr Mar 30, 2023
f8f7fc3
remove activity file to please CI
markh0rr Mar 30, 2023
e1e3b5c
useless adapter removed, and newitemactivity readed bc needed by the …
markh0rr Mar 30, 2023
d82bdbd
test
PH-14 Mar 30, 2023
540a120
testing activity implements the FragmentSwitcher interface now
markh0rr Mar 30, 2023
be7013b
Merge branch 'searchMenuFunctionalityAndFilmGradingRefractor' of gith…
markh0rr Mar 30, 2023
625e2fe
added tests
PH-14 Apr 2, 2023
2a5fe62
small fix in layout
PH-14 Apr 2, 2023
35b4392
sdk version fix
PH-14 Apr 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/.name

This file was deleted.

53 changes: 53 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,22 @@ public void startTests() {
public void testSignInWorks() {

login();
ViewInteraction loginButton = onView(withId(R.id.google_sign_in));
loginButton.perform(click());
Database.deleteUser(databaseUser.getUsername()).thenAccept(u -> {

// select the account if google account selector pops up
try {
device.findObject(By.textContains("@")).click();
} catch (NullPointerException e) {
System.out.println("Object wasn't found");
}
ViewInteraction loginButton = onView(withId(R.id.google_sign_in));
loginButton.perform(click());

Intents.intended(hasComponent(NewProfileActivity.class.getName()));
// select the account if google account selector pops up
try {
device.findObject(By.textContains("@")).click();
} catch (NullPointerException e) {
System.out.println("Object wasn't found");
}

logout();
Intents.intended(hasComponent(NewProfileActivity.class.getName()));

logout();
});
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.IntDef;
import androidx.fragment.app.FragmentManager;
import androidx.test.core.app.ActivityScenario;
Expand All @@ -23,16 +24,19 @@
import androidx.test.espresso.matcher.BoundedMatcher;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;

import com.google.android.material.textfield.TextInputLayout;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
* Instrumented test, which will execute on an Android device.
*
Expand Down Expand Up @@ -146,7 +150,7 @@ public void testUsernameTextInputRemoveErrorWhenUsernameValid() {

private interface viewFunction {

public CharSequence getText(View view);
CharSequence getText(View view);
}

private static Matcher<View> hasText(final String expectedErrorText, viewFunction fct) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,24 @@
import static org.junit.Assert.assertTrue;

import androidx.test.ext.junit.runners.AndroidJUnit4;

import com.github.sdp.mediato.data.Database;
import com.github.sdp.mediato.model.Location;
import com.github.sdp.mediato.model.Review;
import com.github.sdp.mediato.model.User;
import com.github.sdp.mediato.model.media.Collection;
import com.github.sdp.mediato.model.media.Movie;

import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;


@RunWith(AndroidJUnit4.class)
Expand All @@ -29,7 +32,7 @@
*/
public class CollectionsTests {
private final static int STANDARD_COLLECTION_TIMEOUT = 10;
private User user1 = new User.UserBuilder("uniqueId1")
private final User user1 = new User.UserBuilder("uniqueId1")
.setUsername("user_test_1")
.setEmail("email_test_1")
.setRegisterDate("09/03/2023")
Expand All @@ -39,18 +42,18 @@ public class CollectionsTests {
private Collection collection1;
private Collection collection2;

private Review review1 = new Review(user1.getUsername(),
private final Review review1 = new Review(user1.getUsername(),
new Movie("Harry Potter 1", "the chosen one", "url", 1));
private Review review2 = new Review(user1.getUsername(),
private final Review review2 = new Review(user1.getUsername(),
new Movie("Harry Potter 2", "the chosen two", "url", 2), 9);
private Review review3 = new Review(user1.getUsername(),
private final Review review3 = new Review(user1.getUsername(),
new Movie("Harry Potter 3", "the chosen three", "url", 3), 2, "meh");

private Map<String, Review> reviews1 = new HashMap<>() {
private final Map<String, Review> reviews1 = new HashMap<>() {
};
private Map<String, Review> reviews2 = new HashMap<>() {
private final Map<String, Review> reviews2 = new HashMap<>() {
};
private Map<String, Review> reviews3 = new HashMap<>() {
private final Map<String, Review> reviews3 = new HashMap<>() {
};


Expand Down

This file was deleted.

Loading