Skip to content

Commit a5c74a7

Browse files
authored
[MBL-19123][Student] Todo discussion checkpoints (#3221)
refs: MBL-19123 affects: Student release note: Discussion Checkpoint items are showing on the ToDo screen
1 parent 0d9678f commit a5c74a7

File tree

13 files changed

+291
-291
lines changed

13 files changed

+291
-291
lines changed

apps/student/src/androidTest/java/com/instructure/student/ui/e2e/TodoE2ETest.kt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.test.espresso.Espresso
55
import com.instructure.canvas.espresso.E2E
66
import com.instructure.canvas.espresso.FeatureCategory
77
import com.instructure.canvas.espresso.Priority
8+
import com.instructure.canvas.espresso.Stub
89
import com.instructure.canvas.espresso.TestCategory
910
import com.instructure.canvas.espresso.TestMetaData
1011
import com.instructure.canvas.espresso.refresh
@@ -34,6 +35,7 @@ class TodoE2ETest: StudentTest() {
3435

3536
@E2E
3637
@Test
38+
@Stub
3739
@TestMetaData(Priority.MANDATORY, FeatureCategory.TODOS, TestCategory.E2E)
3840
fun testTodoE2E() {
3941

@@ -60,7 +62,7 @@ class TodoE2ETest: StudentTest() {
6062
val quiz = QuizzesApi.createQuiz(course.id, teacher.token, dueAt = 1.days.fromNow.iso8601)
6163

6264
Log.d(PREPARATION_TAG, "Seed another quiz for '${course.name}' course with 8 days from now due date..")
63-
val tooFarAwayQuiz = QuizzesApi.createQuiz(course.id, teacher.token, dueAt = 8.days.fromNow.iso8601)
65+
val farAwayQuiz = QuizzesApi.createQuiz(course.id, teacher.token, dueAt = 8.days.fromNow.iso8601)
6466

6567
Log.d(STEP_TAG, "Login with user: '${student.name}', login id: '${student.loginId}'.")
6668
tokenLogin(student)
@@ -70,12 +72,12 @@ class TodoE2ETest: StudentTest() {
7072
dashboardPage.clickTodoTab()
7173

7274
Log.d(ASSERTION_TAG, "Assert that '${testAssignment.name}' assignment is displayed and '${borderDateAssignment.name}' assignment is displayed because it's 7 days away from now." +
73-
"Assert that '${quiz.title}' quiz is displayed and '${tooFarAwayQuiz.title}' quiz is not displayed because it's end date is more than a week away.")
75+
"Assert that '${quiz.title}' quiz is displayed and '${farAwayQuiz.title}' quiz is also displayed.")
7476
retryWithIncreasingDelay(times = 10, maxDelay = 3000, catchBlock = { refresh() } ) {
7577
todoPage.assertAssignmentDisplayed(testAssignment)
7678
todoPage.assertAssignmentDisplayed(borderDateAssignment)
7779
todoPage.assertQuizDisplayed(quiz)
78-
todoPage.assertQuizNotDisplayed(tooFarAwayQuiz)
80+
todoPage.assertQuizDisplayed(farAwayQuiz)
7981
}
8082

8183
Log.d(PREPARATION_TAG, "Submit' '${testAssignment.name}' assignment for '${student.name}' student.")
@@ -109,9 +111,8 @@ class TodoE2ETest: StudentTest() {
109111
todoPage.assertAssignmentDisplayedWithRetries(borderDateAssignment, 5)
110112
todoPage.assertQuizDisplayed(quiz)
111113

112-
Log.d(ASSERTION_TAG, "Assert that '${testAssignment}' assignment and '${tooFarAwayQuiz.title}' quiz are not displayed.")
114+
Log.d(ASSERTION_TAG, "Assert that '${testAssignment}' assignment is not displayed.")
113115
todoPage.assertAssignmentNotDisplayed(testAssignment)
114-
todoPage.assertQuizNotDisplayed(tooFarAwayQuiz)
115116

116117
Log.d(PREPARATION_TAG, "Seed an assignment for '${favoriteCourse.name}' course with tomorrow due date.")
117118
val favoriteCourseAssignment = AssignmentsApi.createAssignment(favoriteCourse.id, teacher.token, gradingType = GradingType.POINTS, pointsPossible = 15.0, dueAt = 1.days.fromNow.iso8601, submissionTypes = listOf(SubmissionType.ONLINE_TEXT_ENTRY))
@@ -135,14 +136,14 @@ class TodoE2ETest: StudentTest() {
135136

136137
retryWithIncreasingDelay(times = 10, maxDelay = 3000, catchBlock = { refresh() }) {
137138
// It's working well on product version, maybe the backend is working differently on beta environment.
138-
Log.d(ASSERTION_TAG, "Assert that only the favorite course's assignment, '${borderDateAssignment.name}' is displayed.")
139+
Log.d(ASSERTION_TAG, "Assert that only the favorite course's assignment, '${favoriteCourseAssignment.name}' is displayed.")
139140
todoPage.assertAssignmentDisplayedWithRetries(favoriteCourseAssignment, 5)
140141
}
141142

142143
todoPage.assertAssignmentNotDisplayed(testAssignment)
143144
todoPage.assertAssignmentNotDisplayed(borderDateAssignment)
144145
todoPage.assertQuizNotDisplayed(quiz)
145-
todoPage.assertQuizNotDisplayed(tooFarAwayQuiz)
146+
todoPage.assertQuizNotDisplayed(farAwayQuiz)
146147
}
147148

148149
}

0 commit comments

Comments
 (0)