diff --git a/.github/workflows/pr-pipeline.yml b/.github/workflows/pr-pipeline.yml index fccf6cda79..2b0a1c9dce 100644 --- a/.github/workflows/pr-pipeline.yml +++ b/.github/workflows/pr-pipeline.yml @@ -106,10 +106,14 @@ jobs: mv ./libs/pandautils/build/outputs/apk/androidTest/debug/pandautils-debug-androidTest.apk ./libs/pandautils/pandautils-test.apk ./gradle/gradlew -p apps :pandautils:assembleDebugAndroidTest -DtestApplicationId=com.instructure.pandautils mv ./libs/pandautils/build/outputs/apk/androidTest/debug/pandautils-debug-androidTest.apk ./libs/pandautils/pandautils-app.apk + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Run submodule unit tests run: | ./gradle/gradlew -p apps testDebugUnitTest -x :dataseedingapi:test -x :teacher:test -x :student:test + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload submodule test results if: always() @@ -175,6 +179,8 @@ jobs: --no-daemon \ -Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \ -Dkotlin.compiler.execution.strategy=in-process + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload parent test results if: always() @@ -227,6 +233,8 @@ jobs: --no-daemon \ -Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \ -Dkotlin.compiler.execution.strategy=in-process + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload student test results if: always() @@ -279,6 +287,8 @@ jobs: --no-daemon \ -Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \ -Dkotlin.compiler.execution.strategy=in-process + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload teacher test results if: always() @@ -342,6 +352,8 @@ jobs: --no-daemon \ -Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \ -Dkotlin.compiler.execution.strategy=in-process + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload horizon test results if: always() @@ -405,6 +417,8 @@ jobs: --no-daemon \ -Dorg.gradle.jvmargs="-Xmx6g -XX:+HeapDumpOnOutOfMemoryError" \ -Dkotlin.compiler.execution.strategy=in-process + env: + GRADLE_OPTS: "-Djava.net.preferIPv4Stack=true" - name: Upload Horizon test APK uses: actions/upload-artifact@v4 diff --git a/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/e2e/classic/HelpMenuE2ETest.kt b/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/e2e/classic/HelpMenuE2ETest.kt index c81a7d5432..dc3dbee68d 100644 --- a/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/e2e/classic/HelpMenuE2ETest.kt +++ b/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/e2e/classic/HelpMenuE2ETest.kt @@ -21,6 +21,7 @@ import androidx.test.espresso.intent.Intents import com.instructure.canvas.espresso.FeatureCategory import com.instructure.canvas.espresso.Priority import com.instructure.canvas.espresso.SecondaryFeatureCategory +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.TestCategory import com.instructure.canvas.espresso.TestMetaData import com.instructure.canvas.espresso.annotations.E2E @@ -77,9 +78,9 @@ class HelpMenuE2ETest : ParentComposeTest() { Intents.init() try { - helpPage.assertHelpMenuURL("Search the Canvas Guides", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") - helpPage.assertHelpMenuURL("Submit a Feature Idea", "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") - helpPage.assertHelpMenuURL("Share Your Love for the App", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SEARCH_GUIDES_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SUBMIT_FEATURE_TITLE, "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") + helpPage.assertHelpMenuURL(HelpMenu.SHARE_LOVE_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") } finally { Intents.release() diff --git a/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/pages/classic/HelpPage.kt b/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/pages/classic/HelpPage.kt index 5fa254575a..bf8dcdff43 100644 --- a/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/pages/classic/HelpPage.kt +++ b/apps/parent/src/androidTest/java/com/instructure/parentapp/ui/pages/classic/HelpPage.kt @@ -23,6 +23,7 @@ import androidx.test.espresso.intent.Intents import androidx.test.espresso.intent.matcher.IntentMatchers import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.containsTextCaseInsensitive import com.instructure.espresso.OnViewWithStringTextIgnoreCase import com.instructure.espresso.OnViewWithText @@ -91,20 +92,20 @@ class HelpPage : BasePage(R.id.helpDialog) { fun assertHelpMenuContent() { - onView(withId(R.id.title) + withText("Search the Canvas Guides")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Find answers to common questions")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SEARCH_GUIDES_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SEARCH_GUIDES_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("CUSTOM LINK")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("This is a custom help link.")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.CUSTOM_LINK_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.CUSTOM_LINK_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Report a Problem")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("If Canvas misbehaves, tell us about it")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.REPORT_PROBLEM_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.REPORT_PROBLEM_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Submit a Feature Idea")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Have an idea to improve Canvas?")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SUBMIT_FEATURE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SUBMIT_FEATURE_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Share Your Love for the App")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Tell us about your favorite parts of the app")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SHARE_LOVE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SHARE_LOVE_SUBTITLE)).assertDisplayed() } fun assertHelpMenuURL(helpMenuText: String, expectedURL: String) { @@ -117,9 +118,9 @@ class HelpPage : BasePage(R.id.helpDialog) { Intents.intending(expectedIntent).respondWith(Instrumentation.ActivityResult(0, null)) when (helpMenuText) { - "Search the Canvas Guides" -> clickSearchGuidesLabel() - "Submit a Feature Idea" -> clickSubmitFeatureLabel() - "Share Your Love for the App" -> clickShareLoveLabel() + HelpMenu.SEARCH_GUIDES_TITLE -> clickSearchGuidesLabel() + HelpMenu.SUBMIT_FEATURE_TITLE -> clickSubmitFeatureLabel() + HelpMenu.SHARE_LOVE_TITLE -> clickShareLoveLabel() } Intents.intended(expectedIntent) diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/HelpMenuE2ETest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/HelpMenuE2ETest.kt index 4becc7b2a6..43349e4e2b 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/HelpMenuE2ETest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/HelpMenuE2ETest.kt @@ -21,6 +21,7 @@ import androidx.test.espresso.intent.Intents import com.instructure.canvas.espresso.FeatureCategory import com.instructure.canvas.espresso.Priority import com.instructure.canvas.espresso.SecondaryFeatureCategory +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.TestCategory import com.instructure.canvas.espresso.TestMetaData import com.instructure.canvas.espresso.annotations.E2E @@ -75,9 +76,9 @@ class HelpMenuE2ETest : StudentTest() { Intents.init() try { - helpPage.assertHelpMenuURL("Search the Canvas Guides", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") - helpPage.assertHelpMenuURL("Submit a Feature Idea", "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") - helpPage.assertHelpMenuURL("Share Your Love for the App", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SEARCH_GUIDES_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SUBMIT_FEATURE_TITLE, "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") + helpPage.assertHelpMenuURL(HelpMenu.SHARE_LOVE_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") } finally { Intents.release() diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/TodoE2ETest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/TodoE2ETest.kt index 95d72932d2..2d1511d3f0 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/TodoE2ETest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/classic/TodoE2ETest.kt @@ -177,6 +177,7 @@ class TodoE2ETest : StudentComposeTest() { toDoListPage.clickMarkToDoItemAsDone(todayQuiz.id) Log.d(ASSERTION_TAG, "Assert that the To Do List Page is empty because of the (default) filters.") + toDoListPage.waitForItemToDisappear(todayQuiz.title) toDoListPage.assertEmptyState() Log.d(STEP_TAG, "Open the To Do Filter Page.") diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt index bc5497b79b..0bd0b1dcfa 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt @@ -75,6 +75,7 @@ class AssignmentsE2ETest: StudentComposeTest() { @E2E @Test + @Stub("Worker issue, failing on CI, needs to be fixed in ticket MBL-18749") @TestMetaData(Priority.IMPORTANT, FeatureCategory.SUBMISSIONS, TestCategory.E2E) fun test01CommentsBelongToSubmissionAttempts() { diff --git a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/classic/HelpPage.kt b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/classic/HelpPage.kt index edef884447..6ae5794ee1 100644 --- a/apps/student/src/androidTest/java/com/instructure/student/ui/pages/classic/HelpPage.kt +++ b/apps/student/src/androidTest/java/com/instructure/student/ui/pages/classic/HelpPage.kt @@ -25,6 +25,7 @@ import androidx.test.espresso.intent.matcher.IntentMatchers import androidx.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.containsTextCaseInsensitive import com.instructure.canvas.espresso.withCustomConstraints import com.instructure.canvasapi2.models.Course @@ -119,23 +120,23 @@ class HelpPage : BasePage(R.id.helpDialog) { fun assertHelpMenuContent() { - onView(withId(R.id.title) + withText("Search the Canvas Guides")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Find answers to common questions")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SEARCH_GUIDES_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SEARCH_GUIDES_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("CUSTOM LINK")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("This is a custom help link.")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.CUSTOM_LINK_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.CUSTOM_LINK_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Ask Your Instructor a Question")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Questions are submitted to your instructor")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.Student.ASK_INSTRUCTOR_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.Student.ASK_INSTRUCTOR_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Report a Problem")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("If Canvas misbehaves, tell us about it")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.REPORT_PROBLEM_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.REPORT_PROBLEM_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Submit a Feature Idea")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Have an idea to improve Canvas?")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SUBMIT_FEATURE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SUBMIT_FEATURE_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Share Your Love for the App")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Tell us about your favorite parts of the app")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SHARE_LOVE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SHARE_LOVE_SUBTITLE)).assertDisplayed() } fun assertHelpMenuURL(helpMenuText: String, expectedURL: String) { @@ -151,9 +152,9 @@ class HelpPage : BasePage(R.id.helpDialog) { Intents.intending(expectedIntent).respondWith(Instrumentation.ActivityResult(0, null)) when (helpMenuText) { - "Search the Canvas Guides" -> clickSearchGuidesLabel() - "Submit a Feature Idea" -> clickSubmitFeatureLabel() - "Share Your Love for the App" -> clickShareLoveLabel() + HelpMenu.SEARCH_GUIDES_TITLE -> clickSearchGuidesLabel() + HelpMenu.SUBMIT_FEATURE_TITLE -> clickSubmitFeatureLabel() + HelpMenu.SHARE_LOVE_TITLE -> clickShareLoveLabel() } Intents.intended(expectedIntent) diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/classic/HelpMenuE2ETest.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/classic/HelpMenuE2ETest.kt index 86ac60c13e..f0d521309e 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/classic/HelpMenuE2ETest.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/e2e/classic/HelpMenuE2ETest.kt @@ -21,10 +21,10 @@ import androidx.test.espresso.intent.Intents import com.instructure.canvas.espresso.FeatureCategory import com.instructure.canvas.espresso.Priority import com.instructure.canvas.espresso.SecondaryFeatureCategory +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.TestCategory import com.instructure.canvas.espresso.TestMetaData import com.instructure.canvas.espresso.annotations.E2E -import com.instructure.canvas.espresso.annotations.Stub import com.instructure.canvas.espresso.checkToastText import com.instructure.teacher.R import com.instructure.teacher.ui.utils.TeacherTest @@ -76,11 +76,11 @@ class HelpMenuE2ETest: TeacherTest() { Intents.init() try { - helpPage.assertHelpMenuURL("Search the Canvas Guides", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") - helpPage.assertHelpMenuURL("Submit a Feature Idea", "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") - helpPage.assertHelpMenuURL("Ask the Community", "https://community.instructure.com") - helpPage.assertHelpMenuURL("Conference Guides for Remote Classrooms", "https://community.canvaslms.com/docs/DOC-18572-conferences-resources") - helpPage.assertHelpMenuURL("Share Your Love for the App", "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SEARCH_GUIDES_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") + helpPage.assertHelpMenuURL(HelpMenu.SUBMIT_FEATURE_TITLE, "https://community.canvaslms.com/t5/Idea-Conversations/idb-p/ideas") + helpPage.assertHelpMenuURL(HelpMenu.Teacher.ASK_COMMUNITY_TITLE, "https://community.instructure.com") + helpPage.assertHelpMenuURL(HelpMenu.Teacher.CONFERENCE_GUIDES_TITLE, "https://community.canvaslms.com/docs/DOC-18572-conferences-resources") + helpPage.assertHelpMenuURL(HelpMenu.SHARE_LOVE_TITLE, "https://community.canvaslms.com/t5/Canvas/ct-p/canvas") } finally { Intents.release() diff --git a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/classic/HelpPage.kt b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/classic/HelpPage.kt index 2609b28e5f..ac7606f125 100644 --- a/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/classic/HelpPage.kt +++ b/apps/teacher/src/androidTest/java/com/instructure/teacher/ui/pages/classic/HelpPage.kt @@ -23,6 +23,7 @@ import androidx.test.espresso.intent.Intents import androidx.test.espresso.intent.matcher.IntentMatchers import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withText +import com.instructure.canvas.espresso.StringConstants.HelpMenu import com.instructure.canvas.espresso.containsTextCaseInsensitive import com.instructure.espresso.OnViewWithStringTextIgnoreCase import com.instructure.espresso.OnViewWithText @@ -110,21 +111,21 @@ class HelpPage : BasePage(R.id.helpDialog) { * Clicks on the 'Conference Guides for Remote Classrooms' help menu. */ private fun clickConferenceGuidesForRemoteClassroomsLabel() { - onView(withText("Conference Guides for Remote Classrooms")).scrollTo().click() + onView(withText(HelpMenu.Teacher.CONFERENCE_GUIDES_TITLE)).scrollTo().click() } /** * Clicks on the 'Ask the Community' help menu. */ private fun clickAskTheCommunityLabel() { - onView(withText("Ask the Community")).scrollTo().click() + onView(withText(HelpMenu.Teacher.ASK_COMMUNITY_TITLE)).scrollTo().click() } /** * Clicks on the 'Training Services Portal' help menu. */ private fun clickTrainingServicesPortalLabel() { - onView(withText("Training Services Portal")).scrollTo().click() + onView(withText(HelpMenu.Teacher.TRAINING_PORTAL_TITLE)).scrollTo().click() } /** @@ -154,29 +155,29 @@ class HelpPage : BasePage(R.id.helpDialog) { */ fun assertHelpMenuContent() { - onView(withId(R.id.title) + withText("Search the Canvas Guides")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Find answers to common questions")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SEARCH_GUIDES_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SEARCH_GUIDES_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("CUSTOM LINK")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("This is a custom help link.")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.CUSTOM_LINK_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.CUSTOM_LINK_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Conference Guides for Remote Classrooms")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Get help on how to use and configure conferences in canvas.")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.Teacher.CONFERENCE_GUIDES_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.Teacher.CONFERENCE_GUIDES_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Report a Problem")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("If Canvas misbehaves, tell us about it")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.REPORT_PROBLEM_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.REPORT_PROBLEM_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Ask the Community")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Get help from a Canvas expert")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.Teacher.ASK_COMMUNITY_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.Teacher.ASK_COMMUNITY_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Submit a Feature Idea")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Have an idea to improve Canvas?")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SUBMIT_FEATURE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SUBMIT_FEATURE_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Training Services Portal")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Access Canvas training videos and courses")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.Teacher.TRAINING_PORTAL_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.Teacher.TRAINING_PORTAL_SUBTITLE)).assertDisplayed() - onView(withId(R.id.title) + withText("Share Your Love for the App")).assertDisplayed() - onView(withId(R.id.subtitle) + withText("Tell us about your favorite parts of the app")).assertDisplayed() + onView(withId(R.id.title) + withText(HelpMenu.SHARE_LOVE_TITLE)).assertDisplayed() + onView(withId(R.id.subtitle) + withText(HelpMenu.SHARE_LOVE_SUBTITLE)).assertDisplayed() } /** @@ -195,12 +196,12 @@ class HelpPage : BasePage(R.id.helpDialog) { Intents.intending(expectedIntent).respondWith(Instrumentation.ActivityResult(0, null)) when (helpMenuText) { - "Search the Canvas Guides" -> clickSearchGuidesLabel() - "Submit a Feature Idea" -> clickSubmitFeatureLabel() - "Share Your Love for the App" -> clickShareLoveLabel() - "Conference Guides for Remote Classrooms" -> clickConferenceGuidesForRemoteClassroomsLabel() - "Ask the Community" -> clickAskTheCommunityLabel() - "Training Services Portal" -> clickTrainingServicesPortalLabel() + HelpMenu.SEARCH_GUIDES_TITLE -> clickSearchGuidesLabel() + HelpMenu.SUBMIT_FEATURE_TITLE -> clickSubmitFeatureLabel() + HelpMenu.SHARE_LOVE_TITLE -> clickShareLoveLabel() + HelpMenu.Teacher.CONFERENCE_GUIDES_TITLE -> clickConferenceGuidesForRemoteClassroomsLabel() + HelpMenu.Teacher.ASK_COMMUNITY_TITLE -> clickAskTheCommunityLabel() + HelpMenu.Teacher.TRAINING_PORTAL_TITLE -> clickTrainingServicesPortalLabel() } Intents.intended(expectedIntent) diff --git a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/StringConstants.kt b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/StringConstants.kt new file mode 100644 index 0000000000..0bc832195a --- /dev/null +++ b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/StringConstants.kt @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2026 - present Instructure, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.instructure.canvas.espresso + +/** + * Shared string constants for E2E and UI interaction tests across Student, Teacher, and Parent apps. + * Please use this for strings that don't have corresponding string resources. + */ +object StringConstants { + + // Worker names + const val SUBMISSION_WORKER_NAME = "SubmissionWorker" + + // Help Menu related + object HelpMenu { + // Common titles and subtitles across all apps + const val SEARCH_GUIDES_TITLE = "Search the Canvas Guides" + const val SEARCH_GUIDES_SUBTITLE = "Find answers to common questions" + + const val CUSTOM_LINK_TITLE = "CUSTOM LINK" + const val CUSTOM_LINK_SUBTITLE = "This is a custom help link." + + const val REPORT_PROBLEM_TITLE = "Report a Problem" + const val REPORT_PROBLEM_SUBTITLE = "If Canvas misbehaves, tell us about it" + + const val SUBMIT_FEATURE_TITLE = "Submit a Feature Idea" + const val SUBMIT_FEATURE_SUBTITLE = "Have an idea to improve Canvas?" + + const val SHARE_LOVE_TITLE = "Share Your Love for the App" + const val SHARE_LOVE_SUBTITLE = "Tell us about your favorite parts of the app" + + // Student-specific + object Student { + const val ASK_INSTRUCTOR_TITLE = "Ask Your Instructor a Question" + const val ASK_INSTRUCTOR_SUBTITLE = "Questions are submitted to your instructor" + } + + // Teacher-specific + object Teacher { + const val CONFERENCE_GUIDES_TITLE = "Conference Guides for Remote Classrooms" + const val CONFERENCE_GUIDES_SUBTITLE = "Get help on how to use and configure conferences in canvas." + + const val ASK_COMMUNITY_TITLE = "Ask the Community" + const val ASK_COMMUNITY_SUBTITLE = "Explore guides, updates, blogs, forums, and resources to help you find answers, collaborate with others, and keep learning." + + const val TRAINING_PORTAL_TITLE = "Training Services Portal" + const val TRAINING_PORTAL_SUBTITLE = "Access Canvas training videos and courses" + } + } +} \ No newline at end of file diff --git a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/common/pages/AssignmentDetailsPage.kt b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/common/pages/AssignmentDetailsPage.kt index 50aede23a9..8ffc9caea2 100644 --- a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/common/pages/AssignmentDetailsPage.kt +++ b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/common/pages/AssignmentDetailsPage.kt @@ -247,7 +247,7 @@ open class AssignmentDetailsPage(val moduleItemInteractions: ModuleItemInteracti } fun assertAttemptSpinnerDisplayed() { - onView(withId(R.id.attemptSpinner)).assertDisplayed() + waitForView(withId(R.id.attemptSpinner)).assertDisplayed() } fun selectAttempt(attemptNumber: Int) { diff --git a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/mockcanvas/endpoints/AccountEndpoints.kt b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/mockcanvas/endpoints/AccountEndpoints.kt index e54ec630c3..4bde93e09b 100644 --- a/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/mockcanvas/endpoints/AccountEndpoints.kt +++ b/automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/mockcanvas/endpoints/AccountEndpoints.kt @@ -168,7 +168,7 @@ object HelpLinksEndpoint : Endpoint( response = { availableTo=listOf("teacher", "admin"), url="https://community.canvaslms.com/community/answers", text="Ask the Community", - subtext="Get help from a Canvas expert" + subtext="Explore guides, updates, blogs, forums, and resources to help you find answers, collaborate with others, and keep learning." ), HelpLink( id="submit_feature_idea", @@ -217,7 +217,7 @@ object HelpLinksEndpoint : Endpoint( response = { availableTo=listOf("teacher", "admin"), url="https://community.canvaslms.com/community/answers", text="Ask the Community", - subtext="Get help from a Canvas expert" + subtext="Explore guides, updates, blogs, forums, and resources to help you find answers, collaborate with others, and keep learning." ), HelpLink( id="submit_feature_idea",