Skip to content

Commit

Permalink
Release Teacher 1.14.1 (43) (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermannakos authored Sep 14, 2021
1 parent daac6b9 commit 0772367
Show file tree
Hide file tree
Showing 262 changed files with 11,779 additions and 1,165 deletions.
14 changes: 7 additions & 7 deletions apps/flutter_parent/lib/l10n/res/intl_sv.arb
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
"type": "text",
"placeholders": {}
},
"domainSearchHelpBody": "Försök med att söka efter namnet på skolan eller distrikten du vill ansluta till, t.ex. “Allmänna skolan” eller “Skolor i Skåne”. Du kan även ange en Canvas-domän direkt, t.ex. “smith.instructure.com.”\n\nMer information om hur du kan hitta din institutions Canvas-konto finns på {canvasGuides} eller kontakta {canvasSupport} eller din skola för att få hjälp.",
"domainSearchHelpBody": "Försök med att söka efter namnet på skolan eller distrikten du vill ansluta till, t.ex. “Allmänna skolan” eller “Skolor i Skåne”. Du kan även ange en Canvas-domän direkt, t.ex. “smith.instructure.com.”\n\nMer information om hur du kan hitta din lärosätes Canvas-konto finns på {canvasGuides} eller kontakta {canvasSupport} eller din skola för att få hjälp.",
"@domainSearchHelpBody": {
"description": "The body text shown in the help dialog on the domain search screen",
"type": "text",
Expand Down Expand Up @@ -511,7 +511,7 @@
"howMany": {}
}
},
"Download": "Ladda ned",
"Download": "Ladda ner",
"@Download": {
"description": "Label for the button that will begin downloading a file",
"type": "text",
Expand Down Expand Up @@ -965,7 +965,7 @@
"type": "text",
"placeholders": {}
},
"Institution Announcement": "Institutionsmeddelande",
"Institution Announcement": "Meddelande från lärosätet",
"@Institution Announcement": {
"description": "Title for alerts when there is an institution announcement",
"type": "text",
Expand Down Expand Up @@ -1081,7 +1081,7 @@
"type": "text",
"placeholders": {}
},
"Incomplete": "ofullständig",
"Incomplete": "Inte färdig",
"@Incomplete": {
"description": "Grading status for an assignment marked as incomplete",
"type": "text",
Expand Down Expand Up @@ -1154,7 +1154,7 @@
"type": "text",
"placeholders": {}
},
"Institution Announcements": "Institutionsannonseringar",
"Institution Announcements": "Meddelande från lärosätet",
"@Institution Announcements": {
"type": "text",
"placeholders": {}
Expand Down Expand Up @@ -2025,7 +2025,7 @@
"type": "text",
"placeholders": {}
},
"Interactions on this page are limited by your institution.": "Interaktioner på den här sidan har begränsats av din institution.",
"Interactions on this page are limited by your institution.": "Interaktioner på den här sidan har begränsats av ditt lärosäte.",
"@Interactions on this page are limited by your institution.": {
"description": "Message describing how the webview has limited access due to an instution setting",
"type": "text",
Expand Down Expand Up @@ -2128,7 +2128,7 @@
"type": "text",
"placeholders": {}
},
"We are unable to display this link, it may belong to an institution you currently aren't logged in to.": "Det går inte att visa den här länken. Den kan tillhöra en institution du för närvarande inte är inloggad på.",
"We are unable to display this link, it may belong to an institution you currently aren't logged in to.": "Det går inte att visa den här länken. Den kan tillhöra ett lärosäte du för närvarande inte är inloggad på.",
"@We are unable to display this link, it may belong to an institution you currently aren't logged in to.": {
"description": "Description for error page shown when clicking a link",
"type": "text",
Expand Down
2 changes: 1 addition & 1 deletion apps/flutter_parent/lib/l10n/res/intl_sv_instk12.arb
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@
"howMany": {}
}
},
"Download": "Ladda ned",
"Download": "Ladda ner",
"@Download": {
"description": "Label for the button that will begin downloading a file",
"type": "text",
Expand Down
6 changes: 3 additions & 3 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply from: '../../gradle/coverage.gradle'
apply plugin: 'com.squareup.sqldelight'
apply plugin: 'dagger.hilt.android.plugin'

def updatePriority = 0
def updatePriority = 2
def coverageEnabled = project.hasProperty('coverage')

if (coverageEnabled) {
Expand Down Expand Up @@ -59,8 +59,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 228
versionName = '6.12.0'
versionCode = 230
versionName = '6.14.0'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class ElementaryDashboardInteractionTest : StudentTest() {
// We have to add this delay to be sure that the remote config is already fetched before we want to override remote config values.
Thread.sleep(3000)
RemoteConfigPrefs.putString(RemoteConfigParam.K5_DESIGN.rc_name, "true")
FeatureFlagPrefs.showInProgressK5Tabs = true

val data = MockCanvas.init(
studentCount = 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
/*
* Copyright (C) 2021 - present Instructure, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.instructure.student.ui.interaction

import com.instructure.canvas.espresso.containsTextCaseInsensitive
import com.instructure.canvas.espresso.mockCanvas.MockCanvas
import com.instructure.canvas.espresso.mockCanvas.addCourseWithEnrollment
import com.instructure.canvas.espresso.mockCanvas.init
import com.instructure.canvasapi2.models.Enrollment
import com.instructure.canvasapi2.utils.RemoteConfigParam
import com.instructure.canvasapi2.utils.RemoteConfigPrefs
import com.instructure.espresso.page.getStringFromResource
import com.instructure.panda_annotations.FeatureCategory
import com.instructure.panda_annotations.Priority
import com.instructure.panda_annotations.TestCategory
import com.instructure.panda_annotations.TestMetaData
import com.instructure.student.R
import com.instructure.student.ui.utils.StudentTest
import com.instructure.student.ui.utils.tokenLoginElementary
import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Test

@HiltAndroidTest
class GradesInteractionTest : StudentTest() {

override fun displaysPageObjects() = Unit

@Test
@TestMetaData(Priority.P0, FeatureCategory.K5_DASHBOARD, TestCategory.INTERACTION)
fun testShowGrades() {
val data = createMockData(courseCount = 3)
goToGrades(data)

gradesPage.assertPageObjects()

data.courses.forEach {
gradesPage.assertCourseShownWithGrades(it.value.name, "B+")
}
}

@Test
@TestMetaData(Priority.P1, FeatureCategory.K5_DASHBOARD, TestCategory.INTERACTION)
fun testRefresh() {
val data = createMockData(courseCount = 3)
goToGrades(data)

gradesPage.assertPageObjects()

data.courses.forEach {
gradesPage.assertCourseShownWithGrades(it.value.name, "B+")
}

val newCourse = data.addCourseWithEnrollment(data.students[0], Enrollment.EnrollmentType.Student, 50.0)

gradesPage.refresh()

gradesPage.assertCourseShownWithGrades(newCourse.name, "50%")
}

@Test
@TestMetaData(Priority.P2, FeatureCategory.K5_DASHBOARD, TestCategory.INTERACTION)
fun testEmptyView() {
val data = createMockData(homeroomCourseCount = 1)
goToGrades(data)

gradesPage.assertEmptyViewVisible()
gradesPage.assertRecyclerViewNotVisible()
}

@Test
@TestMetaData(Priority.P1, FeatureCategory.K5_DASHBOARD, TestCategory.INTERACTION)
fun testOpenCourseGrades() {
val data = createMockData(courseCount = 3)
goToGrades(data)

val course = data.courses.values.first()

gradesPage.clickGradeRow(course.name)
courseGradesPage.assertPageObjects()
courseGradesPage.assertTotalGrade(containsTextCaseInsensitive("B+"))
}

@Test
@TestMetaData(Priority.P1, FeatureCategory.K5_DASHBOARD, TestCategory.INTERACTION)
fun testChangeGradingPeriod() {
val data = createMockData(courseCount = 3, withGradingPeriods = true)
goToGrades(data)

gradesPage.assertSelectedGradingPeriod(gradesPage.getStringFromResource(R.string.currentGradingPeriod))
gradesPage.clickGradingPeriodSelector()

val gradingPeriod = data.courseGradingPeriods.values.first().first()
gradesPage.selectGradingPeriod(gradingPeriod.title!!)
gradesPage.assertSelectedGradingPeriod(gradingPeriod.title!!)
}

private fun createMockData(
courseCount: Int = 0,
withGradingPeriods: Boolean = false,
homeroomCourseCount: Int = 0): MockCanvas {

// We have to add this delay to be sure that the remote config is already fetched before we want to override remote config values.
Thread.sleep(3000)
RemoteConfigPrefs.putString(RemoteConfigParam.K5_DESIGN.rc_name, "true")

return MockCanvas.init(
studentCount = 1,
courseCount = courseCount,
withGradingPeriods = withGradingPeriods,
homeroomCourseCount = homeroomCourseCount)
}

private fun goToGrades(data: MockCanvas) {
val student = data.students[0]
val token = data.tokenFor(student)!!
tokenLoginElementary(data.domain, token, student)
elementaryDashboardPage.waitForRender()
elementaryDashboardPage.selectGradesTab()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class HomeroomInteractionTest : StudentTest() {

homeroomPage.assertPageObjects()

homeroomPage.openCourseAnnouncment(courseAnnouncement.title!!)
homeroomPage.openCourseAnnouncement(courseAnnouncement.title!!)

discussionDetailsPage.assertPageObjects()
discussionDetailsPage.assertTitleText(courseAnnouncement.title!!)
Expand Down
Loading

0 comments on commit 0772367

Please sign in to comment.