Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class AssignmentsE2ETest: StudentComposeTest() {

@E2E
@Test
@Stub("Worker issue, failing on CI, needs to be fixed in ticket MBL-18749")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of @Stub annotation for this test appears unrelated to the help menu string constants refactoring. This should be in a separate commit or PR focused on test stability issues.

If this test was already failing and you're just documenting it, that's fine, but it should be clearly mentioned in the PR description as a separate change.

@TestMetaData(Priority.IMPORTANT, FeatureCategory.SUBMISSIONS, TestCategory.E2E)
fun test01CommentsBelongToSubmissionAttempts() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
Loading
Loading