-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35eda03
commit 6f20a62
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
app/src/androidTest/java/com/symphony/mrfit/ui/NotificationActivityTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.symphony.mrfit.ui | ||
|
||
import androidx.test.espresso.Espresso | ||
import androidx.test.espresso.assertion.ViewAssertions | ||
import androidx.test.espresso.matcher.ViewMatchers | ||
import com.symphony.mrfit.R | ||
import org.junit.Assert.* | ||
|
||
import org.junit.Test | ||
import org.mockito.Mockito; | ||
import org.mockito.Mockito.`when` | ||
|
||
|
||
class NotificationActivityTest { | ||
|
||
//TODO: cant figure out tests for notif activity | ||
|
||
/*@Test | ||
fun getHasNotificationPermissionGranted() { | ||
} | ||
@Test | ||
fun setHasNotificationPermissionGranted() { | ||
}*/ | ||
|
||
//tests if the activity is displayed and visible to user | ||
/*@Test | ||
fun checkActivityVisibility() { | ||
Espresso.onView(ViewMatchers.withId(R.id.layout_notifActivity)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
} | ||
//tests if date picker and time picker are visible | ||
@Test | ||
fun checkViewVisibility() { | ||
Espresso.onView(ViewMatchers.withId(R.id.datePicker)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
Espresso.onView(ViewMatchers.withId(R.id.timePicker)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
}*/ | ||
} |
41 changes: 41 additions & 0 deletions
41
app/src/androidTest/java/com/symphony/mrfit/ui/PostWorkoutActivityTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.symphony.mrfit.ui | ||
|
||
import androidx.test.espresso.Espresso | ||
import androidx.test.espresso.assertion.ViewAssertions | ||
import androidx.test.espresso.matcher.ViewMatchers | ||
import androidx.test.ext.junit.rules.activityScenarioRule | ||
import com.symphony.mrfit.R | ||
import org.junit.Assert.* | ||
import org.junit.Rule | ||
|
||
import org.junit.Test | ||
|
||
class PostWorkoutActivityTest { | ||
|
||
@get:Rule | ||
var activityScenarioRule = activityScenarioRule<PostWorkoutActivity>() | ||
|
||
//tests if the activity is displayed and visible to user | ||
@Test | ||
fun checkActivityVisibility() { | ||
Espresso.onView(ViewMatchers.withId(R.id.layout_postWorkoutActivity)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
} | ||
|
||
//tests if components are visible | ||
@Test | ||
fun checkViewVisibility() { | ||
Espresso.onView(ViewMatchers.withId(R.id.postWorkoutTitle)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
|
||
Espresso.onView(ViewMatchers.withId(R.id.postWorkoutTime)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
|
||
/*Espresso.onView(ViewMatchers.withId(R.id.gotoGoalsButton)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed())) | ||
Espresso.onView(ViewMatchers.withId(R.id.returnHomeButton)) | ||
.check(ViewAssertions.matches(ViewMatchers.isDisplayed()))*/ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters