Skip to content

Commit

Permalink
Release Student 6.12.0 228 (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannakos authored May 20, 2021
1 parent 359bee2 commit 882879f
Show file tree
Hide file tree
Showing 263 changed files with 8,178 additions and 2,565 deletions.
1 change: 1 addition & 0 deletions apps/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ buildscript {
classpath Plugins.BUILD_SCAN
if (project.coverageEnabled) { classpath Plugins.JACOCO_ANDROID }
classpath Plugins.SQLDELIGHT
classpath Plugins.HILT
}
}

Expand Down
29 changes: 27 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.firebase.crashlytics'
apply from: '../../gradle/coverage.gradle'
apply plugin: 'com.squareup.sqldelight'
apply plugin: 'dagger.hilt.android.plugin'

def coverageEnabled = project.hasProperty('coverage')

Expand Down Expand Up @@ -57,8 +58,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 227
versionName = '6.11.1'
versionCode = 228
versionName = '6.12.0'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down Expand Up @@ -186,6 +187,8 @@ android {

// Fix for Robolectric 4.x
resolutionStrategy.force "org.ow2.asm:asm:7.0"

resolutionStrategy.force Libs.KOTLIN_COROUTINES_CORE
}

/*
Expand Down Expand Up @@ -220,6 +223,14 @@ android {
sourceCompatibility 1.8
targetCompatibility 1.8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}

buildFeatures {
dataBinding true
}
}

dependencies {
Expand Down Expand Up @@ -255,6 +266,7 @@ dependencies {
testImplementation Libs.KOTLIN_COROUTINES_TEST
testImplementation Libs.FIREBASE_CORE
testImplementation Libs.THREETEN_BP
testImplementation Libs.ANDROIDX_CORE_TESTING

implementation (Libs.FIREBASE_ANALYTICS) {
transitive = true
Expand Down Expand Up @@ -296,6 +308,7 @@ dependencies {
implementation Libs.FIREBASE_MESSAGING
implementation Libs.ANDROIDX_PALETTE
implementation Libs.PLAY_CORE
implementation Libs.PLAY_CORE_KTX

/* Job Scheduler */
implementation Libs.FIREBASE_JOB_DISPATCHER
Expand All @@ -306,6 +319,18 @@ dependencies {
/* Qr Code */
implementation(Libs.JOURNEY_ZXING) { transitive = false }
implementation Libs.ZXING

/* AAC */
implementation Libs.VIEW_MODEL
implementation Libs.LIVE_DATA
implementation Libs.VIEW_MODE_SAVED_STATE
implementation Libs.FRAGMENT_KTX
kapt Libs.LIFECYCLE_COMPILER

/* DI */
implementation Libs.HILT
kapt Libs.HILT_COMPILER

implementation "com.google.firebase:firebase-crashlytics-ndk:17.2.1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class SettingsE2ETest : StudentTest() {

legalPage.assertPageObjects()
Espresso.pressBack() // Exit legal page

settingsPage.launchHelpPage()

// May be brittle. See comments in HelpPage.kt.
helpPage.assertPageObjects()
}

// The remote config settings page (only available on debug builds) used to do some
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package com.instructure.student.ui.interaction
import androidx.test.espresso.Espresso
import com.instructure.canvas.espresso.mockCanvas.MockCanvas
import com.instructure.canvas.espresso.mockCanvas.addAccountNotification
import com.instructure.canvas.espresso.mockCanvas.addGroupToCourse
import com.instructure.canvas.espresso.mockCanvas.init
import com.instructure.panda_annotations.FeatureCategory
import com.instructure.panda_annotations.Priority
Expand Down Expand Up @@ -61,16 +62,16 @@ class DashboardInteractionTest : StudentTest() {
fun testDashboardCourses_addFavorite() {
// Starring should add course to favorite list

val data = getToDashboard(courseCount = 2,favoriteCourseCount = 1)
val nonFavorite = data.courses.values.filter {x -> !x.isFavorite}.first()
val data = getToDashboard(courseCount = 2, favoriteCourseCount = 1)
val nonFavorite = data.courses.values.filter { x -> !x.isFavorite }.first()

dashboardPage.assertCourseNotShown(nonFavorite)

dashboardPage.editFavorites()
editFavoritesPage.assertCourseDisplayed(nonFavorite)
editFavoritesPage.assertCourseNotFavorited(nonFavorite)
editFavoritesPage.toggleCourse(nonFavorite)
editFavoritesPage.assertCourseFavorited(nonFavorite)
editDashboardPage.assertCourseDisplayed(nonFavorite)
editDashboardPage.assertCourseNotFavorited(nonFavorite)
editDashboardPage.favoriteCourse(nonFavorite)
editDashboardPage.assertCourseFavorited(nonFavorite)

Espresso.pressBack()

Expand All @@ -83,15 +84,15 @@ class DashboardInteractionTest : StudentTest() {
// Un-starring should remove course from favorite list

val data = getToDashboard(courseCount = 2, favoriteCourseCount = 2)
val favorite = data.courses.values.filter {x -> x.isFavorite}.first()
val favorite = data.courses.values.filter { x -> x.isFavorite }.first()

dashboardPage.assertDisplaysCourse(favorite)

dashboardPage.editFavorites()
editFavoritesPage.assertCourseDisplayed(favorite)
editFavoritesPage.assertCourseFavorited(favorite)
editFavoritesPage.toggleCourse(favorite)
editFavoritesPage.assertCourseNotFavorited(favorite)
editDashboardPage.assertCourseDisplayed(favorite)
editDashboardPage.assertCourseFavorited(favorite)
editDashboardPage.unfavoriteCourse(favorite)
editDashboardPage.assertCourseNotFavorited(favorite)

Espresso.pressBack()

Expand All @@ -102,25 +103,38 @@ class DashboardInteractionTest : StudentTest() {

@Test
@TestMetaData(Priority.P1, FeatureCategory.DASHBOARD, TestCategory.INTERACTION)
fun testDashboardCourses_seeAll() {
// Clicking "See all" should show all courses

// Verify that favorite courses are showing
val data = getToDashboard(courseCount=2, favoriteCourseCount=1)
val favorites = data.courses.values.filter {x -> x.isFavorite}
val all = data.courses.values
dashboardPage.assertDisplaysCourses()
for(course in favorites) {
dashboardPage.assertDisplaysCourse(course)
}
fun testDashboardCourses_addAllToFavorites() {
val data = getToDashboard(courseCount = 3, favoriteCourseCount = 0)
val toFavorite = data.courses.values

// Verify that all courses show in "See All" page
dashboardPage.assertSeeAllDisplayed()
dashboardPage.clickSeeAll()
for(course in all) {
allCoursesPage.assertDisplaysCourse(course)
}
allCoursesPage.assertDisplaysAllCourses()
data.courses.values.forEach { dashboardPage.assertDisplaysCourse(it) }

dashboardPage.editFavorites()
toFavorite.forEach { editDashboardPage.assertCourseNotFavorited(it) }
editDashboardPage.selectAllCourses()
toFavorite.forEach { editDashboardPage.assertCourseFavorited(it) }

Espresso.pressBack()

toFavorite.forEach { dashboardPage.assertDisplaysCourse(it) }
}

@Test
@TestMetaData(Priority.P1, FeatureCategory.DASHBOARD, TestCategory.INTERACTION)
fun testDashboardCourses_removeAllFromFavorites() {
val data = getToDashboard(courseCount = 3, favoriteCourseCount = 2)
val toRemove = data.courses.values.filter { it.isFavorite }

toRemove.forEach { dashboardPage.assertDisplaysCourse(it) }

dashboardPage.editFavorites()
toRemove.forEach { editDashboardPage.assertCourseFavorited(it) }
editDashboardPage.unselectAllCourses()
toRemove.forEach { editDashboardPage.assertCourseNotFavorited(it) }

Espresso.pressBack()

data.courses.values.forEach { dashboardPage.assertDisplaysCourse(it) }
}

@Test
Expand All @@ -138,7 +152,7 @@ class DashboardInteractionTest : StudentTest() {
@TestMetaData(Priority.P1, FeatureCategory.DASHBOARD, TestCategory.INTERACTION)
fun testDashboardAnnouncement_dismiss() {
// Tapping dismiss should remove the announcement. Refresh should not display it again.
val data = getToDashboard(courseCount = 1,favoriteCourseCount = 1,announcementCount = 1)
val data = getToDashboard(courseCount = 1, favoriteCourseCount = 1, announcementCount = 1)
val announcement = data.accountNotifications.values.first()
dashboardPage.assertAnnouncementShowing(announcement)
dashboardPage.dismissAnnouncement()
Expand All @@ -151,7 +165,7 @@ class DashboardInteractionTest : StudentTest() {
@TestMetaData(Priority.P1, FeatureCategory.DASHBOARD, TestCategory.INTERACTION)
fun testDashboardAnnouncement_view() {
// Tapping global announcement displays the content
val data = getToDashboard(courseCount = 1,favoriteCourseCount = 1,announcementCount = 1)
val data = getToDashboard(courseCount = 1, favoriteCourseCount = 1, announcementCount = 1)
val announcement = data.accountNotifications.values.first()
dashboardPage.assertAnnouncementShowing(announcement)
dashboardPage.tapAnnouncementAndAssertDisplayed(announcement)
Expand All @@ -169,7 +183,7 @@ class DashboardInteractionTest : StudentTest() {
courseBrowserPage.assertTitleCorrect(course)
var tabs = data.courseTabs[course.id]
assertNotNull("Expected course tabs to be populated", tabs)
for(tab in tabs!!) {
for (tab in tabs!!) {
courseBrowserPage.assertTabDisplayed(tab)
}
}
Expand Down
Loading

0 comments on commit 882879f

Please sign in to comment.