Skip to content

Commit

Permalink
Merge pull request #1656 from instructure/release/student-6.19.0-242
Browse files Browse the repository at this point in the history
Release Student 6.19.0 (242)
  • Loading branch information
hermannakos authored Jul 21, 2022
2 parents 17390ff + d314515 commit 5506b50
Show file tree
Hide file tree
Showing 161 changed files with 1,302 additions and 1,136 deletions.
2 changes: 1 addition & 1 deletion apps/flutter_parent/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: Canvas Parent
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.3.6+41
version: 3.4.0+42

module:
androidX: true
Expand Down
4 changes: 2 additions & 2 deletions apps/student/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ android {
applicationId "com.instructure.candroid"
minSdkVersion Versions.MIN_SDK
targetSdkVersion Versions.TARGET_SDK
versionCode = 241
versionName = '6.18.2'
versionCode = 242
versionName = '6.19.0'

vectorDrawables.useSupportLibrary = true
multiDexEnabled = true
Expand Down
2 changes: 1 addition & 1 deletion apps/student/flank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gcloud:
test-targets:
- notAnnotation com.instructure.canvas.espresso.E2E, com.instructure.canvas.espresso.Stub, com.instructure.canvas.espresso.FlakyE2E, com.instructure.canvas.espresso.KnownBug
device:
- model: NexusLowRes
- model: Nexus6P
version: 26
locale: en_US
orientation: portrait
Expand Down
2 changes: 1 addition & 1 deletion apps/student/flank_e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gcloud:
- annotation com.instructure.canvas.espresso.E2E
- notAnnotation com.instructure.canvas.espresso.Stub, com.instructure.canvas.espresso.FlakyE2E, com.instructure.canvas.espresso.KnownBug
device:
- model: NexusLowRes
- model: Nexus6P
version: 26
locale: en_US
orientation: portrait
Expand Down
2 changes: 1 addition & 1 deletion apps/student/flank_e2e_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ gcloud:
- annotation com.instructure.canvas.espresso.E2E
- notAnnotation com.instructure.canvas.espresso.Stub
device:
- model: NexusLowRes
- model: Nexus6P
version: 26
locale: en_US
orientation: portrait
Expand Down
2 changes: 1 addition & 1 deletion apps/student/flank_e2e_flaky.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gcloud:
test-targets:
- annotation com.instructure.canvas.espresso.FlakyE2E
device:
- model: NexusLowRes
- model: Nexus6P
version: 26
locale: en_US
orientation: portrait
Expand Down
2 changes: 1 addition & 1 deletion apps/student/flank_e2e_knownbug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gcloud:
test-targets:
- annotation com.instructure.canvas.espresso.KnownBug
device:
- model: NexusLowRes
- model: Nexus6P
version: 26
locale: en_US
orientation: portrait
Expand Down
6 changes: 3 additions & 3 deletions apps/student/flank_multi_api_level.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ gcloud:
test-targets:
- notAnnotation com.instructure.canvas.espresso.E2E, com.instructure.canvas.espresso.Stub
device:
- model: NexusLowRes
- model: Nexus6P
version: 27
locale: en_US
orientation: portrait
- model: NexusLowRes
- model: Nexus6P
version: 28
locale: en_US
orientation: portrait
- model: NexusLowRes
- model: Nexus6P
version: 29
locale: en_US
orientation: portrait
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class FilesE2ETest: StudentTest() {
submissionDetailsPage.assertCommentAttachmentDisplayed(commentUploadInfo.fileName, student)

Log.d(STEP_TAG,"Navigate back to Dashboard Page.")
ViewUtils.pressBackButton(5)
ViewUtils.pressBackButton(4)

Log.d(STEP_TAG,"Navigate to 'Files' menu in user left-side menubar.")
dashboardPage.gotoGlobalFiles()
Expand All @@ -217,7 +217,6 @@ class FilesE2ETest: StudentTest() {

Log.d(STEP_TAG,"Delete $newFileName file.")
fileListPage.deleteFile(newFileName)
fileListPage.assertPageObjects()

Log.d(STEP_TAG,"Assert that empty view is displayed after deletion.")
fileListPage.assertViewEmpty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ package com.instructure.student.ui.e2e

import android.os.SystemClock.sleep
import android.util.Log
import androidx.test.espresso.Espresso
import androidx.test.espresso.matcher.ViewMatchers
import com.instructure.canvas.espresso.E2E
import com.instructure.canvas.espresso.refresh
import com.instructure.canvasapi2.apis.InboxApi
import com.instructure.dataseeding.api.ConversationsApi
import com.instructure.dataseeding.api.GroupsApi
import com.instructure.panda_annotations.FeatureCategory
Expand Down Expand Up @@ -53,26 +57,30 @@ class InboxE2ETest: StudentTest() {
val student1 = data.studentsList[0]
val student2 = data.studentsList[1]

// Create a group and put both students in it
val groupCategory = GroupsApi.createCourseGroupCategory(course.id, teacher.token)
val group = GroupsApi.createGroup(groupCategory.id, teacher.token)
Log.d(PREPARATION_TAG, "Create group membership for ${student1.name} and ${student2.name} students to the group: ${group.name}.")
GroupsApi.createGroupMembership(group.id, student1.id, teacher.token)
GroupsApi.createGroupMembership(group.id, student2.id, teacher.token)

Log.d(PREPARATION_TAG,"Seed an email from the teacher to ${student1.name} and ${student2.name} students.")
val seededConversation = ConversationsApi.createConversation(
token = teacher.token,
recipients = listOf(student1.id.toString(), student2.id.toString())
).get(0)

Log.d(STEP_TAG,"Login with user: ${student1.name}, login id: ${student1.loginId} , password: ${student1.password}")
tokenLogin(student1)
dashboardPage.waitForRender()
dashboardPage.assertDisplaysCourse(course)

Log.d(STEP_TAG,"Open Inbox Page. Assert that the previously seeded conversation is displayed.")
dashboardPage.clickInboxTab()
inboxPage.assertPageObjects() //TODO: Refactor to assert to the empty view just like in teacher would be better. AFTER THAT, seed the conversation.
inboxPage.assertInboxEmpty()

Log.d(PREPARATION_TAG,"Seed an email from the teacher to ${student1.name} and ${student2.name} students.")
val seededConversation = ConversationsApi.createConversation(
token = teacher.token,
recipients = listOf(student1.id.toString(), student2.id.toString())
)[0]

Log.d(STEP_TAG,"Refresh the page. Assert that there is a conversation and it is the previously seeded one.")
refresh()
inboxPage.assertHasConversation()
inboxPage.assertConversationDisplayed(seededConversation)

Log.d(STEP_TAG,"Click on 'New Message' button.")
Expand Down Expand Up @@ -123,7 +131,58 @@ class InboxE2ETest: StudentTest() {
Log.d(STEP_TAG,"Open Inbox Page. Assert that both, the previously seeded 'normal' conversation and the group conversation are displayed.")
dashboardPage.clickInboxTab()
inboxPage.assertConversationDisplayed(seededConversation)
inboxPage.assertConversationDisplayed("Hey There")
inboxPage.assertConversationDisplayed(newMessageSubject)
inboxPage.assertConversationDisplayed("Group Message")

Log.d(STEP_TAG,"Select $newGroupMessageSubject conversation.")
inboxPage.selectConversation(newMessageSubject)
val newReplyMessage = "This is a quite new reply message."
Log.d(STEP_TAG,"Reply to $newGroupMessageSubject conversation with '$newReplyMessage' message. Assert that the reply is displayed.")
inboxConversationPage.replyToMessage(newReplyMessage)

Log.d(STEP_TAG,"Delete $newReplyMessage reply and assert is has been deleted.")
inboxConversationPage.deleteMessage(newReplyMessage)
inboxConversationPage.assertMessageNotDisplayed(newReplyMessage)

Log.d(STEP_TAG,"Delete the whole '$newGroupMessageSubject' subject and assert that it has been removed from the conversation list on the Inbox Page.")
inboxConversationPage.deleteConversation() //After deletion we will be navigated back to Inbox Page
inboxPage.assertConversationNotDisplayed(newMessageSubject)
inboxPage.assertConversationDisplayed(seededConversation)
inboxPage.assertConversationDisplayed("Group Message")

Log.d(STEP_TAG,"Select ${seededConversation.subject} conversation. Assert that is has not been starred already.")
inboxPage.selectConversation(seededConversation)
inboxConversationPage.assertNotStarred()

Log.d(STEP_TAG,"Toggle Starred to mark ${seededConversation.subject} conversation as favourite. Assert that it has became starred.")
inboxConversationPage.toggleStarred()
inboxConversationPage.assertStarred()

Log.d(STEP_TAG,"Navigate back to Inbox Page and assert that the conversation itself is starred as well.")
Espresso.pressBack() // To main inbox page
inboxPage.assertConversationStarred(seededConversation.subject)

Log.d(STEP_TAG,"Select ${seededConversation.subject} conversation. Mark as Unread by clicking on the 'More Options' menu, 'Mark as Unread' menu point.")
inboxPage.assertUnreadMarkerVisibility(seededConversation.subject, ViewMatchers.Visibility.GONE)
inboxPage.selectConversation(seededConversation)
inboxConversationPage.markUnread() //After select 'Mark as Unread', we will be navigated back to Inbox Page

Log.d(STEP_TAG,"Assert that ${seededConversation.subject} conversation has been marked as unread.")
inboxPage.assertUnreadMarkerVisibility(seededConversation.subject, ViewMatchers.Visibility.VISIBLE)

Log.d(STEP_TAG,"Select ${seededConversation.subject} conversation. Archive it by clicking on the 'More Options' menu, 'Archive' menu point.")
inboxPage.selectConversation(seededConversation)
inboxConversationPage.archive() //After select 'Archive', we will be navigated back to Inbox Page

Log.d(STEP_TAG,"Assert that ${seededConversation.subject} conversation has removed from 'All' tab.") //TODO: Discuss this logic if it's ok if we don't show Archived messages on 'All' tab...
inboxPage.assertConversationNotDisplayed(seededConversation)

Log.d(STEP_TAG,"Select 'Archived' conversation filter.")
inboxPage.selectInboxScope(InboxApi.Scope.ARCHIVED)

Log.d(STEP_TAG,"Assert that ${seededConversation.subject} conversation is displayed by the 'Archived' filter, and other conversations are not displayed.")
inboxPage.assertConversationDisplayed(seededConversation)
inboxPage.assertConversationNotDisplayed("Group Message")

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ class SettingsE2ETest : StudentTest() {

Log.d(PREPARATION_TAG, "Seeding data.")
val data = seedData(students = 1, teachers = 1, courses = 1)
val teacher = data.teachersList[0]
val student = data.studentsList[0]

Log.d(STEP_TAG, "Login with user: ${teacher.name}, login id: ${teacher.loginId} , password: ${teacher.password}")
tokenLogin(teacher)
Log.d(STEP_TAG, "Login with user: ${student.name}, login id: ${student.loginId} , password: ${student.password}")
tokenLogin(student)
dashboardPage.waitForRender()

Log.d(STEP_TAG, "Navigate to User Settings Page.")
dashboardPage.launchSettingsPage()
settingsPage.assertPageObjects()

Log.d(STEP_TAG, "Open Profile Settings Page.")
settingsPage.launchProfileSettings()
settingsPage.openProfileSettings()
profileSettingsPage.assertPageObjects()

val newUserName = "John Doe"
Expand All @@ -78,7 +78,7 @@ class SettingsE2ETest : StudentTest() {
Log.d(STEP_TAG, "Navigate to Settings Page again and open Panda Avatar Creator.")
dashboardPage.launchSettingsPage()
settingsPage.assertPageObjects()
settingsPage.launchProfileSettings()
settingsPage.openProfileSettings()
profileSettingsPage.assertPageObjects()
profileSettingsPage.launchPandaAvatarCreator()

Expand Down Expand Up @@ -106,6 +106,55 @@ class SettingsE2ETest : StudentTest() {

}

@E2E
@Test
@TestMetaData(Priority.IMPORTANT, FeatureCategory.SETTINGS, TestCategory.E2E)
fun testDarkModeE2E() {
Log.d(PREPARATION_TAG, "Seeding data.")
val data = seedData(students = 1, teachers = 1, courses = 1)
val student = data.studentsList[0]
val course = data.coursesList[0]

Log.d(STEP_TAG, "Login with user: ${student.name}, login id: ${student.loginId} , password: ${student.password}")
tokenLogin(student)
dashboardPage.waitForRender()

Log.d(STEP_TAG, "Navigate to User Settings Page.")
dashboardPage.launchSettingsPage()
settingsPage.assertPageObjects()

Log.d(STEP_TAG,"Navigate to Settings Page and open App Theme Settings.")
settingsPage.openAppThemeSettings()

Log.d(STEP_TAG,"Select Dark App Theme and assert that the App Theme Title and Status has the proper text color (which is used in Dark mode).")
settingsPage.selectAppTheme("Dark")
settingsPage.assertAppThemeTitleTextColor("#FFFFFFFF") //Currently, this color is used in the Dark mode for the AppTheme Title text.
settingsPage.assertAppThemeStatusTextColor("#FFC7CDD1") //Currently, this color is used in the Dark mode for the AppTheme Status text.

Log.d(STEP_TAG,"Navigate back to Dashboard. Assert that the 'Courses' label has the proper text color (which is used in Dark mode).")
Espresso.pressBack()
dashboardPage.assertCourseLabelTextColor("#FFFFFFFF")

Log.d(STEP_TAG,"Select ${course.name} course and assert on the Course Browser Page that the tabs has the proper text color (which is used in Dark mode).")
dashboardPage.selectCourse(course)
courseBrowserPage.assertTabLabelTextColor("Discussions","#FFFFFFFF")
courseBrowserPage.assertTabLabelTextColor("Grades","#FFFFFFFF")

Log.d(STEP_TAG,"Navigate to Settings Page and open App Theme Settings again.")
Espresso.pressBack()
dashboardPage.launchSettingsPage()
settingsPage.openAppThemeSettings()

Log.d(STEP_TAG,"Select Light App Theme and assert that the App Theme Title and Status has the proper text color (which is used in Light mode).")
settingsPage.selectAppTheme("Light")
settingsPage.assertAppThemeTitleTextColor("#FF2D3B45") //Currently, this color is used in the Light mode for the AppTheme Title texts.
settingsPage.assertAppThemeStatusTextColor("#FF556572") //Currently, this color is used in the Light mode for the AppTheme Status text.

Log.d(STEP_TAG,"Navigate back to Dashboard. Assert that the 'Courses' label has the proper text color (which is used in Light mode).")
Espresso.pressBack()
dashboardPage.assertCourseLabelTextColor("#FF2D3B45")
}

@E2E
@Test
@TestMetaData(Priority.MANDATORY, FeatureCategory.SETTINGS, TestCategory.E2E)
Expand All @@ -124,7 +173,7 @@ class SettingsE2ETest : StudentTest() {
settingsPage.assertPageObjects()

Log.d(STEP_TAG, "Click on 'Legal' link to open Legal Page. Assert that Legal Page has opened.")
settingsPage.launchLegalPage()
settingsPage.openLegalPage()
legalPage.assertPageObjects()
}

Expand All @@ -146,7 +195,7 @@ class SettingsE2ETest : StudentTest() {
settingsPage.assertPageObjects()

Log.d(STEP_TAG, "Click on 'About' link to open About Page. Assert that About Page has opened.")
settingsPage.launchAboutPage()
settingsPage.openAboutPage()
aboutPage.assertPageObjects()

Log.d(STEP_TAG,"Check that domain is equal to: ${student.domain} (student's domain).")
Expand Down Expand Up @@ -182,7 +231,7 @@ class SettingsE2ETest : StudentTest() {
RemoteConfigParam.values().forEach {param -> initialValues.put(param.rc_name, RemoteConfigUtils.getString(param))}

Log.d(STEP_TAG, "Navigate to Remote Config Settings Page.")
settingsPage.launchRemoteConfigParams()
settingsPage.openRemoteConfigParams()

RemoteConfigParam.values().forEach { param ->

Expand All @@ -202,7 +251,7 @@ class SettingsE2ETest : StudentTest() {
Espresso.pressBack()

Log.d(STEP_TAG, "Navigate to Remote Config Settings Page.")
settingsPage.launchRemoteConfigParams()
settingsPage.openRemoteConfigParams()

Log.d(STEP_TAG, "Assert that all fields have maintained their initial value.")
RemoteConfigParam.values().forEach { param ->
Expand Down
Loading

0 comments on commit 5506b50

Please sign in to comment.