From 8f5b051efeabbca2093b88d4f90f5edfc06c7441 Mon Sep 17 00:00:00 2001 From: "kristof.nemere" Date: Fri, 11 Aug 2023 10:13:09 +0200 Subject: [PATCH 01/24] Version bump --- apps/flutter_parent/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/flutter_parent/pubspec.yaml b/apps/flutter_parent/pubspec.yaml index 021b319332..c87f6a3c72 100644 --- a/apps/flutter_parent/pubspec.yaml +++ b/apps/flutter_parent/pubspec.yaml @@ -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.7.0+45 +version: 3.8.0+46 module: androidX: true From 029f2cea056bbaa2415577ba4aacf6a686fe733f Mon Sep 17 00:00:00 2001 From: "kristof.nemere" Date: Fri, 11 Aug 2023 12:52:29 +0200 Subject: [PATCH 02/24] Fixed alerts filtering issue --- apps/flutter_parent/lib/utils/alert_helper.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/flutter_parent/lib/utils/alert_helper.dart b/apps/flutter_parent/lib/utils/alert_helper.dart index c2c378792d..cdd947e54f 100644 --- a/apps/flutter_parent/lib/utils/alert_helper.dart +++ b/apps/flutter_parent/lib/utils/alert_helper.dart @@ -26,7 +26,7 @@ class AlertsHelper { filteredList.add(element); } else { Course course = await locator().getCourse(courseId, forceRefresh: false); - if (!course.settings.restrictQuantitativeData) { + if (!(course.settings?.restrictQuantitativeData ?? false)) { filteredList.add(element); } } From cd575704fa1d6c2a1188574612ef3a052fb03880 Mon Sep 17 00:00:00 2001 From: Kristof Deak <92309696+kdeakinstructure@users.noreply.github.com> Date: Sat, 19 Aug 2023 20:38:31 +0200 Subject: [PATCH 03/24] [MBL-16737][Student] - Implement not favorited group interaction test on dashboard (#2105) --- .../interaction/GroupLinksInteractionTest.kt | 37 ++++++++++++++++++- .../student/ui/pages/DashboardPage.kt | 9 +++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/GroupLinksInteractionTest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/GroupLinksInteractionTest.kt index 79c3f4a137..aa1c84ccdf 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/GroupLinksInteractionTest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/GroupLinksInteractionTest.kt @@ -25,6 +25,7 @@ import com.instructure.canvas.espresso.mockCanvas.addFolderToCourse import com.instructure.canvas.espresso.mockCanvas.addGroupToCourse import com.instructure.canvas.espresso.mockCanvas.addPageToCourse import com.instructure.canvas.espresso.mockCanvas.init +import com.instructure.canvas.espresso.refresh import com.instructure.canvasapi2.models.Course import com.instructure.canvasapi2.models.DiscussionTopicHeader import com.instructure.canvasapi2.models.Group @@ -72,6 +73,38 @@ class GroupLinksInteractionTest : StudentTest() { dashboardPage.assertDisplaysGroup(group, course) } + // Test not favorite group on dashboard + @Test + @TestMetaData(Priority.IMPORTANT, FeatureCategory.GROUPS, TestCategory.INTERACTION, false, SecondaryFeatureCategory.GROUPS_DASHBOARD) + fun testGroupLink_dashboard_favoriteLogics() { + val data = setUpGroupAndSignIn() + val user = data.users.values.first() + val nonFavoriteGroup = data.addGroupToCourse( + course = course, + members = listOf(user), + isFavorite = false + ) + refresh() //Need to refresh because when we navigated to Dashboard page the nonFavoriteGroup was not existed yet. (However it won't be displayed because it's not favorite) + dashboardPage.assertGroupNotDisplayed(nonFavoriteGroup) + dashboardPage.assertDisplaysGroup(group, course) + } + + // Test that if no groups has selected as favorite then we display all groups + @Test + @TestMetaData(Priority.IMPORTANT, FeatureCategory.GROUPS, TestCategory.INTERACTION, false, SecondaryFeatureCategory.GROUPS_DASHBOARD) + fun testGroupLink_dashboard_not_selected_displays_all() { + val data = setUpGroupAndSignIn(isFavorite = false) + val user = data.users.values.first() + val group2 = data.addGroupToCourse( + course = course, + members = listOf(user), + isFavorite = false + ) + refresh() //Need to refresh because when we navigated to Dashboard page the group2 was not existed yet. + dashboardPage.assertDisplaysGroup(group, course) + dashboardPage.assertDisplaysGroup(group2, course) + } + // Link to file preview opens file - eg: "/groups/:id/files/folder/:id?preview=:id" @Test @TestMetaData(Priority.MANDATORY, FeatureCategory.GROUPS, TestCategory.INTERACTION, false, SecondaryFeatureCategory.GROUPS_FILES) @@ -196,7 +229,7 @@ class GroupLinksInteractionTest : StudentTest() { // Mock a single student and course, mock a group and a number of items associated with the group, // sign in, then navigate to the dashboard. - private fun setUpGroupAndSignIn(): MockCanvas { + private fun setUpGroupAndSignIn(isFavorite: Boolean = true): MockCanvas { // Basic info val data = MockCanvas.init( @@ -211,7 +244,7 @@ class GroupLinksInteractionTest : StudentTest() { group = data.addGroupToCourse( course = course, members = listOf(user), - isFavorite = true + isFavorite = isFavorite ) // Add a discussion diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DashboardPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DashboardPage.kt index 229d1253ee..caa43663b0 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DashboardPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DashboardPage.kt @@ -279,6 +279,15 @@ class DashboardPage : BasePage(R.id.dashboardPage) { onView(matcher).check(doesNotExist()) } + fun assertGroupNotDisplayed(group: Group) { + val matcher = allOf( + withText(group.name), + withId(R.id.titleTextView), + withAncestor(R.id.swipeRefreshLayout) + ) + onView(matcher).check(doesNotExist()) + } + fun changeCourseNickname(changeTo: String) { onView(withId(R.id.newCourseNickname)).replaceText(changeTo) onView(withText(android.R.string.ok) + withAncestor(R.id.buttonPanel)).click() From 02930945abface39174a3a16bf9dd4cd790ac051 Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:52:12 +0200 Subject: [PATCH 04/24] [MBL-16983][Student][Teacher] Login help text change #2112 refs: MBL-16983 affects: Teacher, Student release note: none --- libs/login-api-2/src/main/res/layout/adapter_account_footer.xml | 2 +- libs/login-api-2/src/main/res/values-ar/strings.xml | 1 - .../login-api-2/src/main/res/values-b+da+DK+instk12/strings.xml | 1 - .../login-api-2/src/main/res/values-b+en+AU+unimelb/strings.xml | 1 - .../src/main/res/values-b+en+GB+instukhe/strings.xml | 1 - .../login-api-2/src/main/res/values-b+nb+NO+instk12/strings.xml | 1 - .../login-api-2/src/main/res/values-b+sv+SE+instk12/strings.xml | 1 - libs/login-api-2/src/main/res/values-b+zh+HK/strings.xml | 1 - libs/login-api-2/src/main/res/values-b+zh+Hans/strings.xml | 1 - libs/login-api-2/src/main/res/values-b+zh+Hant/strings.xml | 1 - libs/login-api-2/src/main/res/values-ca/strings.xml | 1 - libs/login-api-2/src/main/res/values-cy/strings.xml | 1 - libs/login-api-2/src/main/res/values-da/strings.xml | 1 - libs/login-api-2/src/main/res/values-de/strings.xml | 1 - libs/login-api-2/src/main/res/values-en-rAU/strings.xml | 1 - libs/login-api-2/src/main/res/values-en-rCA/strings.xml | 1 - libs/login-api-2/src/main/res/values-en-rCY/strings.xml | 1 - libs/login-api-2/src/main/res/values-en-rGB/strings.xml | 1 - libs/login-api-2/src/main/res/values-es-rES/strings.xml | 1 - libs/login-api-2/src/main/res/values-es/strings.xml | 1 - libs/login-api-2/src/main/res/values-fi/strings.xml | 1 - libs/login-api-2/src/main/res/values-fr-rCA/strings.xml | 1 - libs/login-api-2/src/main/res/values-fr/strings.xml | 1 - libs/login-api-2/src/main/res/values-ht/strings.xml | 1 - libs/login-api-2/src/main/res/values-is/strings.xml | 1 - libs/login-api-2/src/main/res/values-it/strings.xml | 1 - libs/login-api-2/src/main/res/values-ja/strings.xml | 1 - libs/login-api-2/src/main/res/values-mi/strings.xml | 1 - libs/login-api-2/src/main/res/values-ms/strings.xml | 1 - libs/login-api-2/src/main/res/values-nb/strings.xml | 1 - libs/login-api-2/src/main/res/values-nl/strings.xml | 1 - libs/login-api-2/src/main/res/values-pl/strings.xml | 1 - libs/login-api-2/src/main/res/values-pt-rBR/strings.xml | 1 - libs/login-api-2/src/main/res/values-pt-rPT/strings.xml | 1 - libs/login-api-2/src/main/res/values-ru/strings.xml | 1 - libs/login-api-2/src/main/res/values-sl/strings.xml | 1 - libs/login-api-2/src/main/res/values-sv/strings.xml | 1 - libs/login-api-2/src/main/res/values-th/strings.xml | 1 - libs/login-api-2/src/main/res/values-vi/strings.xml | 1 - libs/login-api-2/src/main/res/values-zh/strings.xml | 1 - libs/login-api-2/src/main/res/values/strings.xml | 2 +- 41 files changed, 2 insertions(+), 41 deletions(-) diff --git a/libs/login-api-2/src/main/res/layout/adapter_account_footer.xml b/libs/login-api-2/src/main/res/layout/adapter_account_footer.xml index d42dbae34d..380e298d7c 100644 --- a/libs/login-api-2/src/main/res/layout/adapter_account_footer.xml +++ b/libs/login-api-2/src/main/res/layout/adapter_account_footer.xml @@ -44,6 +44,6 @@ android:textColor="@color/textInfo" android:fontFamily="@font/lato_font_family" android:textSize="16sp" - android:text="@string/accountDomainFooterLink"/> + android:text="@string/accountDomainFooterLoginHelp"/> \ No newline at end of file diff --git a/libs/login-api-2/src/main/res/values-ar/strings.xml b/libs/login-api-2/src/main/res/values-ar/strings.xml index a6dc6fea19..23551097f6 100644 --- a/libs/login-api-2/src/main/res/values-ar/strings.xml +++ b/libs/login-api-2/src/main/res/values-ar/strings.xml @@ -109,7 +109,6 @@ school.instructure.com حذف المستخدم السابق ألا تستطيع العثور على مدرستك؟ حاول كتابة رابط URL الكامل للمدرسة. - اضغط هنا للحصول على المساعدة. لا يوجد اتصال بالإنترنت يتطلب هذا الإجراء اتصالاً بالإنترنت. diff --git a/libs/login-api-2/src/main/res/values-b+da+DK+instk12/strings.xml b/libs/login-api-2/src/main/res/values-b+da+DK+instk12/strings.xml index c14f873ae4..2f2c627f22 100644 --- a/libs/login-api-2/src/main/res/values-b+da+DK+instk12/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+da+DK+instk12/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Fjern forrige bruger Kan du ikke finde din skole? Prøv at indtaste skolens fulde URL. - Tryk her for at få hjælp. Ingen internetforbindelse Denne handling kræver en internetforbindelse. diff --git a/libs/login-api-2/src/main/res/values-b+en+AU+unimelb/strings.xml b/libs/login-api-2/src/main/res/values-b+en+AU+unimelb/strings.xml index 562a29b642..de85b5f2a0 100644 --- a/libs/login-api-2/src/main/res/values-b+en+AU+unimelb/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+en+AU+unimelb/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-b+en+GB+instukhe/strings.xml b/libs/login-api-2/src/main/res/values-b+en+GB+instukhe/strings.xml index 2008cc1293..9ad8745705 100644 --- a/libs/login-api-2/src/main/res/values-b+en+GB+instukhe/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+en+GB+instukhe/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-b+nb+NO+instk12/strings.xml b/libs/login-api-2/src/main/res/values-b+nb+NO+instk12/strings.xml index ec5a6c20af..527ce5beb1 100644 --- a/libs/login-api-2/src/main/res/values-b+nb+NO+instk12/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+nb+NO+instk12/strings.xml @@ -110,7 +110,6 @@ school.instructure.com Fjerne forrige bruker Finner du ikke skolen din? Prøv å skrive hele skolens URL. - Trykk her for hjelp. Ingen Internett-tilkobling Denne handlingen krever Internett-tilkobling. diff --git a/libs/login-api-2/src/main/res/values-b+sv+SE+instk12/strings.xml b/libs/login-api-2/src/main/res/values-b+sv+SE+instk12/strings.xml index 6545349e99..cd28a78c01 100644 --- a/libs/login-api-2/src/main/res/values-b+sv+SE+instk12/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+sv+SE+instk12/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Ta bort tidigare användare Kan du inte hitta din skola? Försök att skriva in skolans fullständiga URL. - Tryck här för hjälp. Ingen internetanslutning Den här åtgärden kräver internetanslutning. diff --git a/libs/login-api-2/src/main/res/values-b+zh+HK/strings.xml b/libs/login-api-2/src/main/res/values-b+zh+HK/strings.xml index 7617208253..438733e270 100644 --- a/libs/login-api-2/src/main/res/values-b+zh+HK/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+zh+HK/strings.xml @@ -109,7 +109,6 @@ school.instructure.com 移除先前使用者 找不到您的學校?請嘗試輸入學校完整URL。 - 點擊此處獲取支援。 沒有網絡連線 此動作需要網絡連線。 diff --git a/libs/login-api-2/src/main/res/values-b+zh+Hans/strings.xml b/libs/login-api-2/src/main/res/values-b+zh+Hans/strings.xml index 871b422f6d..72d0ea9c83 100644 --- a/libs/login-api-2/src/main/res/values-b+zh+Hans/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+zh+Hans/strings.xml @@ -109,7 +109,6 @@ school.instructure.com 删除上一个用户 找不到您的学校?尝试键入完整的学校 URL。 - 轻击此处获取帮助。 无互联网连接 此操作需要互联网连接。 diff --git a/libs/login-api-2/src/main/res/values-b+zh+Hant/strings.xml b/libs/login-api-2/src/main/res/values-b+zh+Hant/strings.xml index 7617208253..438733e270 100644 --- a/libs/login-api-2/src/main/res/values-b+zh+Hant/strings.xml +++ b/libs/login-api-2/src/main/res/values-b+zh+Hant/strings.xml @@ -109,7 +109,6 @@ school.instructure.com 移除先前使用者 找不到您的學校?請嘗試輸入學校完整URL。 - 點擊此處獲取支援。 沒有網絡連線 此動作需要網絡連線。 diff --git a/libs/login-api-2/src/main/res/values-ca/strings.xml b/libs/login-api-2/src/main/res/values-ca/strings.xml index 36169a8672..6bbb991bd4 100644 --- a/libs/login-api-2/src/main/res/values-ca/strings.xml +++ b/libs/login-api-2/src/main/res/values-ca/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Eliminar l\'usuari anterior No trobeu la vostra escola? Proveu d\'escriure l\'URL de l\'escola complet. - Toqueu aquí per obtenir ajuda. No hi ha cap connexió a Internet Per dur a terme aquesta acció cal tenir una connexió a Internet. diff --git a/libs/login-api-2/src/main/res/values-cy/strings.xml b/libs/login-api-2/src/main/res/values-cy/strings.xml index 0e1d15dd39..11cfe6cf52 100644 --- a/libs/login-api-2/src/main/res/values-cy/strings.xml +++ b/libs/login-api-2/src/main/res/values-cy/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Tynnu defnyddiwr blaenorol? Methu dod o hyd i’ch ysgol? Ceisiwch deipio URL llawn yr ysgol. - Tapiwch yma i gael help. Dim cysylltiad â\'r rhyngrwyd Mae angen cysylltiad â\'r rhyngrwyd i wneud hyn. diff --git a/libs/login-api-2/src/main/res/values-da/strings.xml b/libs/login-api-2/src/main/res/values-da/strings.xml index 1faf265adb..8f1838288b 100644 --- a/libs/login-api-2/src/main/res/values-da/strings.xml +++ b/libs/login-api-2/src/main/res/values-da/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Fjern forrige bruger Kan du ikke finde din skole? Prøv at indtaste skolens fulde URL. - Tryk her for at få hjælp. Ingen internetforbindelse Denne handling kræver en internetforbindelse. diff --git a/libs/login-api-2/src/main/res/values-de/strings.xml b/libs/login-api-2/src/main/res/values-de/strings.xml index 8389e442df..47261dfc0b 100644 --- a/libs/login-api-2/src/main/res/values-de/strings.xml +++ b/libs/login-api-2/src/main/res/values-de/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Vorherige/n Benutzer*in entfernen Finden Sie Ihre Schule nicht? Geben Sie den vollständigen URL der Schule ein. - Tippen Sie hier, um Hilfe zu erhalten. Keine Internetverbindung Diese Aktion erfordert eine Internetverbindung. diff --git a/libs/login-api-2/src/main/res/values-en-rAU/strings.xml b/libs/login-api-2/src/main/res/values-en-rAU/strings.xml index 562a29b642..de85b5f2a0 100644 --- a/libs/login-api-2/src/main/res/values-en-rAU/strings.xml +++ b/libs/login-api-2/src/main/res/values-en-rAU/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-en-rCA/strings.xml b/libs/login-api-2/src/main/res/values-en-rCA/strings.xml index d319e90b16..3727f20dd5 100644 --- a/libs/login-api-2/src/main/res/values-en-rCA/strings.xml +++ b/libs/login-api-2/src/main/res/values-en-rCA/strings.xml @@ -112,7 +112,6 @@ F school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-en-rCY/strings.xml b/libs/login-api-2/src/main/res/values-en-rCY/strings.xml index 2008cc1293..9ad8745705 100644 --- a/libs/login-api-2/src/main/res/values-en-rCY/strings.xml +++ b/libs/login-api-2/src/main/res/values-en-rCY/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-en-rGB/strings.xml b/libs/login-api-2/src/main/res/values-en-rGB/strings.xml index 4efa16bd21..4b3cdd4bcb 100644 --- a/libs/login-api-2/src/main/res/values-en-rGB/strings.xml +++ b/libs/login-api-2/src/main/res/values-en-rGB/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. No Internet Connection This action requires an internet connection. diff --git a/libs/login-api-2/src/main/res/values-es-rES/strings.xml b/libs/login-api-2/src/main/res/values-es-rES/strings.xml index 34f0ec1e70..feeaaaa281 100644 --- a/libs/login-api-2/src/main/res/values-es-rES/strings.xml +++ b/libs/login-api-2/src/main/res/values-es-rES/strings.xml @@ -110,7 +110,6 @@ school.instructure.com Eliminar usuario anterior ¿No puedes encontrar tu escuela? Intenta escribir la URL completa de la escuela. - Toca aquí para obtener ayuda. No hay conexión a Internet Esta acción requiere conexión a Internet. diff --git a/libs/login-api-2/src/main/res/values-es/strings.xml b/libs/login-api-2/src/main/res/values-es/strings.xml index f87d909f6e..3b4c42e957 100644 --- a/libs/login-api-2/src/main/res/values-es/strings.xml +++ b/libs/login-api-2/src/main/res/values-es/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Eliminar usuario anterior ¿No puede encontrar su escuela? Intente escribir la URL completa de la escuela. - Presione aquí para obtener ayuda. Sin conexión a Internet Esta acción requiere conexión a Internet. diff --git a/libs/login-api-2/src/main/res/values-fi/strings.xml b/libs/login-api-2/src/main/res/values-fi/strings.xml index 4157a60613..f64c603f8d 100644 --- a/libs/login-api-2/src/main/res/values-fi/strings.xml +++ b/libs/login-api-2/src/main/res/values-fi/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Poista edellinen käyttäjä Etkö löydä kouluasi? Yritä kirjoittaa koko koulun URL - Avaa ohje napauttamalla tässä. Ei Internet-yhteyttä Tähän toimintoon vaaditaan Internet-yhteys. diff --git a/libs/login-api-2/src/main/res/values-fr-rCA/strings.xml b/libs/login-api-2/src/main/res/values-fr-rCA/strings.xml index 060153b513..3ca2376d4b 100644 --- a/libs/login-api-2/src/main/res/values-fr-rCA/strings.xml +++ b/libs/login-api-2/src/main/res/values-fr-rCA/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Retirer l\'utilisateur précédent Vous ne trouvez pas votre école? Essayez de saisir l\'URL complète de l’école. - Appuyer ici pour obtenir de l\'aide. Aucune connexion Internet Cette action nécessite une connexion Internet. diff --git a/libs/login-api-2/src/main/res/values-fr/strings.xml b/libs/login-api-2/src/main/res/values-fr/strings.xml index d2a7dedb52..538a698666 100644 --- a/libs/login-api-2/src/main/res/values-fr/strings.xml +++ b/libs/login-api-2/src/main/res/values-fr/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Supprimer utilisateur précédent Vous ne trouvez pas votre école ? Essayez d’entrer l’URL complète de l’école - Appuyez ici pour obtenir de l’aide. Aucune connexion internet Cette action nécessite une connexion Internet. diff --git a/libs/login-api-2/src/main/res/values-ht/strings.xml b/libs/login-api-2/src/main/res/values-ht/strings.xml index 2eea2ac773..4303be39f4 100644 --- a/libs/login-api-2/src/main/res/values-ht/strings.xml +++ b/libs/login-api-2/src/main/res/values-ht/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Elimine Ansyen Itilizatè Ou paka jwenn lekòl ou a? Eseye tape tout URL lekòl la - Tape la pou èd. Pa gen Koneksyon Internet Pou aksyon sa a ou bezwen konekte sou entènèt. diff --git a/libs/login-api-2/src/main/res/values-is/strings.xml b/libs/login-api-2/src/main/res/values-is/strings.xml index ab6760cb70..4ac89d3b60 100644 --- a/libs/login-api-2/src/main/res/values-is/strings.xml +++ b/libs/login-api-2/src/main/res/values-is/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Fjarlægja fyrri notanda Finnurðu ekki skólann þinn? Prufaðu að slá inn alla vefslóð skólans. - Smelltu hér til að fá hjálp. Engin nettenging Þessi aðgerð krefst nettengingar. diff --git a/libs/login-api-2/src/main/res/values-it/strings.xml b/libs/login-api-2/src/main/res/values-it/strings.xml index 541ff2dc4e..675781a920 100644 --- a/libs/login-api-2/src/main/res/values-it/strings.xml +++ b/libs/login-api-2/src/main/res/values-it/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Rimuovi utente precedente Non riesci a trova la tua scuola? Prova a digitare l’URL della scuola per intero. - Tocca qui per assistenza. Nessuna connessione a Internet Questa azione richiede una connessione a Internet. diff --git a/libs/login-api-2/src/main/res/values-ja/strings.xml b/libs/login-api-2/src/main/res/values-ja/strings.xml index 01da4c3a5d..13acaf4ee3 100644 --- a/libs/login-api-2/src/main/res/values-ja/strings.xml +++ b/libs/login-api-2/src/main/res/values-ja/strings.xml @@ -109,7 +109,6 @@ school.instructure.com 以前のユーザーを削除 学校が見つかりませんか?学校の完全なURLを入力してみてください。 - ここをタップしてヘルプを表示します。 インターネット接続なし この操作にはインターネット接続が必要です。 diff --git a/libs/login-api-2/src/main/res/values-mi/strings.xml b/libs/login-api-2/src/main/res/values-mi/strings.xml index 772695e3af..59b0fc3de9 100644 --- a/libs/login-api-2/src/main/res/values-mi/strings.xml +++ b/libs/login-api-2/src/main/res/values-mi/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Tango Kaiwhakmahi o mua Kaore e kitea tō kura? Ngana ki te pātō te nuinga o te kura url - Pātō ki kōnei mo te awhina Kaore he hononga ipurangi Tēnei mahi ka mahi he hononga ipurangi diff --git a/libs/login-api-2/src/main/res/values-ms/strings.xml b/libs/login-api-2/src/main/res/values-ms/strings.xml index b8be733a44..4229891bcc 100644 --- a/libs/login-api-2/src/main/res/values-ms/strings.xml +++ b/libs/login-api-2/src/main/res/values-ms/strings.xml @@ -110,7 +110,6 @@ school.instructure.com Alih Keluar Pengguna Sebelumnya Tidak menemui sekolah anda? Cuba taip URL sekolah yang penuh. - Ketik di sini untuk mendapatkan bantuan. Tiada Sambungan Internet Tindakan ini memerlukan sambungan Internet diff --git a/libs/login-api-2/src/main/res/values-nb/strings.xml b/libs/login-api-2/src/main/res/values-nb/strings.xml index 1d7d7e6851..e062fe3ba6 100644 --- a/libs/login-api-2/src/main/res/values-nb/strings.xml +++ b/libs/login-api-2/src/main/res/values-nb/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Fjerne forrige bruker Finner du ikke skolen din? Prøv å skrive hele skolens URL. - Trykk her for hjelp. Ingen Internett-tilkobling Denne handlingen krever Internett-tilkobling. diff --git a/libs/login-api-2/src/main/res/values-nl/strings.xml b/libs/login-api-2/src/main/res/values-nl/strings.xml index 0e4ae4a8f3..5b4e4a596b 100644 --- a/libs/login-api-2/src/main/res/values-nl/strings.xml +++ b/libs/login-api-2/src/main/res/values-nl/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Vorige gebruiker verwijderen Kun je je school niet vinden? Typ de volledige URL van de school. - Tik hier voor hulp. Geen internetverbinding Voor deze actie is een internetverbinding vereist. diff --git a/libs/login-api-2/src/main/res/values-pl/strings.xml b/libs/login-api-2/src/main/res/values-pl/strings.xml index 552807641f..64e3193940 100644 --- a/libs/login-api-2/src/main/res/values-pl/strings.xml +++ b/libs/login-api-2/src/main/res/values-pl/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Usuń poprzedniego użytkownika Nie możesz znaleźć swojej szkoły? Spróbuj wprowadzić pełen adres URL szkoły. - Stuknij tutaj, aby uzyskać pomoc. Brak połączenia internetowego To działanie wymaga połączenia internetowego. diff --git a/libs/login-api-2/src/main/res/values-pt-rBR/strings.xml b/libs/login-api-2/src/main/res/values-pt-rBR/strings.xml index 24542db009..21fd1ffc8e 100644 --- a/libs/login-api-2/src/main/res/values-pt-rBR/strings.xml +++ b/libs/login-api-2/src/main/res/values-pt-rBR/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Remover usuário anterior Não consegue localizar a sua escola? Tente digitar a URL completa da escola. - Toque aqui para ajuda. Sem conexão à internet Esta ação exige conexão à internet. diff --git a/libs/login-api-2/src/main/res/values-pt-rPT/strings.xml b/libs/login-api-2/src/main/res/values-pt-rPT/strings.xml index e6147e54df..549dc0523c 100644 --- a/libs/login-api-2/src/main/res/values-pt-rPT/strings.xml +++ b/libs/login-api-2/src/main/res/values-pt-rPT/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Remover utilizador anterior? Não vê sua escola? Tente digitar o URL completo da escola. - Toque aqui para ajuda. Sem ligação à Internet Esta ação requer uma conexão com a internet. diff --git a/libs/login-api-2/src/main/res/values-ru/strings.xml b/libs/login-api-2/src/main/res/values-ru/strings.xml index b2730ba446..ecaff5b7c8 100644 --- a/libs/login-api-2/src/main/res/values-ru/strings.xml +++ b/libs/login-api-2/src/main/res/values-ru/strings.xml @@ -109,7 +109,6 @@ school.instructure.com Удалить предыдущего пользователя Не удается найти свое учебное заведение? Попробуйте набрать полный адрес URL учебного заведения. - Прикоснитесь здесь для получения помощи. Нет интернет-соединения Для выполнения этого действия необходимо интернет-соединение. diff --git a/libs/login-api-2/src/main/res/values-sl/strings.xml b/libs/login-api-2/src/main/res/values-sl/strings.xml index 22206a77c5..9501e8172f 100644 --- a/libs/login-api-2/src/main/res/values-sl/strings.xml +++ b/libs/login-api-2/src/main/res/values-sl/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Odstrani predhodnega uporabnika Ali svoje šole ne najdete? Poskusite vnesti poln naslov URL šole. - Za pomoč tapnite tukaj. Brez internetne povezave. Pri tem dejanju je potrebna internetna povezava. diff --git a/libs/login-api-2/src/main/res/values-sv/strings.xml b/libs/login-api-2/src/main/res/values-sv/strings.xml index 6545349e99..cd28a78c01 100644 --- a/libs/login-api-2/src/main/res/values-sv/strings.xml +++ b/libs/login-api-2/src/main/res/values-sv/strings.xml @@ -111,7 +111,6 @@ school.instructure.com Ta bort tidigare användare Kan du inte hitta din skola? Försök att skriva in skolans fullständiga URL. - Tryck här för hjälp. Ingen internetanslutning Den här åtgärden kräver internetanslutning. diff --git a/libs/login-api-2/src/main/res/values-th/strings.xml b/libs/login-api-2/src/main/res/values-th/strings.xml index 5ca4798884..fe43425e2e 100644 --- a/libs/login-api-2/src/main/res/values-th/strings.xml +++ b/libs/login-api-2/src/main/res/values-th/strings.xml @@ -110,7 +110,6 @@ school.instructure.com ลบผู้ใช้ก่อนหน้า ไม่พบโรงเรียนของคุณ ลองพิมพ์ URL เต็มของสถานศึกษา - กดเลือกที่นี่เพื่อรับความช่วยเหลือ ไม่มีการเชื่อมต่ออินเทอร์เน็ต การดำเนินการนี้ต้องมีการเชื่อมต่ออินเทอร์เน็ต diff --git a/libs/login-api-2/src/main/res/values-vi/strings.xml b/libs/login-api-2/src/main/res/values-vi/strings.xml index 0b1ef97420..301d0f6c50 100644 --- a/libs/login-api-2/src/main/res/values-vi/strings.xml +++ b/libs/login-api-2/src/main/res/values-vi/strings.xml @@ -110,7 +110,6 @@ school.instructure.com Loại Bỏ Người Dùng Trước Không tìm được trường của bạn? Hãy thử nhập URL đầy đủ của trường - Nhấn vào đây để được trợ giúp. Không Có Kết Nối Internet Thao tác này bắt buộc phải có kết nối internet. diff --git a/libs/login-api-2/src/main/res/values-zh/strings.xml b/libs/login-api-2/src/main/res/values-zh/strings.xml index 871b422f6d..72d0ea9c83 100644 --- a/libs/login-api-2/src/main/res/values-zh/strings.xml +++ b/libs/login-api-2/src/main/res/values-zh/strings.xml @@ -109,7 +109,6 @@ school.instructure.com 删除上一个用户 找不到您的学校?尝试键入完整的学校 URL。 - 轻击此处获取帮助。 无互联网连接 此操作需要互联网连接。 diff --git a/libs/login-api-2/src/main/res/values/strings.xml b/libs/login-api-2/src/main/res/values/strings.xml index 4acc7c102b..493fa8837d 100644 --- a/libs/login-api-2/src/main/res/values/strings.xml +++ b/libs/login-api-2/src/main/res/values/strings.xml @@ -112,7 +112,7 @@ F school.instructure.com Remove Previous User Can\'t find your school? Try typing the full school URL. - Tap here for help. + Tap here for login help. No Internet Connection This action requires an internet connection. From a9f5c02a82e2073c4912fd8a4732e130da6752a0 Mon Sep 17 00:00:00 2001 From: Kristof Nemere <109959688+kristofnemere@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:53:22 +0200 Subject: [PATCH 05/24] [MBL-16972][All] Add alt text to the "Instructure" image at the bottom of the "About" dialog in Androids User Settings refs: MBL-16972 affects: Student, Teacher, Parent release note: none --- apps/flutter_parent/lib/l10n/app_localizations.dart | 3 +++ .../lib/screens/settings/settings_interactor.dart | 1 + libs/pandares/src/main/res/values/strings.xml | 1 + libs/pandautils/src/main/res/layout/fragment_about.xml | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/flutter_parent/lib/l10n/app_localizations.dart b/apps/flutter_parent/lib/l10n/app_localizations.dart index 26fa996e0b..4872b5fe70 100644 --- a/apps/flutter_parent/lib/l10n/app_localizations.dart +++ b/apps/flutter_parent/lib/l10n/app_localizations.dart @@ -1705,4 +1705,7 @@ class AppLocalizations { String get aboutVersionTitle => Intl.message('Version', desc: 'Title for Version field on about page'); + + String get aboutLogoSemanticsLabel => + Intl.message('Instructure logo', desc: 'Semantics label for the Instructure logo on the about page'); } diff --git a/apps/flutter_parent/lib/screens/settings/settings_interactor.dart b/apps/flutter_parent/lib/screens/settings/settings_interactor.dart index 74dffb7968..652a26fc44 100644 --- a/apps/flutter_parent/lib/screens/settings/settings_interactor.dart +++ b/apps/flutter_parent/lib/screens/settings/settings_interactor.dart @@ -96,6 +96,7 @@ class SettingsInteractor { SvgPicture.asset( 'assets/svg/ic_instructure_logo.svg', alignment: Alignment.bottomCenter, + semanticsLabel: L10n(context).aboutLogoSemanticsLabel, ) ], ), diff --git a/libs/pandares/src/main/res/values/strings.xml b/libs/pandares/src/main/res/values/strings.xml index c1648b020a..01f7f5f4cd 100644 --- a/libs/pandares/src/main/res/values/strings.xml +++ b/libs/pandares/src/main/res/values/strings.xml @@ -1400,4 +1400,5 @@ Email Version There was a problem reloading this assignment. Please check your connection and try again. + Instructure logo diff --git a/libs/pandautils/src/main/res/layout/fragment_about.xml b/libs/pandautils/src/main/res/layout/fragment_about.xml index 5d26338930..12b2463385 100644 --- a/libs/pandautils/src/main/res/layout/fragment_about.xml +++ b/libs/pandautils/src/main/res/layout/fragment_about.xml @@ -139,7 +139,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" - android:importantForAccessibility="no" + android:contentDescription="@string/instructure_logo" android:src="@drawable/ic_instructure_logo" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" From 67e0bf4cfc0066a72850c2c6f5d77b84a4c3835b Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:53:51 +0200 Subject: [PATCH 06/24] [All] Fixed accessibility issues (#2109) refs: MBL-16982, MBL-16975, MBL-16977, MBL-16984, MBL-16971, MBL-16978, MBL-16985 affects: All release note: Fixed accessibility issues * MBL-16982 Changed green and red colors to have 4.5:1 contrast with the background. * MBL-16975 Fixed file submission icon contrast. * MBL-16977 Fixed course name and home page contrast. * MBL-16984 Fixed info color contrast * MBL-16971 Fixed syllabus contrast. * MBL-16978 Redesigned rating dialog. * MBL-16985 Fixed contrast and content description for Canvas text on the login screen. * Test fixes --- .../svg/canvas-parent-login-logo-dark.svg | 10 ++++++++ .../assets/svg/canvas-parent-login-logo.svg | 12 +++++----- .../lib/screens/login_landing_screen.dart | 8 ++----- .../AssignmentDetailsViewModel.kt | 6 ++--- .../src/main/res/layout/fragment_syllabus.xml | 4 +++- .../layout/fragment_unsupported_file_type.xml | 2 +- .../AssignmentDetailsViewModelTest.kt | 8 +++---- .../src/main/res/layout/fragment_syllabus.xml | 4 +++- .../layout/fragment_unsupported_file_type.xml | 2 +- .../res/layout/view_edit_course_homepage.xml | 2 +- .../main/res/layout/view_rename_course.xml | 2 +- .../layout/activity_login_landing_page.xml | 4 ++-- .../src/main/res/drawable/ic_rating_star.xml | 5 ++++ .../res/drawable/ic_rating_star_outline.xml | 5 ++++ libs/pandares/src/main/res/values/colors.xml | 24 +++++++++---------- .../pandautils/dialogs/RatingDialog.kt | 7 ++---- .../src/main/res/layout/dialog_rating.xml | 20 ++++++++-------- .../src/main/res/values/font_styles.xml | 4 ++++ 18 files changed, 75 insertions(+), 54 deletions(-) create mode 100644 apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg create mode 100644 libs/pandares/src/main/res/drawable/ic_rating_star.xml create mode 100644 libs/pandares/src/main/res/drawable/ic_rating_star_outline.xml diff --git a/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg b/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg new file mode 100644 index 0000000000..cfc8e0bc77 --- /dev/null +++ b/apps/flutter_parent/assets/svg/canvas-parent-login-logo-dark.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg b/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg index a6413426ae..a7729978ef 100644 --- a/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg +++ b/apps/flutter_parent/assets/svg/canvas-parent-login-logo.svg @@ -1,10 +1,10 @@ - - - - - - + + + + + + diff --git a/apps/flutter_parent/lib/screens/login_landing_screen.dart b/apps/flutter_parent/lib/screens/login_landing_screen.dart index 7c66ea9cf9..af81ff724f 100644 --- a/apps/flutter_parent/lib/screens/login_landing_screen.dart +++ b/apps/flutter_parent/lib/screens/login_landing_screen.dart @@ -18,19 +18,14 @@ import 'package:flutter/material.dart'; import 'package:flutter_parent/l10n/app_localizations.dart'; import 'package:flutter_parent/models/login.dart'; import 'package:flutter_parent/models/school_domain.dart'; -import 'package:flutter_parent/network/utils/analytics.dart'; import 'package:flutter_parent/network/utils/api_prefs.dart'; import 'package:flutter_parent/router/panda_router.dart'; import 'package:flutter_parent/screens/qr_login/qr_login_util.dart'; import 'package:flutter_parent/screens/web_login/web_login_screen.dart'; import 'package:flutter_parent/utils/common_widgets/avatar.dart'; -import 'package:flutter_parent/utils/common_widgets/error_report/error_report_dialog.dart'; -import 'package:flutter_parent/utils/common_widgets/error_report/error_report_interactor.dart'; -import 'package:flutter_parent/utils/common_widgets/full_screen_scroll_container.dart'; import 'package:flutter_parent/utils/common_widgets/two_finger_double_tap_gesture_detector.dart'; import 'package:flutter_parent/utils/common_widgets/user_name.dart'; import 'package:flutter_parent/utils/debug_flags.dart'; -import 'package:flutter_parent/utils/design/canvas_icons.dart'; import 'package:flutter_parent/utils/design/canvas_icons_solid.dart'; import 'package:flutter_parent/utils/design/parent_colors.dart'; import 'package:flutter_parent/utils/design/parent_theme.dart'; @@ -93,13 +88,14 @@ class LoginLandingScreen extends StatelessWidget { Widget _body(BuildContext context) { final lastLoginAccount = ApiPrefs.getLastAccount(); + final assetString = ParentTheme.of(context).isDarkMode ? 'assets/svg/canvas-parent-login-logo-dark.svg' : 'assets/svg/canvas-parent-login-logo.svg'; return Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Spacer(), SvgPicture.asset( - 'assets/svg/canvas-parent-login-logo.svg', + assetString, semanticsLabel: L10n(context).canvasLogoLabel, ), Spacer(), diff --git a/apps/student/src/main/java/com/instructure/student/features/assignmentdetails/AssignmentDetailsViewModel.kt b/apps/student/src/main/java/com/instructure/student/features/assignmentdetails/AssignmentDetailsViewModel.kt index 0a7f57a4ac..1155fdcead 100644 --- a/apps/student/src/main/java/com/instructure/student/features/assignmentdetails/AssignmentDetailsViewModel.kt +++ b/apps/student/src/main/java/com/instructure/student/features/assignmentdetails/AssignmentDetailsViewModel.kt @@ -268,11 +268,11 @@ class AssignmentDetailsViewModel @Inject constructor( ) val submissionStatusTint = if (assignment.isSubmitted) { - R.color.backgroundSuccess + R.color.textSuccess } else if (isMissing) { - R.color.backgroundDanger + R.color.textDanger } else { - R.color.backgroundDark + R.color.textDark } val submittedStatusIcon = if (assignment.isSubmitted) R.drawable.ic_complete_solid else R.drawable.ic_no diff --git a/apps/student/src/main/res/layout/fragment_syllabus.xml b/apps/student/src/main/res/layout/fragment_syllabus.xml index f9baf996b6..cb801b5f90 100644 --- a/apps/student/src/main/res/layout/fragment_syllabus.xml +++ b/apps/student/src/main/res/layout/fragment_syllabus.xml @@ -46,7 +46,9 @@ app:tabPaddingEnd="4dp" app:tabPaddingStart="4dp" app:tabSelectedTextColor="@color/white" - app:tabTextColor="@color/transparentWhite" + app:tabTextColor="@color/white" + app:tabTextAppearance="@style/TextAppearance.Design.Tab" + app:tabSelectedTextAppearance="@style/NavigationTabTextAppeareance" tools:background="#00bcd5" tools:visibility="visible"> diff --git a/apps/student/src/main/res/layout/fragment_unsupported_file_type.xml b/apps/student/src/main/res/layout/fragment_unsupported_file_type.xml index 202c4d34cd..eb03f71252 100644 --- a/apps/student/src/main/res/layout/fragment_unsupported_file_type.xml +++ b/apps/student/src/main/res/layout/fragment_unsupported_file_type.xml @@ -48,7 +48,7 @@ android:layout_height="64dp" android:importantForAccessibility="no" android:scaleType="fitCenter" - android:tint="@color/textLight" + app:tint="@color/textDark" app:srcCompat="@drawable/ic_canvas_logo_red"/> diff --git a/apps/teacher/src/main/res/layout/fragment_unsupported_file_type.xml b/apps/teacher/src/main/res/layout/fragment_unsupported_file_type.xml index 568c075201..fb0542d8bf 100644 --- a/apps/teacher/src/main/res/layout/fragment_unsupported_file_type.xml +++ b/apps/teacher/src/main/res/layout/fragment_unsupported_file_type.xml @@ -47,7 +47,7 @@ android:layout_height="64dp" android:importantForAccessibility="no" android:scaleType="fitCenter" - android:tint="@color/textLight" + app:tint="@color/textDark" app:srcCompat="@drawable/ic_canvas_logo" /> diff --git a/apps/teacher/src/main/res/layout/view_rename_course.xml b/apps/teacher/src/main/res/layout/view_rename_course.xml index e1b2afcd22..4594143d7d 100644 --- a/apps/teacher/src/main/res/layout/view_rename_course.xml +++ b/apps/teacher/src/main/res/layout/view_rename_course.xml @@ -56,7 +56,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/courseNameLabel" - android:alpha="0.55" + android:textColor="@color/textDark" android:freezesText="true" tools:text="Biology 101"/> diff --git a/libs/login-api-2/src/main/res/layout/activity_login_landing_page.xml b/libs/login-api-2/src/main/res/layout/activity_login_landing_page.xml index b41bb274f1..22adb062e5 100644 --- a/libs/login-api-2/src/main/res/layout/activity_login_landing_page.xml +++ b/libs/login-api-2/src/main/res/layout/activity_login_landing_page.xml @@ -55,8 +55,8 @@ android:layout_marginTop="24dp" android:layout_marginBottom="2dp" android:adjustViewBounds="true" - android:importantForAccessibility="no" - android:tint="@color/tiara" + android:contentDescription="@string/canvas" + android:tint="@color/textDarkest" app:srcCompat="@drawable/ic_canvas_wordmark" /> + + diff --git a/libs/pandares/src/main/res/drawable/ic_rating_star_outline.xml b/libs/pandares/src/main/res/drawable/ic_rating_star_outline.xml new file mode 100644 index 0000000000..c32749453d --- /dev/null +++ b/libs/pandares/src/main/res/drawable/ic_rating_star_outline.xml @@ -0,0 +1,5 @@ + + + diff --git a/libs/pandares/src/main/res/values/colors.xml b/libs/pandares/src/main/res/values/colors.xml index 5843539a2c..0adee136e1 100644 --- a/libs/pandares/src/main/res/values/colors.xml +++ b/libs/pandares/src/main/res/values/colors.xml @@ -20,44 +20,44 @@ #556572 #BF32A4 - #EE0612 + #E0061F #556572 #2D3B45 #F5F5F5 #FFFFFF - #008EE2 + #0374B5 #F5F5F5 #FFFFFF #FFFFFF #C7CDD1 - #00AC18 + #0B874B #FC5E13 #BF32A4 #BF32A4 - #EE0612 + #E0061F #556572 #2D3B45 - #008EE2 + #0374B5 #F5F5F5 #FFFFFF #C7CDD1 - #00AC18 + #0B874B #FC5E13 - #EE0612 - #008EE2 + #E0061F + #0374B5 #FC5E13 #2D3B45 #394B58 #F5F5F5 - #00AC18 + #0B874B #BF32A4 - #EE0612 + #E0061F #556572 #2D3B45 - #008EE2 + #0374B5 #F5F5F5 #FFFFFF - #00AC18 + #0B874B #FC5E13 #C7CDD1 #FFFFFF diff --git a/libs/pandautils/src/main/java/com/instructure/pandautils/dialogs/RatingDialog.kt b/libs/pandautils/src/main/java/com/instructure/pandautils/dialogs/RatingDialog.kt index 04cf4f703d..7745073010 100644 --- a/libs/pandautils/src/main/java/com/instructure/pandautils/dialogs/RatingDialog.kt +++ b/libs/pandautils/src/main/java/com/instructure/pandautils/dialogs/RatingDialog.kt @@ -113,13 +113,11 @@ class RatingDialog : DialogFragment() { val starClickListener = View.OnClickListener { v -> stars.forEach { - it.setImageResource(R.drawable.ic_star) - it.setColorFilter(requireContext().getColor(R.color.backgroundMedium)) + it.setImageResource(R.drawable.ic_rating_star_outline) } val selectionIndex = stars.indexOf(v) stars.take(selectionIndex + 1).forEach { - it.setImageResource(R.drawable.ic_star) - it.setColorFilter(requireContext().getColor(R.color.backgroundDark)) + it.setImageResource(R.drawable.ic_rating_star) } val isFiveStars = selectionIndex >= 4 comments.setVisible(!isFiveStars) @@ -132,7 +130,6 @@ class RatingDialog : DialogFragment() { } stars.forEach { - it.setImageResource(R.drawable.ic_star) it.setOnClickListener(starClickListener) } } diff --git a/libs/pandautils/src/main/res/layout/dialog_rating.xml b/libs/pandautils/src/main/res/layout/dialog_rating.xml index 007ed070e7..ab56eb6e20 100644 --- a/libs/pandautils/src/main/res/layout/dialog_rating.xml +++ b/libs/pandautils/src/main/res/layout/dialog_rating.xml @@ -39,8 +39,8 @@ android:layout_marginLeft="4dp" android:layout_marginRight="4dp" android:contentDescription="@string/star1" - android:src="@drawable/ic_star" - app:tint="@color/backgroundMedium" /> + android:src="@drawable/ic_rating_star_outline" + app:tint="@color/backgroundDark" /> + android:src="@drawable/ic_rating_star_outline" + app:tint="@color/backgroundDark"/> + android:src="@drawable/ic_rating_star_outline" + app:tint="@color/backgroundDark"/> + android:src="@drawable/ic_rating_star_outline" + app:tint="@color/backgroundDark"/> + android:src="@drawable/ic_rating_star_outline" + app:tint="@color/backgroundDark"/> diff --git a/libs/pandautils/src/main/res/values/font_styles.xml b/libs/pandautils/src/main/res/values/font_styles.xml index 1e19ec8b65..51fa9e391c 100644 --- a/libs/pandautils/src/main/res/values/font_styles.xml +++ b/libs/pandautils/src/main/res/values/font_styles.xml @@ -42,4 +42,8 @@ italic + + \ No newline at end of file From 454740d1d0ed6f6f7a19c7ef30a8e03bc42bcc5f Mon Sep 17 00:00:00 2001 From: Kristof Deak <92309696+kdeakinstructure@users.noreply.github.com> Date: Tue, 22 Aug 2023 12:32:24 +0200 Subject: [PATCH 07/24] Fix many breaking nightly tests in both apps (#2114) * Rollback lowres devices to API lvl 26 (because API level 29 low resolution device is too flaky). * fix teacher announcement and discussion e2e tests * fix files e2e test in teacher * fix breaking syllabus tablet test. fix breaking discussion test. * fix breaking landscape module tests * Stub NotATeacherPageTest displaysPageObjects test because of the 'too many login attempts' change on the backend. (Will be put back after find found a solution for it) --- .../ui/interaction/ModuleInteractionTest.kt | 338 ++++++++++++------ .../teacher/ui/NotATeacherPageTest.kt | 2 + .../teacher/ui/e2e/DiscussionsE2ETest.kt | 12 +- .../teacher/ui/e2e/FilesE2ETest.kt | 2 +- .../teacher/ui/pages/AnnouncementsListPage.kt | 2 +- .../teacher/ui/pages/CalendarEventPage.kt | 4 +- 6 files changed, 232 insertions(+), 128 deletions(-) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/ModuleInteractionTest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/ModuleInteractionTest.kt index c35844fb1b..20c99a602c 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/ModuleInteractionTest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/interaction/ModuleInteractionTest.kt @@ -18,12 +18,36 @@ package com.instructure.student.ui.interaction import android.text.Html import androidx.test.espresso.Espresso import androidx.test.espresso.web.webdriver.Locator -import com.instructure.canvas.espresso.mockCanvas.* -import com.instructure.canvasapi2.models.* +import com.instructure.canvas.espresso.mockCanvas.MockCanvas +import com.instructure.canvas.espresso.mockCanvas.addAssignment +import com.instructure.canvas.espresso.mockCanvas.addDiscussionTopicToCourse +import com.instructure.canvas.espresso.mockCanvas.addFileToCourse +import com.instructure.canvas.espresso.mockCanvas.addItemToModule +import com.instructure.canvas.espresso.mockCanvas.addLTITool +import com.instructure.canvas.espresso.mockCanvas.addModuleToCourse +import com.instructure.canvas.espresso.mockCanvas.addPageToCourse +import com.instructure.canvas.espresso.mockCanvas.addQuestionToQuiz +import com.instructure.canvas.espresso.mockCanvas.addQuizToCourse +import com.instructure.canvas.espresso.mockCanvas.init +import com.instructure.canvasapi2.models.Assignment +import com.instructure.canvasapi2.models.CourseSettings +import com.instructure.canvasapi2.models.DiscussionTopicHeader +import com.instructure.canvasapi2.models.LockInfo +import com.instructure.canvasapi2.models.LockedModule +import com.instructure.canvasapi2.models.ModuleContentDetails +import com.instructure.canvasapi2.models.ModuleObject +import com.instructure.canvasapi2.models.Page +import com.instructure.canvasapi2.models.Quiz +import com.instructure.canvasapi2.models.QuizAnswer +import com.instructure.canvasapi2.models.Tab import com.instructure.dataseeding.util.days import com.instructure.dataseeding.util.fromNow import com.instructure.dataseeding.util.iso8601 -import com.instructure.panda_annotations.* +import com.instructure.panda_annotations.FeatureCategory +import com.instructure.panda_annotations.Priority +import com.instructure.panda_annotations.SecondaryFeatureCategory +import com.instructure.panda_annotations.TestCategory +import com.instructure.panda_annotations.TestMetaData import com.instructure.student.R import com.instructure.student.ui.pages.WebViewTextCheck import com.instructure.student.ui.utils.StudentTest @@ -43,7 +67,6 @@ class ModuleInteractionTest : StudentTest() { private var page: Page? = null private val fileName = "ModuleFile.html" private var fileCheck: WebViewTextCheck? = null - private val externalUrl = "https://www.google.com" private var quiz: Quiz? = null // Tapping an Assignment module item should navigate to that item's detail page @@ -55,7 +78,19 @@ class ModuleInteractionTest : StudentTest() { val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + // Create an assignment and add it as a module item + assignment = data.addAssignment( + courseId = course1.id, + submissionType = Assignment.SubmissionType.ONLINE_TEXT_ENTRY + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = assignment!! + ) + // Verify that we can launch into the assignment from an assignment module item + modulesPage.refresh() modulesPage.assertModuleDisplayed(module) modulesPage.assertModuleItemDisplayed(module, assignment!!.name!!) modulesPage.clickModuleItem(module, assignment!!.name!!) @@ -71,8 +106,23 @@ class ModuleInteractionTest : StudentTest() { val data = getToCourseModules(studentCount = 1, courseCount = 1) val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + val user = data.users.values.first() + + // Create a discussion and add it as a module item + topicHeader = data.addDiscussionTopicToCourse( + course = course1, + user = user, + topicTitle = "Discussion in module", + topicDescription = "In. A. Module." + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = topicHeader!! + ) // Verify that we can launch into a discussion from a discussion module item + modulesPage.refresh() modulesPage.assertModuleDisplayed(module) modulesPage.assertModuleItemDisplayed(module, topicHeader!!.title!!) modulesPage.clickModuleItem(module, topicHeader!!.title!!) @@ -87,6 +137,14 @@ class ModuleInteractionTest : StudentTest() { val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + val ltiTool = data.addLTITool("Google Drive", "http://google.com", course1, 1234L) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = ltiTool!! + ) + + modulesPage.refresh() modulesPage.clickModuleItem(module, "Google Drive") canvasWebViewPage.assertTitle("Google Drive") } @@ -96,11 +154,20 @@ class ModuleInteractionTest : StudentTest() { @TestMetaData(Priority.MANDATORY, FeatureCategory.MODULES, TestCategory.INTERACTION, false) fun testModules_launchesIntoExternalURL() { // Basic mock setup + val externalUrl = "https://www.google.com" val data = getToCourseModules(studentCount = 1, courseCount = 1) val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + // Create an external URL and add it as a module item + data.addItemToModule( + course = course1, + moduleId = module.id, + item = externalUrl + ) + // click the external url module item + modulesPage.refresh() modulesPage.clickModuleItem(module, externalUrl) // Not much we can test here, as it is an external URL, but testModules_navigateToNextAndPreviousModuleItems // will test that the module name and module item name are displayed correctly. @@ -116,7 +183,26 @@ class ModuleInteractionTest : StudentTest() { val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + // Create a file and add it as a module item + val fileContent = "

A Heading

" + fileCheck = WebViewTextCheck(Locator.ID, "heading1", "A Heading") + + val fileId = data.addFileToCourse( + courseId = course1.id, + displayName = fileName, + fileContent = fileContent, + contentType = "text/html" + ) + val rootFolderId = data.courseRootFolders[course1.id]!!.id + val fileFolder = data.folderFiles[rootFolderId]?.find { it.id == fileId } + data.addItemToModule( + course = course1, + moduleId = module.id, + item = fileFolder!! + ) + // Click the file module and verify that the file appears + modulesPage.refresh() modulesPage.clickModuleItem(module, fileName, R.id.openButton) canvasWebViewPage.waitForWebView() canvasWebViewPage.runTextChecks(fileCheck!!) @@ -131,7 +217,22 @@ class ModuleInteractionTest : StudentTest() { val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + // Create a page and add it as a module item + page = data.addPageToCourse( + courseId = course1.id, + pageId = data.newItemId(), + published = true, + title = "Page In Course", + url = URLEncoder.encode("Page In Course", "UTF-8") + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = page!! + ) + // Verify that we can launch into a page from a page module item + modulesPage.refresh() modulesPage.assertModuleDisplayed(module) modulesPage.assertModuleItemDisplayed(module, page!!.title!!) modulesPage.clickModuleItem(module, page!!.title!!) @@ -157,7 +258,48 @@ class ModuleInteractionTest : StudentTest() { val course1 = data.courses.values.first() val module = data.courseModules[course1.id]!!.first() + // Create a quiz and add it as a module item + quiz = data.addQuizToCourse( + course = course1 + ) + + data.addQuestionToQuiz( + course = course1, + quizId = quiz!!.id, + questionName = "Math 1", + questionText = "What is 2 + 5?", + questionType = "multiple_choice_question", + answers = arrayOf( + QuizAnswer(answerText = "7"), + QuizAnswer(answerText = "25"), + QuizAnswer(answerText = "-7") + ) + ) + + data.addQuestionToQuiz( + course = course1, + quizId = quiz!!.id, + questionName = "Math 2", + questionText = "Pi is greater than the square root of 2", + questionType = "true_false_question" + ) + + data.addQuestionToQuiz( + course = course1, + quizId = quiz!!.id, + questionName = "Math 3", + questionText = "Write an essay on why math is so awesome", + questionType = "essay_question" + ) + + data.addItemToModule( + course = course1, + moduleId = module.id, + item = quiz!! + ) + // Verify that we can launch into a quiz from a quiz module item + modulesPage.refresh() modulesPage.assertModuleDisplayed(module) modulesPage.assertModuleItemDisplayed(module, quiz!!.title!!) /* TODO: Check that the quiz is displayed if/when we can do so via WebView @@ -177,7 +319,20 @@ class ModuleInteractionTest : StudentTest() { // Basic mock setup val data = getToCourseModules(studentCount = 1, courseCount = 1) val course1 = data.courses.values.first() - val module = data.courseModules[course1.id]!!.first() + var module = data.courseModules[course1.id]!!.first() + + // Create an assignment and add it as a module item + assignment = data.addAssignment( + courseId = course1.id, + submissionType = Assignment.SubmissionType.ONLINE_TEXT_ENTRY + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = assignment!! + ) + + module = data.courseModules[course1.id]!!.first() val firstModuleItem = module.items[0] // Verify that expanding a module shows the module items and collapsing a module @@ -185,6 +340,7 @@ class ModuleInteractionTest : StudentTest() { // We're going on the assumption that the lone module is initially expanded. Although // the initial assertModuleItemDisplayed() would expand the module if it was not expanded // already. + modulesPage.refresh() modulesPage.assertModuleDisplayed(module) modulesPage.assertModuleItemDisplayed(module, firstModuleItem.title!!) modulesPage.clickModule(module) @@ -221,11 +377,68 @@ class ModuleInteractionTest : StudentTest() { fun testModules_navigateToNextAndPreviousModuleItems() { // Basic mock setup val data = getToCourseModules(studentCount = 1, courseCount = 1) + val externalUrl = "https://www.google.com" val course1 = data.courses.values.first() - val module = data.courseModules[course1.id]!!.first() + var module = data.courseModules[course1.id]!!.first() + val user = data.users.values.first() + + // Create an assignment and add it as a module item + assignment = data.addAssignment( + courseId = course1.id, + submissionType = Assignment.SubmissionType.ONLINE_TEXT_ENTRY + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = assignment!! + ) + + // Create a discussion and add it as a module item + topicHeader = data.addDiscussionTopicToCourse( + course = course1, + user = user, + topicTitle = "Discussion in module", + topicDescription = "In. A. Module." + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = topicHeader!! + ) + + val ltiTool = data.addLTITool("Google Drive", "http://google.com", course1, 1234L) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = ltiTool!! + ) + + // Create a page and add it as a module item + page = data.addPageToCourse( + courseId = course1.id, + pageId = data.newItemId(), + published = true, + title = "Page In Course", + url = URLEncoder.encode("Page In Course", "UTF-8") + ) + data.addItemToModule( + course = course1, + moduleId = module.id, + item = page!! + ) + + // Create an external URL and add it as a module item + data.addItemToModule( + course = course1, + moduleId = module.id, + item = externalUrl + ) + + module = data.courseModules[course1.id]!!.first() // Iterate through the module items, starting at the first val moduleItemList = module.items + modulesPage.refresh() modulesPage.clickModuleItem(module, moduleItemList[0].title!!) var moduleIndex = 0; // we start here @@ -413,126 +626,15 @@ class ModuleInteractionTest : StudentTest() { // Add a course tab val course1 = data.courses.values.first() - val user1 = data.users.values.first() val modulesTab = Tab(position = 2, label = "Modules", visibility = "public", tabId = Tab.MODULES_ID) data.courseTabs[course1.id]!! += modulesTab // Create a module - val module = data.addModuleToCourse( + data.addModuleToCourse( course = course1, moduleName = "Big Module" ) - // Create a discussion and add it as a module item - topicHeader = data.addDiscussionTopicToCourse( - course = course1, - user = user1, - topicTitle = "Discussion in module", - topicDescription = "In. A. Module." - ) - data.addItemToModule( - course = course1, - moduleId = module.id, - item = topicHeader!! - ) - - // Create an assignment and add it as a module item - assignment = data.addAssignment( - courseId = course1.id, - submissionType = Assignment.SubmissionType.ONLINE_TEXT_ENTRY - ) - data.addItemToModule( - course = course1, - moduleId = module.id, - item = assignment!! - ) - - // Create a page and add it as a module item - page = data.addPageToCourse( - courseId = course1.id, - pageId = data.newItemId(), - published = true, - title = "Page In Course", - url = URLEncoder.encode("Page In Course", "UTF-8") - ) - data.addItemToModule( - course = course1, - moduleId = module.id, - item = page!! - ) - - // Create a file and add it as a module item - val fileContent = "

A Heading

" - fileCheck = WebViewTextCheck(Locator.ID, "heading1", "A Heading") - - val fileId = data.addFileToCourse( - courseId = course1.id, - displayName = fileName, - fileContent = fileContent, - contentType = "text/html" - ) - val rootFolderId = data.courseRootFolders[course1.id]!!.id - val fileFolder = data.folderFiles[rootFolderId]?.find { it.id == fileId } - data.addItemToModule( - course = course1, - moduleId = module.id, - item = fileFolder!! - ) - - // Create an external URL and add it as a module item - data.addItemToModule( - course = course1, - moduleId = module.id, - item = externalUrl - ) - - // Create a quiz and add it as a module item - quiz = data.addQuizToCourse( - course = course1 - ) - - data.addQuestionToQuiz( - course = course1, - quizId = quiz!!.id, - questionName = "Math 1", - questionText = "What is 2 + 5?", - questionType = "multiple_choice_question", - answers = arrayOf( - QuizAnswer(answerText = "7"), - QuizAnswer(answerText = "25"), - QuizAnswer(answerText = "-7") - ) - ) - - data.addQuestionToQuiz( - course = course1, - quizId = quiz!!.id, - questionName = "Math 2", - questionText = "Pi is greater than the square root of 2", - questionType = "true_false_question" - ) - - data.addQuestionToQuiz( - course = course1, - quizId = quiz!!.id, - questionName = "Math 3", - questionText = "Write an essay on why math is so awesome", - questionType = "essay_question" - ) - - data.addItemToModule( - course = course1, - moduleId = module.id, - item = quiz!! - ) - - val ltiTool = data.addLTITool("Google Drive", "http://google.com", course1, 1234L) - data.addItemToModule( - course = course1, - moduleId = module.id, - item = ltiTool!! - ) - // Sign in val student = data.students[0] val token = data.tokenFor(student)!! diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/NotATeacherPageTest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/NotATeacherPageTest.kt index 24a7e27a53..fdabaaf522 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/NotATeacherPageTest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/NotATeacherPageTest.kt @@ -15,6 +15,7 @@ */ package com.instructure.teacher.ui +import com.instructure.canvas.espresso.Stub import com.instructure.teacher.ui.utils.TeacherTest import com.instructure.teacher.ui.utils.slowLogInAsStudent import dagger.hilt.android.testing.HiltAndroidTest @@ -25,6 +26,7 @@ class NotATeacherPageTest : TeacherTest() { // Runs live; no MockCanvas @Test + @Stub("Stubbed because of the 'too many login attempts' change on backend. Will be de-stubbed when we find a solution for that.") override fun displaysPageObjects() { slowLogInAsStudent() notATeacherPage.assertPageObjects() diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt index 17132fd6d5..4d80738c64 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt @@ -90,6 +90,10 @@ class DiscussionsE2ETest : TeacherTest() { discussionsListPage.assertGroupDisplayed("Pinned") discussionsListPage.assertDiscussionInGroup("Pinned", discussion2.title) + Log.d(STEP_TAG, "Assert that both of the discussions, '${discussion.title}' and '${discussion2.title}' discusssions are displayed.") + discussionsListPage.assertHasDiscussion(newTitle) + discussionsListPage.assertHasDiscussion(discussion2) + Log.d(STEP_TAG,"Navigate to Discussions Details Page by clicking on 'Edit'. Delete the '$newTitle' discussion.") discussionsListPage.clickDiscussion(newTitle) discussionsDetailsPage.openEdit() @@ -127,7 +131,7 @@ class DiscussionsE2ETest : TeacherTest() { Log.d(STEP_TAG,"Assert that the '$newDiscussionTitle' discussion is displayed and it is the only one.") discussionsListPage.assertDiscussionCount(1) discussionsListPage.assertHasDiscussion(newDiscussionTitle) - Espresso.pressBack() // need to press back to exit from the search input field + discussionsListPage.searchable.clickOnClearSearchButton() Log.d(STEP_TAG,"Collapse the discussion list and assert that the '$newDiscussionTitle' discussion can NOT be seen.") discussionsListPage.toggleCollapseExpandIcon() @@ -138,11 +142,5 @@ class DiscussionsE2ETest : TeacherTest() { discussionsListPage.toggleCollapseExpandIcon() discussionsListPage.assertDiscussionCount(1) discussionsListPage.assertHasDiscussion(newDiscussionTitle) - - Log.d(STEP_TAG, "Click on the clear search input button (X) on the toolbar. Assert that the default state, so both of the discussions will be displayed.") - discussionsListPage.searchable.clickOnClearSearchButton() - discussionsListPage.assertHasDiscussion(discussion) - discussionsListPage.assertHasDiscussion(discussion2) - discussionsListPage.assertDiscussionCount(2) } } \ No newline at end of file diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/FilesE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/FilesE2ETest.kt index 71aab3cde4..87cc6c14c1 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/FilesE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/FilesE2ETest.kt @@ -175,7 +175,7 @@ class FilesE2ETest: TeacherTest() { fileListPage.assertItemNotDisplayed("unfiled") Log.d(STEP_TAG, "Click on 'Reset' search (cross) icon and assert that all the root level directories and files are displayed (1).") - fileListPage.searchable.clickOnClearSearchButton() + fileListPage.searchable.pressSearchBackButton() fileListPage.assertFileListCount(1) Log.d(STEP_TAG,"Select 'unfiled' directory. Assert that ${discussionAttachmentFile.name} file is displayed on the File List Page.") diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt index d8c9ad7b7f..88b00f66ec 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt @@ -95,7 +95,7 @@ class AnnouncementsListPage(val searchable: Searchable) : BasePage() { * @param announcementName: The announcement name string parameter. */ fun assertHasAnnouncement(announcementName: String) { - onView(withText(announcementName)).assertDisplayed() + onView(withId(R.id.discussionTitle) + withText(announcementName)).assertDisplayed() } /** diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/CalendarEventPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/CalendarEventPage.kt index 6d078ce3c2..63c194c0f8 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/CalendarEventPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/CalendarEventPage.kt @@ -25,6 +25,8 @@ import androidx.test.espresso.web.webdriver.Locator import com.instructure.canvas.espresso.containsTextCaseInsensitive import com.instructure.espresso.assertDisplayed import com.instructure.espresso.page.BasePage +import com.instructure.espresso.page.plus +import com.instructure.espresso.page.withParent import com.instructure.teacher.R import org.hamcrest.Matchers @@ -56,7 +58,7 @@ class CalendarEventPage : BasePage(R.id.fragmentCalendarEvent) { * @throws AssertionError if the description does not match the expected description. */ fun verifyDescription(description: String) { - Web.onWebView(ViewMatchers.withId(R.id.contentWebView)) + Web.onWebView(ViewMatchers.withId(R.id.contentWebView) + withParent(R.id.calendarEventWebViewWrapper)) .withElement(DriverAtoms.findElement(Locator.ID, "content")) .check(WebViewAssertions.webMatches(DriverAtoms.getText(), Matchers.comparesEqualTo(description))) } From 1d3a67106702b8c1de08a25e2c9480e27f6384cd Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Wed, 23 Aug 2023 11:32:19 +0200 Subject: [PATCH 08/24] [MBL-16976][Student][Teacher] Fixed date picker contrast #2115 refs: MBL-16976 affects: Student, Teacher release note: none --- apps/student/src/main/res/values/styles.xml | 5 +++++ .../main/res/values/themes_canvastheme.xml | 1 + apps/teacher/src/main/res/values/styles.xml | 6 ++++++ .../res/color/calendar_color_selector.xml | 20 +++++++++++++++++++ .../pandautils/src/main/res/values/styles.xml | 4 ++++ 5 files changed, 36 insertions(+) create mode 100644 libs/pandautils/src/main/res/color/calendar_color_selector.xml diff --git a/apps/student/src/main/res/values/styles.xml b/apps/student/src/main/res/values/styles.xml index ab7bd8654a..f7f6d76219 100644 --- a/apps/student/src/main/res/values/styles.xml +++ b/apps/student/src/main/res/values/styles.xml @@ -255,4 +255,9 @@ @color/textDark + + diff --git a/apps/student/src/main/res/values/themes_canvastheme.xml b/apps/student/src/main/res/values/themes_canvastheme.xml index 25ff54c211..286ae42ffc 100755 --- a/apps/student/src/main/res/values/themes_canvastheme.xml +++ b/apps/student/src/main/res/values/themes_canvastheme.xml @@ -43,6 +43,7 @@ @style/ModalDialogStyle @style/AnnotationNoteHinter @color/backgroundLight + @style/DatePickerStyle + + diff --git a/libs/pandautils/src/main/res/color/calendar_color_selector.xml b/libs/pandautils/src/main/res/color/calendar_color_selector.xml new file mode 100644 index 0000000000..1ba3935ed9 --- /dev/null +++ b/libs/pandautils/src/main/res/color/calendar_color_selector.xml @@ -0,0 +1,20 @@ + + + + + \ No newline at end of file diff --git a/libs/pandautils/src/main/res/values/styles.xml b/libs/pandautils/src/main/res/values/styles.xml index 87edd80e33..ea6efca1aa 100644 --- a/libs/pandautils/src/main/res/values/styles.xml +++ b/libs/pandautils/src/main/res/values/styles.xml @@ -219,4 +219,8 @@ @color/white + + From 71e6067faa8235ca1957896430cc1aa3a15e8996 Mon Sep 17 00:00:00 2001 From: Akos Hermann <72087159+hermannakos@users.noreply.github.com> Date: Wed, 23 Aug 2023 13:05:40 +0200 Subject: [PATCH 09/24] [MBL-16981][All] Inbox input labels always visible (#2108) Test plan: Check the inbox compose screen, the labels should always be visible. refs: MBL-16981 affects: Student, Teacher, Parent release note: Accessibility improvement. --- .../create_conversation_screen.dart | 4 +- .../student/ui/pages/NewMessagePage.kt | 3 +- .../fragment/InboxComposeMessageFragment.kt | 2 +- .../layout/fragment_inbox_compose_message.xml | 70 +++++++++------- .../teacher/fragments/AddMessageFragment.kt | 2 +- .../main/res/layout/fragment_add_message.xml | 83 ++++++++++--------- 6 files changed, 92 insertions(+), 72 deletions(-) diff --git a/apps/flutter_parent/lib/screens/inbox/create_conversation/create_conversation_screen.dart b/apps/flutter_parent/lib/screens/inbox/create_conversation/create_conversation_screen.dart index 911f5db614..1cdbf7b6e8 100644 --- a/apps/flutter_parent/lib/screens/inbox/create_conversation/create_conversation_screen.dart +++ b/apps/flutter_parent/lib/screens/inbox/create_conversation/create_conversation_screen.dart @@ -463,7 +463,7 @@ class _CreateConversationScreenState extends State wit style: Theme.of(context).textTheme.bodyText1, textCapitalization: TextCapitalization.sentences, decoration: InputDecoration( - hintText: L10n(context).messageSubjectInputHint, + labelText: L10n(context).messageSubjectInputHint, contentPadding: EdgeInsets.all(16), border: InputBorder.none, ), @@ -484,7 +484,7 @@ class _CreateConversationScreenState extends State wit maxLines: null, style: Theme.of(context).textTheme.bodyText2, decoration: InputDecoration( - hintText: L10n(context).messageBodyInputHint, + labelText: L10n(context).messageBodyInputHint, contentPadding: EdgeInsets.all(16), border: InputBorder.none, ), diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/NewMessagePage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/NewMessagePage.kt index 5bd887a0cb..ee1737f2da 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/NewMessagePage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/NewMessagePage.kt @@ -130,7 +130,8 @@ class NewMessagePage : BasePage() { fun setMessage(messageText: String) { Espresso.closeSoftKeyboard() - onView(allOf(withId(R.id.message), hasSibling(withId(R.id.sendIndividualDivider)))) + onView(withId(R.id.messageContainer)).click() + onView(allOf(withId(R.id.message), withAncestor(R.id.messageContainer))) .scrollTo() .typeText(messageText) } diff --git a/apps/student/src/main/java/com/instructure/student/fragment/InboxComposeMessageFragment.kt b/apps/student/src/main/java/com/instructure/student/fragment/InboxComposeMessageFragment.kt index 6962b7d493..b4c6148bc8 100644 --- a/apps/student/src/main/java/com/instructure/student/fragment/InboxComposeMessageFragment.kt +++ b/apps/student/src/main/java/com/instructure/student/fragment/InboxComposeMessageFragment.kt @@ -319,7 +319,7 @@ class InboxComposeMessageFragment : ParentFragment(), FileUploadDialogParent { private fun handleExit() { // Check to see if the user has made any changes - if (binding.editSubject.text.isNotBlank() || binding.message.text.isNotBlank() || attachments.isNotEmpty()) { + if (binding.editSubject.text?.isNotBlank() == true || binding.message.text?.isNotBlank() == true || attachments.isNotEmpty()) { shouldAllowExit = false // Use childFragmentManager so that exiting the compose fragment also dismisses the dialog UnsavedChangesExitDialog.show(childFragmentManager) { diff --git a/apps/student/src/main/res/layout/fragment_inbox_compose_message.xml b/apps/student/src/main/res/layout/fragment_inbox_compose_message.xml index 16b4e10ed5..6a623ffdbb 100644 --- a/apps/student/src/main/res/layout/fragment_inbox_compose_message.xml +++ b/apps/student/src/main/res/layout/fragment_inbox_compose_message.xml @@ -120,22 +120,26 @@ - - + android:layout_height="wrap_content"> + + + - + android:layout_height="wrap_content"> + + + - تم الحذف + تم تحديث الدرجة جارٍ تحميل محتوى Canvas… UnknownDevice @@ -1170,6 +1171,7 @@ يمكنك فتح تفاصيل الإرسال من هنا + الدرجة: %s %s من الدقائق %s دقيقة diff --git a/libs/pandares/src/main/res/values-b+da+DK+instk12/strings.xml b/libs/pandares/src/main/res/values-b+da+DK+instk12/strings.xml index e1651e56b6..3d89c5ace5 100644 --- a/libs/pandares/src/main/res/values-b+da+DK+instk12/strings.xml +++ b/libs/pandares/src/main/res/values-b+da+DK+instk12/strings.xml @@ -432,6 +432,7 @@ Slettet + Vurdering opdateret Indlæser Canvas-indhold… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan åbne afleveringsdetaljerne herfra + Vurdering: %s %s minut %s minutter diff --git a/libs/pandares/src/main/res/values-b+en+AU+unimelb/strings.xml b/libs/pandares/src/main/res/values-b+en+AU+unimelb/strings.xml index 9d91414183..013c458795 100644 --- a/libs/pandares/src/main/res/values-b+en+AU+unimelb/strings.xml +++ b/libs/pandares/src/main/res/values-b+en+AU+unimelb/strings.xml @@ -432,6 +432,7 @@ Deleted + Grade updated Loading Canvas Content… UnknownDevice @@ -1119,6 +1120,7 @@ You can open Submission details from here + Grade: %s %s Minute %s Minutes diff --git a/libs/pandares/src/main/res/values-b+en+GB+instukhe/strings.xml b/libs/pandares/src/main/res/values-b+en+GB+instukhe/strings.xml index 4072036e2e..e860a4f857 100644 --- a/libs/pandares/src/main/res/values-b+en+GB+instukhe/strings.xml +++ b/libs/pandares/src/main/res/values-b+en+GB+instukhe/strings.xml @@ -432,6 +432,7 @@ Deleted + Grade updated Loading Canvas Content… UnknownDevice @@ -1119,6 +1120,7 @@ You can open Submission details from here + Grade: %s %s minute %s Minutes diff --git a/libs/pandares/src/main/res/values-b+nb+NO+instk12/strings.xml b/libs/pandares/src/main/res/values-b+nb+NO+instk12/strings.xml index bd6ae8ec18..3bbbfdbd80 100644 --- a/libs/pandares/src/main/res/values-b+nb+NO+instk12/strings.xml +++ b/libs/pandares/src/main/res/values-b+nb+NO+instk12/strings.xml @@ -432,6 +432,7 @@ Slettet + Vurdering oppdatert Laster Canvas-innhold… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan åpne Detaljer om innlevering her + Vurdering: %s %s minutt %s minutter diff --git a/libs/pandares/src/main/res/values-b+sv+SE+instk12/strings.xml b/libs/pandares/src/main/res/values-b+sv+SE+instk12/strings.xml index 44ae3284e8..eb7b807e44 100644 --- a/libs/pandares/src/main/res/values-b+sv+SE+instk12/strings.xml +++ b/libs/pandares/src/main/res/values-b+sv+SE+instk12/strings.xml @@ -432,6 +432,7 @@ Borttagen + Bedömning uppdaterat Läser in Canvas-innehåll… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan öppna inlämningsinformationen härifrån + Bedömning: %s %s minut %s minuter diff --git a/libs/pandares/src/main/res/values-b+zh+HK/strings.xml b/libs/pandares/src/main/res/values-b+zh+HK/strings.xml index b6bf168689..ee91fbdcd0 100644 --- a/libs/pandares/src/main/res/values-b+zh+HK/strings.xml +++ b/libs/pandares/src/main/res/values-b+zh+HK/strings.xml @@ -426,6 +426,7 @@ 已刪除 + 評分已更新 載入 Canvas 內容… UnknownDevice @@ -1106,6 +1107,7 @@ 您可以從此處開啟提交項目詳細資料 + 評分:%s %s 分鐘 diff --git a/libs/pandares/src/main/res/values-b+zh+Hans/strings.xml b/libs/pandares/src/main/res/values-b+zh+Hans/strings.xml index 815e304d01..9fd0ff9c21 100644 --- a/libs/pandares/src/main/res/values-b+zh+Hans/strings.xml +++ b/libs/pandares/src/main/res/values-b+zh+Hans/strings.xml @@ -426,6 +426,7 @@ 已删除 + 评分已更新 正在加载Canvas内容… UnknownDevice @@ -1106,6 +1107,7 @@ 您可以从此处打开提交详情 + 评分:%s %s 分钟 diff --git a/libs/pandares/src/main/res/values-b+zh+Hant/strings.xml b/libs/pandares/src/main/res/values-b+zh+Hant/strings.xml index b6bf168689..ee91fbdcd0 100644 --- a/libs/pandares/src/main/res/values-b+zh+Hant/strings.xml +++ b/libs/pandares/src/main/res/values-b+zh+Hant/strings.xml @@ -426,6 +426,7 @@ 已刪除 + 評分已更新 載入 Canvas 內容… UnknownDevice @@ -1106,6 +1107,7 @@ 您可以從此處開啟提交項目詳細資料 + 評分:%s %s 分鐘 diff --git a/libs/pandares/src/main/res/values-ca/strings.xml b/libs/pandares/src/main/res/values-ca/strings.xml index 00d064fb12..013976b360 100644 --- a/libs/pandares/src/main/res/values-ca/strings.xml +++ b/libs/pandares/src/main/res/values-ca/strings.xml @@ -432,6 +432,7 @@ Suprimit + S’ha actualitzat la nota S\'està carregant el contingut de Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Podeu obrir Informació de l’entrega des d\'aquí + Nota: %s %s minut %s minuts diff --git a/libs/pandares/src/main/res/values-cy/strings.xml b/libs/pandares/src/main/res/values-cy/strings.xml index 6bd48540a4..8498f8bf6d 100644 --- a/libs/pandares/src/main/res/values-cy/strings.xml +++ b/libs/pandares/src/main/res/values-cy/strings.xml @@ -432,6 +432,7 @@ Wedi dileu + Gradd wedi’i diweddaru Llwytho Cynnwys Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Gallwch chi agor manylion Cyflwyniad fan hyn + Gradd: %s %s Munud %s Munud diff --git a/libs/pandares/src/main/res/values-da/strings.xml b/libs/pandares/src/main/res/values-da/strings.xml index 5235e2943e..ddc3e5462f 100644 --- a/libs/pandares/src/main/res/values-da/strings.xml +++ b/libs/pandares/src/main/res/values-da/strings.xml @@ -432,6 +432,7 @@ Slettet + Karakter opdateret Indlæser Canvas-indhold… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan åbne afleveringsdetaljerne herfra + Karakter: %s %s minut %s minutter diff --git a/libs/pandares/src/main/res/values-de/strings.xml b/libs/pandares/src/main/res/values-de/strings.xml index 97b9b7ade9..58cda0e850 100644 --- a/libs/pandares/src/main/res/values-de/strings.xml +++ b/libs/pandares/src/main/res/values-de/strings.xml @@ -432,6 +432,7 @@ Gelöscht + Note aktualisiert Canvas-Content laden… UnknownDevice @@ -1119,6 +1120,7 @@ Sie können die Abgabedetails von hier aus öffnen + Note: %s %s Minute %s Minuten diff --git a/libs/pandares/src/main/res/values-en-rAU/strings.xml b/libs/pandares/src/main/res/values-en-rAU/strings.xml index 94d73a8b46..8aa32c6d13 100644 --- a/libs/pandares/src/main/res/values-en-rAU/strings.xml +++ b/libs/pandares/src/main/res/values-en-rAU/strings.xml @@ -432,6 +432,7 @@ Deleted + Mark updated Loading Canvas Content… UnknownDevice @@ -1119,6 +1120,7 @@ You can open Submission details from here + Mark: %s %s Minute %s Minutes diff --git a/libs/pandares/src/main/res/values-en-rCY/strings.xml b/libs/pandares/src/main/res/values-en-rCY/strings.xml index 4072036e2e..e860a4f857 100644 --- a/libs/pandares/src/main/res/values-en-rCY/strings.xml +++ b/libs/pandares/src/main/res/values-en-rCY/strings.xml @@ -432,6 +432,7 @@ Deleted + Grade updated Loading Canvas Content… UnknownDevice @@ -1119,6 +1120,7 @@ You can open Submission details from here + Grade: %s %s minute %s Minutes diff --git a/libs/pandares/src/main/res/values-en-rGB/strings.xml b/libs/pandares/src/main/res/values-en-rGB/strings.xml index 2b1b2629c7..70d3e97250 100644 --- a/libs/pandares/src/main/res/values-en-rGB/strings.xml +++ b/libs/pandares/src/main/res/values-en-rGB/strings.xml @@ -432,6 +432,7 @@ Deleted + Grade updated Loading Canvas Content… UnknownDevice @@ -1119,6 +1120,7 @@ You can open Submission details from here + Grade: %s %s minute %s Minutes diff --git a/libs/pandares/src/main/res/values-es-rES/strings.xml b/libs/pandares/src/main/res/values-es-rES/strings.xml index e8465b9bf7..8cef4f43c9 100644 --- a/libs/pandares/src/main/res/values-es-rES/strings.xml +++ b/libs/pandares/src/main/res/values-es-rES/strings.xml @@ -432,6 +432,7 @@ Eliminado + Nota actualizada Cargando el contenido de Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Desde aquí puedes abrir los detalles de la entrega + Nota: %s %s minuto %s minutos diff --git a/libs/pandares/src/main/res/values-es/strings.xml b/libs/pandares/src/main/res/values-es/strings.xml index 22bfecd1b7..1aaa81bfb7 100644 --- a/libs/pandares/src/main/res/values-es/strings.xml +++ b/libs/pandares/src/main/res/values-es/strings.xml @@ -432,6 +432,7 @@ Eliminado + Calificación actualizada Cargando el contenido de Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Desde aquí puede abrir los detalles de Entrega + Calificación: %s %s minuto %s minutos diff --git a/libs/pandares/src/main/res/values-fi/strings.xml b/libs/pandares/src/main/res/values-fi/strings.xml index d4f361ce9a..ab65479f50 100644 --- a/libs/pandares/src/main/res/values-fi/strings.xml +++ b/libs/pandares/src/main/res/values-fi/strings.xml @@ -432,6 +432,7 @@ Poistettu + Arvosana päivitetty Ladataan Canvas-sisältöä… UnknownDevice @@ -1119,6 +1120,7 @@ Voit avata tehtävän palautustiedot täältä + Arvosana: %s %s Minuutti %s minuuttia diff --git a/libs/pandares/src/main/res/values-fr-rCA/strings.xml b/libs/pandares/src/main/res/values-fr-rCA/strings.xml index 63e5e000cd..dd583f2abc 100644 --- a/libs/pandares/src/main/res/values-fr-rCA/strings.xml +++ b/libs/pandares/src/main/res/values-fr-rCA/strings.xml @@ -432,6 +432,7 @@ Supprimé + Note mise à jour Chargement du contenu de Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Vous pouvez ouvrir les détails de l’envoi à partir d’ici + Note : %s %s Minute %s Minutes diff --git a/libs/pandares/src/main/res/values-fr/strings.xml b/libs/pandares/src/main/res/values-fr/strings.xml index a566c9618a..adaf919f50 100644 --- a/libs/pandares/src/main/res/values-fr/strings.xml +++ b/libs/pandares/src/main/res/values-fr/strings.xml @@ -432,6 +432,7 @@ Supprimé + Note mise à jour Chargement du contenu Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Vous pouvez ouvrir les Détails de soumission à partir d\'ici + Note : %s %s Minute %s Minutes diff --git a/libs/pandares/src/main/res/values-ht/strings.xml b/libs/pandares/src/main/res/values-ht/strings.xml index bad97880f0..4d9e1e3de6 100644 --- a/libs/pandares/src/main/res/values-ht/strings.xml +++ b/libs/pandares/src/main/res/values-ht/strings.xml @@ -432,6 +432,7 @@ Efase + Klas aktyalize Chajman Kontni Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Ou ka ouvri detay Soumisyon yo la a + Klas: %s %s Minit %s Minit diff --git a/libs/pandares/src/main/res/values-is/strings.xml b/libs/pandares/src/main/res/values-is/strings.xml index 11335d2433..71498f4b73 100644 --- a/libs/pandares/src/main/res/values-is/strings.xml +++ b/libs/pandares/src/main/res/values-is/strings.xml @@ -432,6 +432,7 @@ Eytt + Einkunn uppfærð Sæki Canvas efni… UnknownDevice @@ -1119,6 +1120,7 @@ Þú getur opnað upplýsingar um skil héðan + Einkunn: %s %s Mínúta %s mínútur diff --git a/libs/pandares/src/main/res/values-it/strings.xml b/libs/pandares/src/main/res/values-it/strings.xml index 95e35d513b..1ebe6ca67a 100644 --- a/libs/pandares/src/main/res/values-it/strings.xml +++ b/libs/pandares/src/main/res/values-it/strings.xml @@ -432,6 +432,7 @@ Eliminato + Voto aggiornato Caricamento dei contenuti Contenuto… UnknownDevice @@ -1119,6 +1120,7 @@ Puoi aprire i dettagli consegna da qui + Voto: %s %s minuto %s minuti diff --git a/libs/pandares/src/main/res/values-ja/strings.xml b/libs/pandares/src/main/res/values-ja/strings.xml index 44d2184638..0b26bf4991 100644 --- a/libs/pandares/src/main/res/values-ja/strings.xml +++ b/libs/pandares/src/main/res/values-ja/strings.xml @@ -426,6 +426,7 @@ 削除されました + 評定を更新しました Canvas コンテンツ…を読み込み中 UnknownDevice @@ -1106,6 +1107,7 @@ 「提出」の詳細はここで開くことができます + 評定:%s %s 分 diff --git a/libs/pandares/src/main/res/values-mi/strings.xml b/libs/pandares/src/main/res/values-mi/strings.xml index 31a742b7fb..3ce51d36f9 100644 --- a/libs/pandares/src/main/res/values-mi/strings.xml +++ b/libs/pandares/src/main/res/values-mi/strings.xml @@ -432,6 +432,7 @@ mukua + Koeke kua whakahoutia E uta ana Canvas Ihirangi… UnknownDevice @@ -1119,6 +1120,7 @@ Mai i konei, ka kite koe i nga Taipitopito Tukunga. + Kōeke: %s %s Meneti %s meneti diff --git a/libs/pandares/src/main/res/values-ms/strings.xml b/libs/pandares/src/main/res/values-ms/strings.xml index 22552f920e..bce19c3d3a 100644 --- a/libs/pandares/src/main/res/values-ms/strings.xml +++ b/libs/pandares/src/main/res/values-ms/strings.xml @@ -432,6 +432,7 @@ Telah Dipadamkan + Gred dikemas kini Memuatkan Kandungan Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Anda boleh membuka butiran Serahan di sini + Gred: %s %s Minit %s Minit diff --git a/libs/pandares/src/main/res/values-nb/strings.xml b/libs/pandares/src/main/res/values-nb/strings.xml index fc43bf719c..74ed00f0d0 100644 --- a/libs/pandares/src/main/res/values-nb/strings.xml +++ b/libs/pandares/src/main/res/values-nb/strings.xml @@ -432,6 +432,7 @@ Slettet + Vurdering oppdatert Laster Canvas-innhold… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan åpne Detaljer om innlevering her + Vurdering: %s %s minutt %s minutter diff --git a/libs/pandares/src/main/res/values-nl/strings.xml b/libs/pandares/src/main/res/values-nl/strings.xml index e5e50a7c83..0b32e79400 100644 --- a/libs/pandares/src/main/res/values-nl/strings.xml +++ b/libs/pandares/src/main/res/values-nl/strings.xml @@ -432,6 +432,7 @@ Verwijderd + Cijfer bijgewerkt Canvas Content aan het uploaden… UnknownDevice @@ -1119,6 +1120,7 @@ U kunt inleverdetails hier openen + Cijfer: %s %s minuut %s minuten diff --git a/libs/pandares/src/main/res/values-pl/strings.xml b/libs/pandares/src/main/res/values-pl/strings.xml index f40e84f984..a9f3d91551 100644 --- a/libs/pandares/src/main/res/values-pl/strings.xml +++ b/libs/pandares/src/main/res/values-pl/strings.xml @@ -444,6 +444,7 @@ Usunięto + Zaktualizowano ocenę Ładowanie zawartości Canvas… UnknownDevice @@ -1145,6 +1146,7 @@ Tutaj można otworzyć szczegóły przesyłki + Ocena: %s %s min %s min diff --git a/libs/pandares/src/main/res/values-pt-rBR/strings.xml b/libs/pandares/src/main/res/values-pt-rBR/strings.xml index ce7e963aba..dc5f3aec5c 100644 --- a/libs/pandares/src/main/res/values-pt-rBR/strings.xml +++ b/libs/pandares/src/main/res/values-pt-rBR/strings.xml @@ -432,6 +432,7 @@ Excluído + Nota atualizada Carregando conteúdo do Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Você pode abrir os detalhes do Envio aqui + Nota: %s %s Minuto %s Minutos diff --git a/libs/pandares/src/main/res/values-pt-rPT/strings.xml b/libs/pandares/src/main/res/values-pt-rPT/strings.xml index 3c73a4d156..1bf5144981 100644 --- a/libs/pandares/src/main/res/values-pt-rPT/strings.xml +++ b/libs/pandares/src/main/res/values-pt-rPT/strings.xml @@ -432,6 +432,7 @@ Eliminado + Nota atualizada A carregar o conteúdo da tela… UnknownDevice @@ -1119,6 +1120,7 @@ Podes abrir detalhes de Submissão a partir daqui + Nota: %s %s minuto %s minutos diff --git a/libs/pandares/src/main/res/values-ru/strings.xml b/libs/pandares/src/main/res/values-ru/strings.xml index 311d8519e6..9c7d3ded27 100644 --- a/libs/pandares/src/main/res/values-ru/strings.xml +++ b/libs/pandares/src/main/res/values-ru/strings.xml @@ -444,6 +444,7 @@ Удалено + Оценка обновлена Загрузка контента Canvas… UnknownDevice @@ -1145,6 +1146,7 @@ Вы можете открыть информацию об отправке здесь + Оценка: %s %s минута %s минут diff --git a/libs/pandares/src/main/res/values-sl/strings.xml b/libs/pandares/src/main/res/values-sl/strings.xml index 3dd4497706..b77f4e12fc 100644 --- a/libs/pandares/src/main/res/values-sl/strings.xml +++ b/libs/pandares/src/main/res/values-sl/strings.xml @@ -432,6 +432,7 @@ Odstranjeno + Ocena je posodobljena Nalaganje vsebine sistema Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Tukaj lahko odprete podrobnosti o oddaji + Ocena: %s %s minuta %s minut diff --git a/libs/pandares/src/main/res/values-sv/strings.xml b/libs/pandares/src/main/res/values-sv/strings.xml index b923d00664..fc1aee1a9d 100644 --- a/libs/pandares/src/main/res/values-sv/strings.xml +++ b/libs/pandares/src/main/res/values-sv/strings.xml @@ -432,6 +432,7 @@ Borttagen + Omdöme uppdaterat Läser in Canvas-innehåll… UnknownDevice @@ -1119,6 +1120,7 @@ Du kan öppna inlämningsinformationen härifrån + Omdöme: %s %s minut %s minuter diff --git a/libs/pandares/src/main/res/values-th/strings.xml b/libs/pandares/src/main/res/values-th/strings.xml index a0a534be86..e9871f3baf 100644 --- a/libs/pandares/src/main/res/values-th/strings.xml +++ b/libs/pandares/src/main/res/values-th/strings.xml @@ -432,6 +432,7 @@ ลบแล้ว + อัพเดตเกรดแล้ว กำลังโหลดเนื้อหา Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ คุณสามารถเปิดรายละเอียดผลงานจัดส่ง (Submission details) ได้จากที่นี่ + เกรด: %s %s นาที %s นาที diff --git a/libs/pandares/src/main/res/values-vi/strings.xml b/libs/pandares/src/main/res/values-vi/strings.xml index db8ee483c2..bcf91a4a53 100644 --- a/libs/pandares/src/main/res/values-vi/strings.xml +++ b/libs/pandares/src/main/res/values-vi/strings.xml @@ -432,6 +432,7 @@ Đã xóa + Đã cập nhật lớp Đang Tải Nội Dung Canvas… UnknownDevice @@ -1119,6 +1120,7 @@ Bạn có thể mở chi tiết Bài Nộp từ đây + Lớp: %s %s Phút %s Phút diff --git a/libs/pandares/src/main/res/values-zh/strings.xml b/libs/pandares/src/main/res/values-zh/strings.xml index 815e304d01..9fd0ff9c21 100644 --- a/libs/pandares/src/main/res/values-zh/strings.xml +++ b/libs/pandares/src/main/res/values-zh/strings.xml @@ -426,6 +426,7 @@ 已删除 + 评分已更新 正在加载Canvas内容… UnknownDevice @@ -1106,6 +1107,7 @@ 您可以从此处打开提交详情 + 评分:%s %s 分钟 From 233b5a52b37528d1a327b1b8d8f6846f665dc2f6 Mon Sep 17 00:00:00 2001 From: Kristof Deak <92309696+kdeakinstructure@users.noreply.github.com> Date: Wed, 30 Aug 2023 13:54:13 +0200 Subject: [PATCH 19/24] [MBL-16965][Student] - Separate announcement list page from discussion list page (#2125) --- .../student/ui/e2e/AnnouncementsE2ETest.kt | 42 +++++++++---------- .../student/ui/pages/AnnouncementListPage.kt | 4 +- .../student/ui/pages/DiscussionListPage.kt | 2 +- .../student/ui/utils/StudentTest.kt | 2 +- .../teacher/ui/e2e/AnnouncementsE2ETest.kt | 23 +++++----- .../teacher/ui/e2e/DiscussionsE2ETest.kt | 10 ++--- .../teacher/ui/pages/AnnouncementsListPage.kt | 16 +++---- ...Page.kt => EditAnnouncementDetailsPage.kt} | 16 ++----- .../ui/pages/EditDiscussionsDetailsPage.kt | 6 +-- .../teacher/ui/utils/TeacherTest.kt | 4 +- 10 files changed, 60 insertions(+), 65 deletions(-) rename apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/{EditAnnouncementPage.kt => EditAnnouncementDetailsPage.kt} (82%) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/AnnouncementsE2ETest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/AnnouncementsE2ETest.kt index 65b44544cd..755499d291 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/AnnouncementsE2ETest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/AnnouncementsE2ETest.kt @@ -63,13 +63,13 @@ class AnnouncementsE2ETest : StudentTest() { courseBrowserPage.selectAnnouncements() Log.d(STEP_TAG,"Assert that ${announcement.title} announcement is displayed.") - discussionListPage.assertTopicDisplayed(announcement.title) + announcementListPage.assertTopicDisplayed(announcement.title) Log.d(STEP_TAG, "Assert that ${lockedAnnouncement.title} announcement is really locked so that the 'locked' icon is displayed.") - discussionListPage.assertAnnouncementLocked(lockedAnnouncement.title) + announcementListPage.assertAnnouncementLocked(lockedAnnouncement.title) Log.d(STEP_TAG, "Select ${lockedAnnouncement.title} announcement and assert if we are landing on the Discussion Details Page.") - discussionListPage.selectTopic(lockedAnnouncement.title) + announcementListPage.selectTopic(lockedAnnouncement.title) discussionDetailsPage.assertTitleText(lockedAnnouncement.title) Log.d(STEP_TAG, "Assert that the 'Reply' button is not available on a locked announcement. Navigate back to Announcement List Page.") @@ -77,7 +77,7 @@ class AnnouncementsE2ETest : StudentTest() { Espresso.pressBack() Log.d(STEP_TAG,"Select ${announcement.title} announcement and assert if we are landing on the Discussion Details Page.") - discussionListPage.selectTopic(announcement.title) + announcementListPage.selectTopic(announcement.title) discussionDetailsPage.assertTitleText(announcement.title) val replyMessage = "Reply text" @@ -92,36 +92,36 @@ class AnnouncementsE2ETest : StudentTest() { Log.d(STEP_TAG,"Click on Search button and type ${announcement.title} to the search input field.") Espresso.pressBack() - discussionListPage.searchable.clickOnSearchButton() - discussionListPage.searchable.typeToSearchBar(announcement.title) + announcementListPage.searchable.clickOnSearchButton() + announcementListPage.searchable.typeToSearchBar(announcement.title) Log.d(STEP_TAG,"Assert that only the matching announcement is displayed on the Discussion List Page.") - discussionListPage.pullToUpdate() - discussionListPage.assertTopicDisplayed(announcement.title) - discussionListPage.assertTopicNotDisplayed(lockedAnnouncement.title) + announcementListPage.pullToUpdate() + announcementListPage.assertTopicDisplayed(announcement.title) + announcementListPage.assertTopicNotDisplayed(lockedAnnouncement.title) Log.d(STEP_TAG,"Clear search input field value and assert if all the announcements are displayed again on the Discussion List Page.") - discussionListPage.searchable.clickOnClearSearchButton() - discussionListPage.waitForDiscussionTopicToDisplay(lockedAnnouncement.title) - discussionListPage.assertTopicDisplayed(announcement.title) + announcementListPage.searchable.clickOnClearSearchButton() + announcementListPage.waitForDiscussionTopicToDisplay(lockedAnnouncement.title) + announcementListPage.assertTopicDisplayed(announcement.title) Log.d(STEP_TAG,"Type a search value to the search input field which does not much with any of the existing announcements.") - discussionListPage.searchable.typeToSearchBar("Non existing announcement title") + announcementListPage.searchable.typeToSearchBar("Non existing announcement title") sleep(3000) //We need this wait here to let make sure the search process has finished. Log.d(STEP_TAG,"Assert that the empty view is displayed and none of the announcements are appearing on the page.") - discussionListPage.assertEmpty() - discussionListPage.assertTopicNotDisplayed(announcement.title) - discussionListPage.assertTopicNotDisplayed(lockedAnnouncement.title) + announcementListPage.assertEmpty() + announcementListPage.assertTopicNotDisplayed(announcement.title) + announcementListPage.assertTopicNotDisplayed(lockedAnnouncement.title) Log.d(STEP_TAG,"Clear search input field value and assert if all the announcements are displayed again on the Discussion List Page.") - discussionListPage.searchable.clickOnClearSearchButton() - discussionListPage.waitForDiscussionTopicToDisplay(lockedAnnouncement.title) - discussionListPage.assertTopicDisplayed(announcement.title) + announcementListPage.searchable.clickOnClearSearchButton() + announcementListPage.waitForDiscussionTopicToDisplay(lockedAnnouncement.title) + announcementListPage.assertTopicDisplayed(announcement.title) Log.d(STEP_TAG,"Refresh the page and assert that after refresh, still all the announcements are displayed.") refresh() - discussionListPage.assertTopicDisplayed(announcement.title) - discussionListPage.assertTopicDisplayed(lockedAnnouncement.title) + announcementListPage.assertTopicDisplayed(announcement.title) + announcementListPage.assertTopicDisplayed(lockedAnnouncement.title) } } \ No newline at end of file diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/AnnouncementListPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/AnnouncementListPage.kt index d4986a1d9e..26c6b09593 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/AnnouncementListPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/AnnouncementListPage.kt @@ -17,16 +17,16 @@ package com.instructure.student.ui.pages import androidx.test.espresso.matcher.ViewMatchers.isDisplayed +import com.instructure.espresso.Searchable import com.instructure.espresso.assertDisplayed import com.instructure.espresso.matchers.WaitForViewMatcher -import com.instructure.espresso.page.BasePage import com.instructure.espresso.page.onView import com.instructure.espresso.page.plus import com.instructure.espresso.page.withParent import com.instructure.espresso.page.withText import com.instructure.student.R -class AnnouncementListPage() : BasePage(R.id.discussionListPage) { +class AnnouncementListPage(searchable: Searchable) : DiscussionListPage(searchable) { fun assertToolbarTitle() { WaitForViewMatcher.waitForView(withParent(R.id.discussionListToolbar) + withText(R.string.announcements)).assertDisplayed() diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DiscussionListPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DiscussionListPage.kt index 3e6bebfce7..28f125e1a9 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DiscussionListPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/DiscussionListPage.kt @@ -49,7 +49,7 @@ import org.hamcrest.Matchers.allOf import org.hamcrest.Matchers.anyOf import org.hamcrest.Matchers.containsString -class DiscussionListPage(val searchable: Searchable) : BasePage(R.id.discussionListPage) { +open class DiscussionListPage(val searchable: Searchable) : BasePage(R.id.discussionListPage) { private val createNewDiscussion by OnViewWithId(R.id.createNewDiscussion) private val announcementsRecyclerView by OnViewWithId(R.id.discussionRecyclerView) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentTest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentTest.kt index 2285f6c0ce..6000d1db3b 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentTest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentTest.kt @@ -143,7 +143,7 @@ abstract class StudentTest : CanvasTest() { * Required for auto complete of page objects within tests */ val annotationCommentListPage = AnnotationCommentListPage() - val announcementListPage = AnnouncementListPage() + val announcementListPage = AnnouncementListPage(Searchable(R.id.search, R.id.search_src_text, R.id.search_close_btn)) val assignmentDetailsPage = AssignmentDetailsPage() val assignmentListPage = AssignmentListPage(Searchable(R.id.search, R.id.search_src_text)) val bookmarkPage = BookmarkPage() diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AnnouncementsE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AnnouncementsE2ETest.kt index fb91c72a4a..30257cff90 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AnnouncementsE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AnnouncementsE2ETest.kt @@ -41,6 +41,9 @@ class AnnouncementsE2ETest : TeacherTest() { override fun enableAndConfigureAccessibilityChecks() = Unit + //Because of naming conventions, we are using 'announcementDetailsPage' naming in this class to make the code more readable and straightforward. + private val announcementDetailsPage = discussionsDetailsPage + /** * Test announcements e2e * @@ -82,10 +85,10 @@ class AnnouncementsE2ETest : TeacherTest() { announcementsListPage.assertSearchResultCount(2) Log.d(STEP_TAG,"Edit ${announcement.title} announcement's name to 'Haha'. Save the modifications.") - announcementsListPage.clickDiscussion(announcement) - editAnnouncementPage.openEdit() - editAnnouncementPage.editAnnouncementName("Haha") - editAnnouncementPage.saveEditAnnouncement() + announcementsListPage.clickAnnouncement(announcement) + announcementDetailsPage.openEdit() + editAnnouncementDetailsPage.editAnnouncementTitle("Haha") + editAnnouncementDetailsPage.saveAnnouncement() Log.d(STEP_TAG,"Navigate back to the Announcements Page. Refresh the page and assert that the announcement name has been changed to 'Haha'.") Espresso.pressBack() @@ -93,14 +96,14 @@ class AnnouncementsE2ETest : TeacherTest() { announcementsListPage.assertHasAnnouncement("Haha") Log.d(STEP_TAG,"Delete the 'Haha' titled announcement.") - announcementsListPage.clickDiscussion("Haha") - editAnnouncementPage.openEdit() - editAnnouncementPage.deleteAnnouncement() + announcementsListPage.clickAnnouncement("Haha") + announcementDetailsPage.openEdit() + editAnnouncementDetailsPage.deleteAnnouncement() Log.d(STEP_TAG, "") - announcementsListPage.clickDiscussion(announcement2.title) - editAnnouncementPage.openEdit() - editAnnouncementPage.deleteAnnouncement() + announcementsListPage.clickAnnouncement(announcement2.title) + announcementDetailsPage.openEdit() + editAnnouncementDetailsPage.deleteAnnouncement() Log.d(STEP_TAG,"Refresh the Announcements Page and assert that there is no announcement displayed. Assert that empty view is displayed.") announcementsListPage.refresh() diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt index 4d80738c64..7fed199a13 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/DiscussionsE2ETest.kt @@ -66,8 +66,8 @@ class DiscussionsE2ETest : TeacherTest() { val newTitle = "New Discussion" Log.d(STEP_TAG,"Edit the discussion's title to: '$newTitle'. Click on 'Save'.") - editDiscussionsDetailsPage.editTitle(newTitle) - editDiscussionsDetailsPage.clickSave() + editDiscussionsDetailsPage.editDiscussionTitle(newTitle) + editDiscussionsDetailsPage.saveDiscussion() Log.d(STEP_TAG,"Refresh the page. Assert that the discussion's name has been changed to '$newTitle' and it is published.") discussionsDetailsPage.refresh() @@ -77,7 +77,7 @@ class DiscussionsE2ETest : TeacherTest() { Log.d(STEP_TAG,"Navigate to Discussions Details Page by clicking on 'Edit'. Unpublish the '$newTitle' discussion and click on 'Save'.") discussionsDetailsPage.openEdit() editDiscussionsDetailsPage.togglePublished() - editDiscussionsDetailsPage.clickSave() + editDiscussionsDetailsPage.saveDiscussion() Log.d(STEP_TAG,"Refresh the page. Assert that the '$newTitle' discussion has been unpublished.") discussionsDetailsPage.refresh() @@ -111,8 +111,8 @@ class DiscussionsE2ETest : TeacherTest() { val newDiscussionTitle = "Test Discussion Mobile UI" Log.d(STEP_TAG,"Set '$newDiscussionTitle' as the discussion's title and set some description as well.") - editDiscussionsDetailsPage.editTitle(newDiscussionTitle) - editDiscussionsDetailsPage.editDescription("Mobile UI Discussion description") + editDiscussionsDetailsPage.editDiscussionTitle(newDiscussionTitle) + editDiscussionsDetailsPage.editDiscussionDescription("Mobile UI Discussion description") Log.d(STEP_TAG,"Toggle Publish checkbox and save the page.") editDiscussionsDetailsPage.togglePublished() diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt index 88b00f66ec..932b13e31f 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AnnouncementsListPage.kt @@ -42,9 +42,9 @@ import com.instructure.teacher.R import com.instructure.teacher.ui.utils.TypeInRCETextEditor /** - * Announcements list page + * Announcements list page. * - * @constructor Create empty Announcements list page + * @constructor Create empty Announcements list page. */ class AnnouncementsListPage(val searchable: Searchable) : BasePage() { @@ -56,19 +56,19 @@ class AnnouncementsListPage(val searchable: Searchable) : BasePage() { /** * Click on the discussion given in parameter. * - * @param discussion: The DiscussionApiModel parameter. + * @param announcement: The DiscussionApiModel parameter. */ - fun clickDiscussion(discussion: DiscussionApiModel) { - clickDiscussion(discussion.title) + fun clickAnnouncement(announcement: DiscussionApiModel) { + clickAnnouncement(announcement.title) } /** * Click on the discussion with the given title in parameter. * - * @param discussionTitle: The discussion title parameter string. + * @param announcementTitle: The discussion title parameter string. */ - fun clickDiscussion(discussionTitle: String) { - waitForViewWithText(discussionTitle).click() + fun clickAnnouncement(announcementTitle: String) { + waitForViewWithText(announcementTitle).click() } /** diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementDetailsPage.kt similarity index 82% rename from apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementPage.kt rename to apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementDetailsPage.kt index 2bb5119eda..9415744a68 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditAnnouncementDetailsPage.kt @@ -20,37 +20,29 @@ import androidx.test.espresso.Espresso import com.instructure.espresso.click import com.instructure.espresso.page.BasePage import com.instructure.espresso.page.onView -import com.instructure.espresso.page.waitForView import com.instructure.espresso.page.withId import com.instructure.espresso.replaceText import com.instructure.espresso.scrollTo import com.instructure.teacher.R /** - * Represents the Edit Announcement page. + * Represents the Edit Announcement Page. */ -class EditAnnouncementPage : BasePage() { - - /** - * Opens the edit mode for the announcement. - */ - fun openEdit() { - waitForView(withId(R.id.menu_edit)).click() - } +class EditAnnouncementDetailsPage : BasePage() { /** * Edits the name of the announcement with the specified [newName]. * * @param newName The new name for the announcement. */ - fun editAnnouncementName(newName: String) { + fun editAnnouncementTitle(newName: String) { onView(withId(R.id.announcementNameEditText)).replaceText(newName) } /** * Saves the edited announcement. */ - fun saveEditAnnouncement() { + fun saveAnnouncement() { onView(withId(R.id.menuSaveAnnouncement)).click() } diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditDiscussionsDetailsPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditDiscussionsDetailsPage.kt index fa67b64638..e89ad6cc21 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditDiscussionsDetailsPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/EditDiscussionsDetailsPage.kt @@ -42,7 +42,7 @@ class EditDiscussionsDetailsPage : BasePage() { * * @param newTitle The new title of the discussion. */ - fun editTitle(newTitle: String) { + fun editDiscussionTitle(newTitle: String) { onView(withId(R.id.editDiscussionName)).replaceText(newTitle) Espresso.closeSoftKeyboard() } @@ -65,7 +65,7 @@ class EditDiscussionsDetailsPage : BasePage() { /** * Clicks the save button. This method is used when editing an existing discussion. */ - fun clickSave() { + fun saveDiscussion() { onView(withId(R.id.menuSave)).click() } @@ -81,7 +81,7 @@ class EditDiscussionsDetailsPage : BasePage() { * * @param newDescription The new description of the discussion. */ - fun editDescription(newDescription: String) { + fun editDiscussionDescription(newDescription: String) { contentRceView.perform(TypeInRCETextEditor(newDescription)) } } diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt index 7dafc5a3ab..a79f75ea44 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt @@ -46,7 +46,7 @@ import com.instructure.teacher.ui.pages.CourseSettingsPage import com.instructure.teacher.ui.pages.DashboardPage import com.instructure.teacher.ui.pages.DiscussionsDetailsPage import com.instructure.teacher.ui.pages.DiscussionsListPage -import com.instructure.teacher.ui.pages.EditAnnouncementPage +import com.instructure.teacher.ui.pages.EditAnnouncementDetailsPage import com.instructure.teacher.ui.pages.EditAssignmentDetailsPage import com.instructure.teacher.ui.pages.EditDashboardPage import com.instructure.teacher.ui.pages.EditDiscussionsDetailsPage @@ -147,7 +147,7 @@ abstract class TeacherTest : CanvasTest() { val editProfileSettingsPage = EditProfileSettingsPage() val discussionsDetailsPage = DiscussionsDetailsPage() val discussionsListPage = DiscussionsListPage(Searchable(R.id.search, R.id.search_src_text, R.id.search_close_btn)) - val editAnnouncementPage = EditAnnouncementPage() + val editAnnouncementDetailsPage = EditAnnouncementDetailsPage() val editAssignmentDetailsPage = EditAssignmentDetailsPage() val editDiscussionsDetailsPage = EditDiscussionsDetailsPage() val editPageDetailsPage = EditPageDetailsPage() From c007dcf3dd9fd2344e97c70aa767e1b788efe033 Mon Sep 17 00:00:00 2001 From: Kristof Deak <92309696+kdeakinstructure@users.noreply.github.com> Date: Thu, 31 Aug 2023 12:02:59 +0200 Subject: [PATCH 20/24] Fix the only breaking Student multi-api level test (#2132) --- .../student/ui/pages/LeftSideNavigationDrawerPage.kt | 2 +- .../kotlin/com/instructure/canvas/espresso/CanvasTest.kt | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/LeftSideNavigationDrawerPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/LeftSideNavigationDrawerPage.kt index d1a3d9a3ca..9842cbf0bc 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/LeftSideNavigationDrawerPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/LeftSideNavigationDrawerPage.kt @@ -137,7 +137,7 @@ class LeftSideNavigationDrawerPage: BasePage() { settings.assertDisplayed() - if(CanvasTest.isLandscapeDevice()) onView(withId(R.id.navigationDrawer)).swipeUp() + if(CanvasTest.isLandscapeDevice() || CanvasTest.isLowResDevice()) onView(withId(R.id.navigationDrawer)).swipeUp() changeUser.assertDisplayed() logoutButton.assertDisplayed() diff --git a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/CanvasTest.kt b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/CanvasTest.kt index ae7ed73795..185d7aa675 100644 --- a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/CanvasTest.kt +++ b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/CanvasTest.kt @@ -296,11 +296,6 @@ abstract class CanvasTest : InstructureTestingContract { } } - // Does the test device have particularly low screen resolution? - fun isLowResDevice() : Boolean { - return activityRule.activity.resources.displayMetrics.densityDpi < DisplayMetrics.DENSITY_HIGH - } - fun isTabletDevice(): Boolean { val metrics = activityRule.activity.resources.displayMetrics @@ -482,6 +477,10 @@ abstract class CanvasTest : InstructureTestingContract { return getDeviceOrientation(ApplicationProvider.getApplicationContext()) == Configuration.ORIENTATION_PORTRAIT } + // Does the test device have particularly low screen resolution? + fun isLowResDevice() : Boolean { + return ApplicationProvider.getApplicationContext().resources.displayMetrics.densityDpi < DisplayMetrics.DENSITY_HIGH + } } } From d4c8bffc623332b52e742c90fb8b80e2f4229cf3 Mon Sep 17 00:00:00 2001 From: Kristof Deak <92309696+kdeakinstructure@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:02:48 +0200 Subject: [PATCH 21/24] Implement search logics to Teacher AssignmentE2E test. (#2128) Refactor DoesNotExistAssertion to handle timeout in seconds. refs: MBL-16951 affects: Teacher release note: none --- .../student/ui/pages/PageListPage.kt | 4 ++-- .../teacher/ui/e2e/AssignmentE2ETest.kt | 14 +++++++++++++- .../teacher/ui/pages/AssignmentListPage.kt | 17 +++++++++++++++-- .../instructure/teacher/ui/utils/TeacherTest.kt | 2 +- .../espresso/CustomViewAssertions.kt | 10 +++++----- 5 files changed, 36 insertions(+), 11 deletions(-) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/PageListPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/PageListPage.kt index 71dea6a596..430678fc1f 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/PageListPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/PageListPage.kt @@ -102,10 +102,10 @@ class PageListPage(val searchable: Searchable) : BasePage(R.id.pageListPage) { fun assertPageNotDisplayed(page: PageApiModel) { // Check for front page - onView(allOf(withId(R.id.homeSubLabel), withText(page.title))).check(DoesNotExistAssertion(10000L)) + onView(allOf(withId(R.id.homeSubLabel), withText(page.title))).check(DoesNotExistAssertion(10)) // Check for regular page - onView(allOf(withId(R.id.title), withText(page.title))).check(DoesNotExistAssertion(10000L)) + onView(allOf(withId(R.id.title), withText(page.title))).check(DoesNotExistAssertion(10)) } fun assertPageListItemCount(expectedCount: Int) { diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AssignmentE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AssignmentE2ETest.kt index 82593033cd..95ff85feea 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AssignmentE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/AssignmentE2ETest.kt @@ -196,6 +196,19 @@ class AssignmentE2ETest : TeacherTest() { assignmentListPage.assertHasAssignment(assignment[0]) assignmentListPage.assertNeedsGradingCountOfAssignment(assignment[0].name, 1) + Log.d(STEP_TAG,"Click on Search button and type '${quizAssignment[0].name}' to the search input field.") + assignmentListPage.searchable.clickOnSearchButton() + assignmentListPage.searchable.typeToSearchBar(quizAssignment[0].name) + + Log.d(STEP_TAG, "Assert that the '${quizAssignment[0].name}' quiz assignment is the only one which is displayed because it matches the search text.") + assignmentListPage.assertHasAssignment(quizAssignment[0]) + assignmentListPage.assertAssignmentNotDisplayed(assignment[0]) + + Log.d(STEP_TAG,"Clear search input field value and assert if both of the assignment are displayed again on the Assignment List Page.") + assignmentListPage.searchable.clickOnClearSearchButton() + assignmentListPage.assertHasAssignment(assignment[0]) + assignmentListPage.assertHasAssignment(quizAssignment[0]) + val newAssignmentName = "New Assignment Name" Log.d(STEP_TAG,"Edit ${assignment[0].name} assignment's name to: $newAssignmentName.") assignmentListPage.clickAssignment(assignment[0]) @@ -336,7 +349,6 @@ class AssignmentE2ETest : TeacherTest() { Espresso.pressBack() speedGraderCommentsPage.clickOnVideoComment() speedGraderCommentsPage.assertMediaCommentPreviewDisplayed() - } @E2E diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AssignmentListPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AssignmentListPage.kt index 99943b489e..0bf5665ac8 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AssignmentListPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/AssignmentListPage.kt @@ -22,15 +22,19 @@ import androidx.test.espresso.matcher.ViewMatchers.withChild import androidx.test.espresso.matcher.ViewMatchers.withContentDescription import com.instructure.canvasapi2.models.Assignment import com.instructure.dataseeding.model.AssignmentApiModel +import com.instructure.espresso.DoesNotExistAssertion import com.instructure.espresso.OnViewWithId import com.instructure.espresso.RecyclerViewItemCountAssertion +import com.instructure.espresso.Searchable import com.instructure.espresso.WaitForViewWithId import com.instructure.espresso.assertDisplayed import com.instructure.espresso.click import com.instructure.espresso.page.BasePage import com.instructure.espresso.page.onView import com.instructure.espresso.page.plus +import com.instructure.espresso.page.waitForView import com.instructure.espresso.page.waitForViewWithText +import com.instructure.espresso.page.withAncestor import com.instructure.espresso.page.withId import com.instructure.espresso.page.withParent import com.instructure.espresso.page.withText @@ -45,7 +49,7 @@ import org.hamcrest.CoreMatchers.allOf * * @constructor Creates an instance of the AssignmentListPage. */ -class AssignmentListPage : BasePage() { +class AssignmentListPage(val searchable: Searchable) : BasePage() { private val assignmentListToolbar by OnViewWithId(R.id.assignmentListToolbar) private val assignmentRecyclerView by OnViewWithId(R.id.assignmentRecyclerView) @@ -97,6 +101,15 @@ class AssignmentListPage : BasePage() { assertAssignmentName(assignment.name) } + /** + * Asserts that the given assignment is NOT present in the list. + * + * @param assignment The assignment to check. + */ + fun assertAssignmentNotDisplayed(assignment: AssignmentApiModel) { + onView(withText(assignment.name)).check(DoesNotExistAssertion(10)) + } + /** * Asserts that grading periods are present. */ @@ -137,7 +150,7 @@ class AssignmentListPage : BasePage() { } private fun assertAssignmentName(assignmentName: String) { - waitForViewWithText(assignmentName).assertDisplayed() + waitForView(withText(assignmentName) + withAncestor(R.id.assignmentLayout)).assertDisplayed() } /** diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt index a79f75ea44..dd1f97d460 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/utils/TeacherTest.kt @@ -127,7 +127,7 @@ abstract class TeacherTest : CanvasTest() { val assigneeListPage = AssigneeListPage() val assignmentDetailsPage = AssignmentDetailsPage() val assignmentDueDatesPage = AssignmentDueDatesPage() - val assignmentListPage = AssignmentListPage() + val assignmentListPage = AssignmentListPage(Searchable(R.id.search, R.id.search_src_text, R.id.search_close_btn)) val assignmentSubmissionListPage = AssignmentSubmissionListPage() val postSettingsPage = PostSettingsPage() val calendarEventPage = CalendarEventPage() diff --git a/automation/espresso/src/main/kotlin/com/instructure/espresso/CustomViewAssertions.kt b/automation/espresso/src/main/kotlin/com/instructure/espresso/CustomViewAssertions.kt index a9c27b5bc9..92a6c1f62d 100644 --- a/automation/espresso/src/main/kotlin/com/instructure/espresso/CustomViewAssertions.kt +++ b/automation/espresso/src/main/kotlin/com/instructure/espresso/CustomViewAssertions.kt @@ -77,20 +77,20 @@ class NotificationBadgeAssertion(@IdRes private val menuItemId: Int, private val } } -class DoesNotExistAssertion(private val timeout: Long, private val pollInterval: Long = 500L) : ViewAssertion { +class DoesNotExistAssertion(private val timeoutInSeconds: Long, private val pollIntervalInSeconds: Long = 1L) : ViewAssertion { override fun check(view: View?, noViewFoundException: NoMatchingViewException?) { var elapsedTime = 0L - while (elapsedTime < timeout) { + while (elapsedTime < timeoutInSeconds * 1000) { try { doesNotExist() return } catch (e: AssertionFailedError) { - Thread.sleep(pollInterval) - elapsedTime += pollInterval + Thread.sleep(pollIntervalInSeconds * 1000) + elapsedTime += (pollIntervalInSeconds * 1000) } } - throw AssertionError("View still exists after $timeout milliseconds.") + throw AssertionError("View still exists after $timeoutInSeconds seconds.") } } \ No newline at end of file From 016b944a6121a0235b1ab34a67954555093260a1 Mon Sep 17 00:00:00 2001 From: Kristof Nemere <109959688+kristofnemere@users.noreply.github.com> Date: Fri, 1 Sep 2023 10:51:57 +0200 Subject: [PATCH 22/24] [MBL-17011][Student] Documents embedded in RCE content don't load refs: MBL-17011 affects: Student release note: none --- .../student/fragment/CourseModuleProgressionFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/student/src/main/java/com/instructure/student/fragment/CourseModuleProgressionFragment.kt b/apps/student/src/main/java/com/instructure/student/fragment/CourseModuleProgressionFragment.kt index ef94c02f2d..88225b69ce 100644 --- a/apps/student/src/main/java/com/instructure/student/fragment/CourseModuleProgressionFragment.kt +++ b/apps/student/src/main/java/com/instructure/student/fragment/CourseModuleProgressionFragment.kt @@ -723,7 +723,7 @@ class CourseModuleProgressionFragment : ParentFragment(), Bookmarkable { val moduleItemAsset = ModuleItemAsset.fromAssetType(assetType) if (moduleItemAsset != ModuleItemAsset.MODULE_ITEM) { val newRoute = route.copy(secondaryClass = moduleItemAsset.routeClass, removePreviousScreen = true) - RouteMatcher.route(requireContext(), newRoute) + RouteMatcher.route(requireActivity(), newRoute) return@tryWeave } } From 5deacbf8d4d0dcd52d2a7fe09aade60dd880f623 Mon Sep 17 00:00:00 2001 From: Tamas Kozmer Date: Mon, 4 Sep 2023 13:34:51 +0200 Subject: [PATCH 23/24] Updated version. --- apps/student/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/student/build.gradle b/apps/student/build.gradle index bc4c0c3bec..eb671160b8 100644 --- a/apps/student/build.gradle +++ b/apps/student/build.gradle @@ -50,8 +50,8 @@ android { applicationId "com.instructure.candroid" minSdkVersion Versions.MIN_SDK targetSdkVersion Versions.TARGET_SDK - versionCode = 254 - versionName = '6.26.0' + versionCode = 255 + versionName = '6.26.1' vectorDrawables.useSupportLibrary = true multiDexEnabled = true From 4079823f555e1ecfb4242907c50ae81f567548ae Mon Sep 17 00:00:00 2001 From: Tamas Kozmer <72397075+tamaskozmer@users.noreply.github.com> Date: Mon, 4 Sep 2023 14:58:26 +0200 Subject: [PATCH 24/24] Added different Flutter SDK url for Parent app. (#2138) --- apps/flutter_parent/flutter_parent_sdk_url | 1 + 1 file changed, 1 insertion(+) create mode 100644 apps/flutter_parent/flutter_parent_sdk_url diff --git a/apps/flutter_parent/flutter_parent_sdk_url b/apps/flutter_parent/flutter_parent_sdk_url new file mode 100644 index 0000000000..6fcfede9b9 --- /dev/null +++ b/apps/flutter_parent/flutter_parent_sdk_url @@ -0,0 +1 @@ +https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_2.5.3-stable.tar.xz \ No newline at end of file