-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work for both features and tests!
I left a few suggestions for clarity but it's already in pretty good shape
val intent = | ||
Intent(ApplicationProvider.getApplicationContext(), MusicTemporary::class.java) | ||
val scn: ActivityScenario<GreetingActivity> = ActivityScenario.launch(intent) | ||
Espresso.onView(ViewMatchers.withId(R.id.musicName)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Espresso.onView(ViewMatchers.withId(R.id.musicName)) | |
onView(withId(R.id.musicName)) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work too (depends on your import) and it will be more consistent with the rest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in my new commit :)
val scn: ActivityScenario<GreetingActivity> = ActivityScenario.launch(intent) | ||
Espresso.onView(ViewMatchers.withId(R.id.musicName)) | ||
.perform(ViewActions.typeText(inputName), ViewActions.closeSoftKeyboard()) | ||
Espresso.onView(ViewMatchers.withId(R.id.validate)).perform(ViewActions.click()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Espresso.onView(ViewMatchers.withId(R.id.validate)).perform(ViewActions.click()) | |
onView(withId(R.id.validate)).perform(ViewActions.click()) | |
Espresso.onView(ViewMatchers.withId(R.id.musicName)) | ||
.perform(ViewActions.typeText(inputName), ViewActions.closeSoftKeyboard()) | ||
Espresso.onView(ViewMatchers.withId(R.id.validate)).perform(ViewActions.click()) | ||
Espresso.onView(ViewMatchers.withId(R.id.textViewPlaying)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Espresso.onView(ViewMatchers.withId(R.id.textViewPlaying)) | |
onView(withId(R.id.textViewPlaying)) | |
import android.os.Build | ||
import android.util.Log | ||
import ch.sdp.vibester.model.Song | ||
//import com.android.volley.Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//import com.android.volley.Request | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in the new commit
import android.util.Log | ||
import ch.sdp.vibester.model.Song | ||
//import com.android.volley.Request | ||
//import com.android.volley.toolbox.StringRequest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//import com.android.volley.toolbox.StringRequest | |
import ch.sdp.vibester.model.Song | ||
//import com.android.volley.Request | ||
//import com.android.volley.toolbox.StringRequest | ||
//import com.android.volley.toolbox.Volley |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//import com.android.volley.toolbox.Volley | |
android:layout_marginTop="208dp" | ||
android:layout_marginEnd="111dp" | ||
android:layout_marginBottom="23dp" | ||
android:text="Enter a Music Name:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using @string instead of hardcoded string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but as it is a temporary activity, I didn't put it in the String.xml otherwise It will flood it with not important value :)
android:layout_marginEnd="89dp" | ||
android:layout_marginBottom="28dp" | ||
android:ems="10" | ||
android:hint="Music Name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
android:layout_marginTop="28dp" | ||
android:layout_marginEnd="159dp" | ||
android:layout_marginBottom="29dp" | ||
android:text="Validate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
android:layout_marginTop="15dp" | ||
android:layout_marginEnd="179dp" | ||
android:layout_marginBottom="267dp" | ||
android:text="Playing: None" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
I've also added javadoc that was not done before 😅 Now It's all good 👍 |
Code Climate has analyzed commit 51d5918 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 99.4% (0.2% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, the code is very clear.
Music API
This is related to issue #45
This Pull Requests contains:
In addition the code is tested with a coverage of: [100]%
Notes for reviewers