Skip to content

Commit 1d497a9

Browse files
Release: Teacher 1.38.0 (75)
2 parents c06cb48 + 2d7a5b3 commit 1d497a9

File tree

477 files changed

+53331
-32477
lines changed

Some content is hidden

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

477 files changed

+53331
-32477
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/flutter_parent/lib/screens/alert_thresholds/alert_thresholds_percentage_dialog.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class AlertThresholdsPercentageDialogState extends State<AlertThresholdsPercenta
4444
String? maxValue;
4545
String? minValue;
4646

47-
final int _disabledAlpha = 80;
47+
final int _disabledAlpha = 90;
4848

4949
static final UniqueKey okButtonKey = UniqueKey(); // For testing
5050

@@ -173,13 +173,13 @@ class AlertThresholdsPercentageDialogState extends State<AlertThresholdsPercenta
173173
actions: <Widget>[
174174
TextButton(
175175
child: Text(L10n(context).cancel.toUpperCase()),
176-
style: TextButton.styleFrom(disabledBackgroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
176+
style: TextButton.styleFrom(disabledForegroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
177177
onPressed: () {
178178
Navigator.of(context).pop(null);
179179
}),
180180
TextButton(
181181
child: Text(L10n(context).never.toUpperCase()),
182-
style: TextButton.styleFrom(disabledBackgroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
182+
style: TextButton.styleFrom(disabledForegroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
183183
onPressed: () async {
184184
if (_threshold == null) {
185185
// Threshold is already disabled
@@ -194,7 +194,7 @@ class AlertThresholdsPercentageDialogState extends State<AlertThresholdsPercenta
194194
TextButton(
195195
key: okButtonKey,
196196
child: Text(L10n(context).ok),
197-
style: TextButton.styleFrom(disabledBackgroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
197+
style: TextButton.styleFrom(disabledForegroundColor: ParentColors.parentApp.withAlpha(_disabledAlpha)),
198198
onPressed: _disableButtons
199199
? null
200200
: () async {

apps/flutter_parent/lib/screens/assignments/assignment_details_screen.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,23 @@ class _AssignmentDetailsScreenState extends State<AssignmentDetailsScreen> {
368368
initialDate: initialDate,
369369
firstDate: now,
370370
lastDate: initialDate.add(Duration(days: 365)),
371+
builder: (context, child) {
372+
return Theme(
373+
data: ParentTheme.of(context)?.defaultLightTheme ?? ThemeData.light(),
374+
child: child!,
375+
);
376+
},
371377
);
372378

373379
if (date != null) {
374-
time = await showTimePicker(context: context, initialTime: TimeOfDay.fromDateTime(initialDate));
380+
time = await showTimePicker(context: context, initialTime: TimeOfDay.fromDateTime(initialDate),
381+
builder: (context, child) {
382+
return Theme(
383+
data: ParentTheme.of(context)?.defaultLightTheme ?? ThemeData.light(),
384+
child: child!,
385+
);
386+
},
387+
);
375388
}
376389

377390
if (date != null && time != null) {

apps/flutter_parent/lib/utils/design/parent_theme.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,13 @@ class _ParentThemeState extends State<ParentTheme> {
175175
bool get isDarkHC => isDarkMode && isHC;
176176

177177
/// Returns a Parent App theme that ignores student color
178-
ThemeData get defaultTheme => _buildTheme(getColorVariantForCurrentState(StudentColorSet.electric));
178+
ThemeData get defaultTheme => _buildTheme(getColorVariantForCurrentState(StudentColorSet.electric), isDarkMode);
179+
180+
/// Returns a light Parent App theme that ignores student color
181+
ThemeData get defaultLightTheme => _buildTheme(getColorVariantForCurrentState(StudentColorSet.electric), false);
179182

180183
/// Returns a Parent App theme styled with the color of the currently selected student
181-
ThemeData get studentTheme => _buildTheme(studentColor);
184+
ThemeData get studentTheme => _buildTheme(studentColor, isDarkMode);
182185

183186
/// Create a preferred size divider that can be used as the bottom of an app bar
184187
PreferredSize _appBarDivider(Color color) => PreferredSize(
@@ -238,7 +241,7 @@ class _ParentThemeState extends State<ParentTheme> {
238241
/// The green 'success' color appropriate for the current light/dark/HC mode
239242
Color get successColor => getColorVariantForCurrentState(StudentColorSet.shamrock);
240243

241-
ThemeData _buildTheme(Color themeColor) {
244+
ThemeData _buildTheme(Color themeColor, bool isDarkMode) {
242245
var textTheme = _buildTextTheme(onSurfaceColor);
243246

244247
// Use single text color for all styles in high-contrast mode
@@ -270,7 +273,7 @@ class _ParentThemeState extends State<ParentTheme> {
270273
: IconThemeData(color: ParentColors.licorice);
271274
var dividerColor = isHC ? onSurfaceColor : isDarkMode ? ParentColors
272275
.licorice : ParentColors.tiara;
273-
var dialogBackgroundColor = isDarkMode ? Colors.black : Colors.white;
276+
var dialogBackgroundColor = isDarkMode ? ParentColors.licorice : ParentColors.tiara;
274277

275278
var swatch = ParentColors.makeSwatch(themeColor);
276279

@@ -293,10 +296,6 @@ class _ParentThemeState extends State<ParentTheme> {
293296
buttonTheme: ButtonThemeData(
294297
height: 48, minWidth: 120, textTheme: ButtonTextTheme.primary),
295298
fontFamily: 'Lato',
296-
dialogTheme: DialogTheme(
297-
backgroundColor: dialogBackgroundColor,
298-
surfaceTintColor: Colors.white,
299-
),
300299
tabBarTheme: TabBarTheme(
301300
labelStyle: primaryTextTheme.titleMedium?.copyWith(fontSize: 14),
302301
labelColor: primaryTextTheme.titleMedium?.color,

apps/flutter_parent/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ description: Canvas Parent
2525
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
2626
# Read more about iOS versioning at
2727
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
28-
version: 3.14.0+54
28+
version: 3.15.0+55
2929

3030
module:
3131
androidX: true

apps/parent/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ android {
4141
applicationId "com.instructure.parentapp"
4242
minSdkVersion Versions.MIN_SDK
4343
targetSdkVersion Versions.TARGET_SDK
44-
versionCode 55
44+
versionCode 56
4545
versionName "4.0.0"
4646

4747
buildConfigField "boolean", "IS_TESTING", "false"
@@ -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/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/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
}

0 commit comments

Comments
 (0)