Skip to content

Commit

Permalink
Merge pull request #2668 from instructure/release/student-7.8.1-271
Browse files Browse the repository at this point in the history
Release Student 7.8.1 (271)
  • Loading branch information
hermannakos authored Dec 10, 2024
2 parents efec90c + 27a082d commit 52432f2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 270
versionName = '7.8.0'
versionCode = 271
versionName = '7.8.1'

vectorDrawables.useSupportLibrary = true
testInstrumentationRunner 'com.instructure.student.espresso.StudentHiltTestRunner'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ class AssignmentsE2ETest: StudentComposeTest() {
submissionDetailsPage.assertSelectedAttempt("Attempt 1")
}

@Stub
@E2E
@Test
@TestMetaData(Priority.IMPORTANT, FeatureCategory.SUBMISSIONS, TestCategory.E2E)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.instructure.canvas.espresso.FeatureCategory
import com.instructure.canvas.espresso.OfflineE2E
import com.instructure.canvas.espresso.Priority
import com.instructure.canvas.espresso.SecondaryFeatureCategory
import com.instructure.canvas.espresso.Stub
import com.instructure.canvas.espresso.TestCategory
import com.instructure.canvas.espresso.TestMetaData
import com.instructure.dataseeding.api.AssignmentGroupsApi
Expand Down Expand Up @@ -48,6 +49,7 @@ class OfflineAssignmentsE2ETest : StudentTest() {

override fun enableAndConfigureAccessibilityChecks() = Unit

@Stub
@OfflineE2E
@Test
@TestMetaData(Priority.MANDATORY, FeatureCategory.ASSIGNMENTS, TestCategory.E2E, SecondaryFeatureCategory.OFFLINE_MODE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ class EnabledTabsImpl(
}
if (uri.pathSegments.contains("courses")) {
val courseIdIndex = uri.pathSegments.indexOf("courses") + 1
val courseId = uri.pathSegments[courseIdIndex]
var courseId = uri.pathSegments[courseIdIndex]
if (courseId.contains("~")) {
val parts = courseId.split("~")
val length = parts[0].length + parts[1].length
val padding = 18 - length
courseId = parts[0] + "0".repeat(padding) + parts[1]
}
return !isPathTabEnabled(courseId.toLong(), uri)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,20 @@ class EnabledTabsTest {
result = enabledTabs.isPathTabNotEnabled(route)
assertFalse(result)
}

@Test
fun `replace ~ in consortia courseId to 0s`() = runTest {
coEvery { courseApi.getFirstPageCourses(any()) } returns DataResult.Success(
listOf(
Course(id = 110000000000000012, tabs = listOf(Tab(tabId = "assignments", htmlUrl = "/courses/11~12/assignments"))),
)
)
enabledTabs.initTabs()

val route = Route(uri = mockUri)
every { mockUri.path } returns "http://www.google.com/courses/11~12/assignments"
every { mockUri.pathSegments } returns listOf("courses", "11~12", "assignments")
val result = enabledTabs.isPathTabNotEnabled(route)
assert(result)
}
}

0 comments on commit 52432f2

Please sign in to comment.