Skip to content

Commit 6b2f24e

Browse files
Release: Parent 4.0.0 (56)
2 parents de9242a + 1dbb2ce commit 6b2f24e

File tree

409 files changed

+51502
-31821
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

409 files changed

+51502
-31821
lines changed

apps/buildSrc/src/main/java/GlobalDependencies.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ object Libs {
161161
const val EVENTBUS = "org.greenrobot:eventbus:3.3.1"
162162
const val JW_THREETEN_BP = "com.jakewharton.threetenabp:threetenabp:1.4.6"
163163
const val PROCESS_PHOENIX = "com.jakewharton:process-phoenix:2.1.2"
164-
const val PAPERDB = "io.github.pilgr:paperdb:2.7.2"
165164
const val KEYBOARD_VISIBILITY_LISTENER = "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.2.1"
166165
const val APACHE_COMMONS_TEXT = "org.apache.commons:commons-text:1.12.0"
167166
const val CAMERA_VIEW = "com.otaliastudios:cameraview:2.7.2"

apps/parent/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ android {
113113
release {
114114
minifyEnabled true
115115
shrinkResources true
116-
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
116+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
117117

118118
buildConfigField "String", "HEAP_APP_ID", "\"$heapProductionId\""
119119
}

apps/parent/flank_e2e.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
gcloud:
2+
project: delta-essence-114723
3+
# Use the next two lines to run locally
4+
# app: ./build/outputs/apk/qa/debug/student-qa-debug.apk
5+
# test: ./build/outputs/apk/androidTest/qa/debug/student-qa-debug-androidTest.apk
6+
app: ./apps/parent/build/outputs/apk/qa/debug/parent-qa-debug.apk
7+
test: ./apps/parent/build/outputs/apk/androidTest/qa/debug/parent-qa-debug-androidTest.apk
8+
results-bucket: android-parent
9+
auto-google-login: true
10+
use-orchestrator: true
11+
performance-metrics: false
12+
record-video: true
13+
timeout: 60m
14+
test-targets:
15+
- annotation com.instructure.canvas.espresso.E2E
16+
- notAnnotation com.instructure.canvas.espresso.Stub, com.instructure.canvas.espresso.FlakyE2E, com.instructure.canvas.espresso.KnownBug, com.instructure.canvas.espresso.OfflineE2E
17+
device:
18+
- model: Pixel2.arm
19+
version: 29
20+
locale: en_US
21+
orientation: portrait
22+
23+
flank:
24+
testShards: 10
25+
testRuns: 1
26+

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/alerts/details/AnnouncementDetailsScreenTest.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class AnnouncementDetailsScreenTest {
6464
AnnouncementDetailsScreen(
6565
uiState = uiState,
6666
navigationActionClick = {},
67-
actionHandler = {}
67+
actionHandler = {},
68+
applyOnWebView = {}
6869
)
6970
}
7071

@@ -105,7 +106,8 @@ class AnnouncementDetailsScreenTest {
105106
AnnouncementDetailsScreen(
106107
uiState = uiState,
107108
navigationActionClick = {},
108-
actionHandler = {}
109+
actionHandler = {},
110+
applyOnWebView = {}
109111
)
110112
}
111113

@@ -135,7 +137,8 @@ class AnnouncementDetailsScreenTest {
135137
studentColor = Color.BLUE,
136138
),
137139
navigationActionClick = {},
138-
actionHandler = {}
140+
actionHandler = {},
141+
applyOnWebView = {}
139142
)
140143
}
141144

@@ -156,7 +159,8 @@ class AnnouncementDetailsScreenTest {
156159
studentColor = Color.BLUE,
157160
),
158161
navigationActionClick = {},
159-
actionHandler = {}
162+
actionHandler = {},
163+
applyOnWebView = {}
160164
)
161165
}
162166

@@ -174,7 +178,8 @@ class AnnouncementDetailsScreenTest {
174178
studentColor = Color.BLUE,
175179
),
176180
navigationActionClick = {},
177-
actionHandler = {}
181+
actionHandler = {},
182+
applyOnWebView = {}
178183
)
179184
}
180185

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/alerts/list/AlertsScreenTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import androidx.compose.ui.test.hasText
2525
import androidx.compose.ui.test.junit4.createComposeRule
2626
import androidx.compose.ui.test.onNodeWithTag
2727
import androidx.compose.ui.test.onNodeWithText
28+
import androidx.compose.ui.test.performScrollToNode
2829
import androidx.test.ext.junit.runners.AndroidJUnit4
2930
import com.instructure.canvasapi2.models.AlertType
3031
import com.instructure.parentapp.features.alerts.list.AlertsItemUiState
@@ -202,6 +203,7 @@ class AlertsScreenTest {
202203
}
203204

204205
items.forEach {
206+
composeTestRule.onNodeWithTag("alertsList").performScrollToNode(hasText(it.title))
205207
composeTestRule.onNodeWithText(it.title).assertIsDisplayed()
206208
composeTestRule.onNodeWithText(parseAlertType(it.alertType, it.observerAlertThreshold)).assertIsDisplayed()
207209
composeTestRule.onNodeWithText(parseDate(it.date!!)).assertIsDisplayed()

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/alerts/settings/AlertSettingsScreenTest.kt

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import com.instructure.canvasapi2.models.ThresholdWorkflowState
2929
import com.instructure.canvasapi2.models.User
3030
import com.instructure.parentapp.features.alerts.settings.AlertSettingsScreen
3131
import com.instructure.parentapp.features.alerts.settings.AlertSettingsUiState
32-
import com.instructure.parentapp.ui.pages.AlertSettingsPage
32+
import com.instructure.parentapp.ui.pages.StudentAlertSettingsPage
3333
import org.junit.Rule
3434
import org.junit.Test
3535
import org.junit.runner.RunWith
@@ -40,7 +40,7 @@ class AlertSettingsScreenTest {
4040
@get:Rule
4141
val composeTestRule = createComposeRule()
4242

43-
private val page = AlertSettingsPage(composeTestRule)
43+
private val page = StudentAlertSettingsPage(composeTestRule)
4444

4545
@Test
4646
fun assertLoading() {
@@ -268,19 +268,7 @@ class AlertSettingsScreenTest {
268268

269269
page.clickOverflowMenu()
270270
page.clickDeleteStudent()
271-
composeTestRule.onNodeWithTag("deleteDialogTitle")
272-
.assertExists()
273-
.assertTextEquals("Delete")
274-
composeTestRule.onNodeWithText("This will unpair and remove all enrollments for this student from you account.")
275-
.assertExists()
276-
composeTestRule.onNodeWithTag("deleteConfirmButton")
277-
.assertTextEquals("Delete")
278-
.assertExists()
279-
.assertHasClickAction()
280-
composeTestRule.onNodeWithTag("deleteCancelButton")
281-
.assertTextEquals("Cancel")
282-
.assertExists()
283-
.assertHasClickAction()
271+
page.assertDeleteStudentDialogDetails()
284272
}
285273

286274
@Test

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/courses/details/summary/SummaryScreenTest.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,20 @@ class SummaryScreenTest {
129129
composeTestRule.onNodeWithText("No Due Date")
130130
.assertIsDisplayed()
131131
}
132-
}
132+
133+
@Test
134+
fun assertRefreshing() {
135+
composeTestRule.setContent {
136+
SummaryContent(
137+
uiState = SummaryUiState(
138+
state = ScreenState.Refreshing
139+
),
140+
onRefresh = {},
141+
navigateToAssignmentDetails = { _, _ -> },
142+
navigateToCalendarEvent = { _, _, _ -> }
143+
)
144+
}
145+
146+
composeTestRule.onNodeWithTag("pullRefreshIndicator").assertIsDisplayed()
147+
}
148+
}

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/login/createaccount/CreateAccountScreenTest.kt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
package com.instructure.parentapp.ui.compose.login.createaccount
1919

2020
import androidx.compose.ui.test.assertIsDisplayed
21+
import androidx.compose.ui.test.hasText
2122
import androidx.compose.ui.test.junit4.createComposeRule
2223
import androidx.compose.ui.test.onNodeWithTag
2324
import androidx.compose.ui.test.onNodeWithText
2425
import androidx.compose.ui.test.performClick
26+
import androidx.compose.ui.test.performScrollToNode
2527
import androidx.test.ext.junit.runners.AndroidJUnit4
2628
import com.instructure.canvasapi2.models.TermsOfService
2729
import com.instructure.parentapp.features.login.createaccount.CreateAccountScreen
@@ -47,9 +49,13 @@ class CreateAccountScreenTest {
4749
)
4850
}
4951

52+
scrollToText("Full Name")
5053
composeTestRule.onNodeWithText("Full Name").assertIsDisplayed()
54+
scrollToText("Email Address")
5155
composeTestRule.onNodeWithText("Email Address").assertIsDisplayed()
56+
scrollToText("Password")
5257
composeTestRule.onNodeWithText("Password").assertIsDisplayed()
58+
scrollToText("Create Account")
5359
composeTestRule.onNodeWithText("Create Account").assertIsDisplayed()
5460
composeTestRule.onNodeWithText("By tapping \'Create Account\', you agree to the Terms of Service and acknowledge the Privacy Policy")
5561
.assertIsDisplayed()
@@ -70,9 +76,13 @@ class CreateAccountScreenTest {
7076
)
7177
}
7278

79+
scrollToText("Full Name")
7380
composeTestRule.onNodeWithText("Full Name").assertIsDisplayed()
81+
scrollToText("Email Address")
7482
composeTestRule.onNodeWithText("Email Address").assertIsDisplayed()
83+
scrollToText("Password")
7584
composeTestRule.onNodeWithText("Password").assertIsDisplayed()
85+
scrollToText("Create Account")
7686
composeTestRule.onNodeWithText("Create Account").assertIsDisplayed()
7787
composeTestRule.onNodeWithText("View the Privacy Policy").assertIsDisplayed()
7888
}
@@ -120,9 +130,18 @@ class CreateAccountScreenTest {
120130
)
121131
}
122132

133+
scrollToText("Create Account")
123134
composeTestRule.onNodeWithText("Create Account").performClick()
135+
scrollToText("Full Name")
124136
composeTestRule.onNodeWithText("Please enter full name").assertIsDisplayed()
137+
scrollToText("Email Address")
125138
composeTestRule.onNodeWithText("Please enter an email address").assertIsDisplayed()
139+
scrollToText("Password")
126140
composeTestRule.onNodeWithText("Password is required").assertIsDisplayed()
127141
}
142+
143+
private fun scrollToText(text: String) {
144+
composeTestRule.onNodeWithTag("CreateAccountScreen")
145+
.performScrollToNode(hasText(text))
146+
}
128147
}

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/managestudents/ManageStudentsScreenTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import androidx.compose.ui.test.hasText
2525
import androidx.compose.ui.test.junit4.createComposeRule
2626
import androidx.compose.ui.test.onNodeWithTag
2727
import androidx.compose.ui.test.onNodeWithText
28+
import androidx.compose.ui.test.performScrollToNode
2829
import androidx.test.ext.junit.runners.AndroidJUnit4
2930
import com.instructure.pandares.R
3031
import com.instructure.pandautils.utils.ThemedColor
@@ -58,6 +59,8 @@ class ManageStudentsScreenTest {
5859

5960
composeTestRule.onNodeWithText("You are not observing any students.")
6061
.assertIsDisplayed()
62+
composeTestRule.onNodeWithTag("EmptyContent")
63+
.performScrollToNode(hasText("Retry"))
6164
composeTestRule.onNodeWithText("Retry")
6265
.assertIsDisplayed()
6366
.assertHasClickAction()

apps/parent/src/androidTest/java/com/instructure/parentapp/ui/compose/notaparent/NotAParentScreenTest.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ package com.instructure.parentapp.ui.compose.notaparent
2020
import androidx.compose.ui.test.assertHasClickAction
2121
import androidx.compose.ui.test.assertIsDisplayed
2222
import androidx.compose.ui.test.assertIsNotDisplayed
23+
import androidx.compose.ui.test.hasText
2324
import androidx.compose.ui.test.junit4.createComposeRule
25+
import androidx.compose.ui.test.onNodeWithTag
2426
import androidx.compose.ui.test.onNodeWithText
2527
import androidx.compose.ui.test.performClick
28+
import androidx.compose.ui.test.performScrollTo
29+
import androidx.compose.ui.test.performScrollToNode
2630
import androidx.test.ext.junit.runners.AndroidJUnit4
2731
import com.instructure.parentapp.features.notaparent.NotAParentScreen
2832
import org.junit.Rule
@@ -48,9 +52,12 @@ class NotAParentScreenTest {
4852

4953
composeTestRule.onNodeWithText("Not a parent?").assertIsDisplayed()
5054
composeTestRule.onNodeWithText("We couldn't find any students associated with your account").assertIsDisplayed()
55+
56+
scrollToText("Return to login")
5157
composeTestRule.onNodeWithText("Return to login")
5258
.assertIsDisplayed()
5359
.assertHasClickAction()
60+
scrollToText("Are you a student or teacher?")
5461
composeTestRule.onNodeWithText("Are you a student or teacher?")
5562
.assertIsDisplayed()
5663
.assertHasClickAction()
@@ -68,12 +75,21 @@ class NotAParentScreenTest {
6875
)
6976
}
7077

78+
scrollToText("Are you a student or teacher?")
79+
7180
composeTestRule.onNodeWithText("Are you a student or teacher?").performClick()
7281
composeTestRule.onNodeWithText("STUDENT")
82+
.performScrollTo()
7383
.assertIsDisplayed()
7484
.assertHasClickAction()
7585
composeTestRule.onNodeWithText("TEACHER")
86+
.performScrollTo()
7687
.assertIsDisplayed()
7788
.assertHasClickAction()
7889
}
90+
91+
private fun scrollToText(text: String) {
92+
composeTestRule.onNodeWithTag("NotAParentScreen")
93+
.performScrollToNode(hasText(text))
94+
}
7995
}

0 commit comments

Comments
 (0)