Skip to content

Commit

Permalink
Merge pull request #2425 from instructure/release/student-7.3.0-261
Browse files Browse the repository at this point in the history
Release Student 7.3.0 (261)
  • Loading branch information
hermannakos authored May 6, 2024
2 parents b07d64f + 95b8875 commit a1a54b2
Show file tree
Hide file tree
Showing 197 changed files with 5,143 additions and 672 deletions.
2 changes: 1 addition & 1 deletion apps/flutter_parent/lib/l10n/res/intl_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
"placeholders_order": [],
"placeholders": {}
},
"pointsPossible": "{points}の可能なポイント",
"pointsPossible": "配点 {points}",
"@pointsPossible": {
"description": "Screen reader label used for the points possible for an assignment, quiz, etc.",
"type": "text",
Expand Down
2 changes: 1 addition & 1 deletion apps/flutter_parent/lib/models/assignment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ abstract class Assignment implements Built<Assignment, AssignmentBuilder> {

SubmissionStatus getStatus({required String? studentId}) {
final submission = this.submission(studentId);
if (!isSubmittable()) {
if (!isSubmittable() && submission == null) {
return SubmissionStatus.NONE;
} else if (submission?.isLate == true) {
return SubmissionStatus.LATE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ class _AssignmentDetailsScreenState extends State<AssignmentDetailsScreen> {
final assignment = snapshot.data!.assignment!;
final submission = assignment.submission(_currentStudent?.id);
final fullyLocked = assignment.isFullyLocked;
final showStatus = assignment.isSubmittable() || submission?.isGraded() == true;
final missing = submission?.missing == true;
final showStatus = missing || assignment.isSubmittable() || submission?.isGraded() == true;
final submitted = submission?.submittedAt != null;
final submittedColor = submitted ? ParentTheme.of(context)?.successColor : textTheme.bodySmall?.color;

Expand Down Expand Up @@ -172,9 +173,9 @@ class _AssignmentDetailsScreenState extends State<AssignmentDetailsScreen> {
if (showStatus) SizedBox(width: 8),
if (showStatus)
Text(
!submitted
? l10n.assignmentNotSubmittedLabel
: submission?.isGraded() == true ? l10n.assignmentGradedLabel : l10n.assignmentSubmittedLabel,
missing ? l10n.assignmentMissingSubmittedLabel :
!submitted ? l10n.assignmentNotSubmittedLabel :
submission?.isGraded() == true ? l10n.assignmentGradedLabel : l10n.assignmentSubmittedLabel,
style: textTheme.bodySmall?.copyWith(
color: submittedColor,
),
Expand Down
4 changes: 2 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 260
versionName = '7.2.0'
versionCode = 261
versionName = '7.3.0'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import com.instructure.canvas.espresso.TestCategory
import com.instructure.canvas.espresso.TestMetaData
import com.instructure.dataseeding.api.DiscussionTopicsApi
import com.instructure.espresso.ViewUtils
import com.instructure.espresso.getCurrentDateInCanvasFormat
import com.instructure.espresso.getDateInCanvasFormat
import com.instructure.student.ui.utils.StudentTest
import com.instructure.student.ui.utils.seedData
import com.instructure.student.ui.utils.tokenLogin
Expand Down Expand Up @@ -154,7 +154,7 @@ class DiscussionsE2ETest: StudentTest() {
discussionListPage.assertUnreadReplyCount(newTopicName, 0)

Log.d(STEP_TAG, "Assert that the due date is the current date (in the expected format).")
val currentDate = getCurrentDateInCanvasFormat()
val currentDate = getDateInCanvasFormat()
discussionListPage.assertDueDate(newTopicName, currentDate)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,10 @@ class InboxE2ETest: StudentTest() {
tokenLogin(teacher)
dashboardPage.waitForRender()

Log.d(STEP_TAG,"Open Inbox Page. Assert that the asked question is displayed in the teacher's inbox with the proper recipients ($recipientList) and message ($questionText).")
Log.d(STEP_TAG,"Open Inbox Page. Assert that the asked question is displayed in the teacher's inbox with the proper recipients ($recipientList), subject and message ($questionText).")
dashboardPage.clickInboxTab()
inboxPage.assertConversationWithRecipientsDisplayed(recipientList)
inboxPage.assertConversationSubject("(No Subject)")
inboxPage.assertConversationDisplayed(questionText)

Log.d(STEP_TAG, "Open the conversation and assert that there is no subject of the conversation and the message body is equal to which the student typed in the 'Ask Your Instructor' dialog: '$questionText'.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ class ModulesE2ETest: StudentTest() {
Log.d(PREPARATION_TAG,"Associate '${assignment2.name}' assignment with '${module2.name}' module.")
ModulesApi.createModuleItem(course.id, teacher.token, module2.id, assignment2.name, ModuleItemTypes.ASSIGNMENT.stringVal, contentId = assignment2.id.toString())

Log.d(PREPARATION_TAG,"Associate '${page1.title}' page with '${module2.name}' module.")
ModulesApi.createModuleItem(course.id, teacher.token, module2.id, page1.title, ModuleItemTypes.PAGE.stringVal, pageUrl = page1.url)

Log.d(PREPARATION_TAG,"Associate '${discussionTopic1.title}' discussion topic with '${module2.name}' module.")
ModulesApi.createModuleItem(course.id, teacher.token, module2.id, discussionTopic1.title, ModuleItemTypes.DISCUSSION.stringVal, contentId = discussionTopic1.id.toString())

Log.d(PREPARATION_TAG,"Associate '${quiz1.title}' page with '${module2.name}' module.")
ModulesApi.createModuleItem(course.id, teacher.token, module2.id, page1.title, ModuleItemTypes.PAGE.stringVal, pageUrl = page1.url)

Log.d(STEP_TAG, "Login with user: ${teacher.name}, login id: ${teacher.loginId}.")
tokenLogin(student)
dashboardPage.waitForRender()
Expand Down Expand Up @@ -149,9 +149,61 @@ class ModulesE2ETest: StudentTest() {
modulesPage.clickOnModuleExpandCollapseIcon(module2.name)
modulesPage.assertModulesAndItemsCount(7) // 2 modules titles, 2 module items in first module, 3 items in second module

Log.d(STEP_TAG, "Assert that '${assignment1.name}' module item is displayed and open it. Assert that the Assignment Details page is displayed with the corresponding assignment title.")
Log.d(STEP_TAG, "Assert that '${assignment1.name}' module item is displayed and open it. Assert that the Assignment Details page is displayed with the corresponding assignment name: '${assignment1.name}'.")
modulesPage.assertAndClickModuleItem(module1.name, assignment1.name, true)
assignmentDetailsPage.assertPageObjects()
assignmentDetailsPage.assertAssignmentTitle(assignment1.name)

Log.d(STEP_TAG, "Assert that the module name, '${module1.name}' is displayed at the bottom.")
assignmentDetailsPage.moduleItemInteractions.assertModuleNameDisplayed(module1.name)

Log.d(STEP_TAG, "Assert that the previous arrow button is not displayed because the user is on the first module item's details page, but the next arrow button is displayed.")
assignmentDetailsPage.moduleItemInteractions.assertPreviousArrowNotDisplayed()
assignmentDetailsPage.moduleItemInteractions.assertNextArrowDisplayed()

Log.d(STEP_TAG, "Click on the next arrow button and assert that the '${quiz1.title}' quiz module item's 'Go To Quiz' page is displayed.")
assignmentDetailsPage.moduleItemInteractions.clickOnNextArrow()
goToQuizPage.assertQuizTitle(quiz1.title)

Log.d(STEP_TAG, "Assert that the module name, '${module1.name}' is displayed at the bottom.")
goToQuizPage.moduleItemInteractions.assertModuleNameDisplayed(module1.name)

Log.d(STEP_TAG, "Assert that both the previous and the next buttons are displayed (since we are not at the first or the last module item details page).")
goToQuizPage.moduleItemInteractions.assertPreviousArrowDisplayed()
goToQuizPage.moduleItemInteractions.assertNextArrowDisplayed()

Log.d(STEP_TAG, "Click on the next arrow button and assert that the Assignment Details Page is displayed with the corresponding assignment name: '${assignment2.name}'.")
goToQuizPage.moduleItemInteractions.clickOnNextArrow()
assignmentDetailsPage.assertPageObjects()
assignmentDetailsPage.assertAssignmentTitle(assignment2.name)

Log.d(STEP_TAG, "Assert that the second module name, '${module2.name}' is displayed at the bottom since we can navigate even between modules with these arrows.")
assignmentDetailsPage.moduleItemInteractions.assertModuleNameDisplayed(module2.name)

Log.d(STEP_TAG, "Assert that both the previous and the next buttons are displayed (since we are not at the first or the last module item details page, even if it's a first item of a module, but of the second module).")
assignmentDetailsPage.moduleItemInteractions.assertPreviousArrowDisplayed()
assignmentDetailsPage.moduleItemInteractions.assertNextArrowDisplayed()

Log.d(STEP_TAG, "Click on the next arrow button and assert that the '${discussionTopic1.title}' discussion topic module item's details page is displayed.")
assignmentDetailsPage.moduleItemInteractions.clickOnNextArrow()
discussionDetailsPage.assertTitleText(discussionTopic1.title)

Log.d(STEP_TAG, "Assert that the second module name, '${module2.name}' is displayed at the bottom.")
discussionDetailsPage.moduleItemInteractions.assertModuleNameDisplayed(module2.name)

Log.d(STEP_TAG, "Assert that both the previous and the next buttons are displayed.")
discussionDetailsPage.moduleItemInteractions.assertPreviousArrowDisplayed()
discussionDetailsPage.moduleItemInteractions.assertNextArrowDisplayed()

Log.d(STEP_TAG, "Click on the next arrow button and assert that the '${page1.url}' page module item's details page is displayed.")
discussionDetailsPage.moduleItemInteractions.clickOnNextArrow()
pageDetailsPage.webAssertPageUrl(page1.url)

Log.d(STEP_TAG, "Assert that the second module name, '${module2.name}' is displayed at the bottom.")
pageDetailsPage.moduleItemInteractions.assertModuleNameDisplayed(module2.name)

Log.d(STEP_TAG, "Assert that the previous arrow button is displayed but the next arrow button is not displayed because the user is on the last module item's details page.")
pageDetailsPage.moduleItemInteractions.assertPreviousArrowDisplayed()
pageDetailsPage.moduleItemInteractions.assertNextArrowNotDisplayed()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Rule
import org.junit.Test
import org.junit.rules.Timeout
import java.lang.Thread.sleep
import java.util.*

@HiltAndroidTest
Expand All @@ -52,7 +53,7 @@ class ScheduleE2ETest : StudentTest() {

@Rule
@JvmField
var globalTimeout: Timeout = Timeout.millis(600000) // //TODO: workaround for that sometimes this test is running infinite time because of scrollToElement does not find an element.
var globalTimeout: Timeout = Timeout.millis(1200000) // //TODO: workaround for that sometimes this test is running infinite time because of scrollToElement does not find an element.

@Stub
@E2E
Expand Down Expand Up @@ -91,7 +92,6 @@ class ScheduleE2ETest : StudentTest() {

Log.d(STEP_TAG, "Navigate to K5 Schedule Page and assert it is loaded.")
elementaryDashboardPage.selectTab(ElementaryDashboardPage.ElementaryTabType.SCHEDULE)
schedulePage.assertPageObjects()

//Depends on how we handle Sunday, need to clarify with calendar team
if(currentDateCalendar.get(Calendar.DAY_OF_WEEK) != 1) { schedulePage.assertIfCourseHeaderAndScheduleItemDisplayed(homeroomCourse.name, homeroomAnnouncement.title) }
Expand All @@ -110,13 +110,13 @@ class ScheduleE2ETest : StudentTest() {
schedulePage.assertIfCourseHeaderAndScheduleItemDisplayed(nonHomeroomCourses[2].name, testMissingAssignment.name)

Log.d(STEP_TAG, "Scroll to 'Missing Items' section and verify that a missing assignment (${testMissingAssignment.name}) is displayed there with 100 points.")
schedulePage.scrollToItem(R.id.missingItemLayout, testMissingAssignment.name)
schedulePage.assertMissingItemDisplayed(testMissingAssignment.name, nonHomeroomCourses[2].name, "100 pts")
schedulePage.scrollToItem(R.id.metaLayout, testMissingAssignment.name)
schedulePage.assertMissingItemDisplayedOnPlannerItem(testMissingAssignment.name, nonHomeroomCourses[2].name, "100 pts")

Log.d(STEP_TAG, "Refresh the Schedule Page. Assert that the items are still displayed correctly.")
schedulePage.scrollToPosition(0)
schedulePage.refresh()
schedulePage.assertPageObjects()
sleep(3000)

Log.d(STEP_TAG, "Assert that the current day of the calendar is titled as 'Today'.")
schedulePage.assertDayHeaderShownByItemName(concatDayString(currentDateCalendar), schedulePage.getStringFromResource(R.string.today), schedulePage.getStringFromResource(R.string.today))
Expand Down Expand Up @@ -161,6 +161,7 @@ class ScheduleE2ETest : StudentTest() {

Log.d(STEP_TAG, "Navigate back to Schedule Page and assert it is loaded.")
Espresso.pressBack()
sleep(3000)
schedulePage.assertPageObjects()
}

Expand Down
Loading

0 comments on commit a1a54b2

Please sign in to comment.