From fee90d49de31643678cd1e2e038caf4b139027ec Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Tue, 5 Mar 2024 13:10:50 +0100 Subject: [PATCH] MOBILE-4470 behat: Fix Chat and Survey tests They have been disabled in new Moodle instances in MDL-80866 --- src/addons/mod/chat/tests/behat/basic_usage.feature | 1 + src/addons/mod/chat/tests/behat/navigation.feature | 1 + .../mod/survey/tests/behat/basic_usage.feature | 1 + .../features/course/tests/behat/basic_usage.feature | 4 +++- ...f-one-course-in-app-view-course-contents_48.png} | Bin ...f-one-course-in-app-view-course-contents_52.png} | Bin 6 files changed, 6 insertions(+), 1 deletion(-) rename src/core/features/course/tests/behat/snapshots/{test-basic-usage-of-one-course-in-app-view-course-contents_46.png => test-basic-usage-of-one-course-in-app-view-course-contents_48.png} (100%) rename src/core/features/course/tests/behat/snapshots/{test-basic-usage-of-one-course-in-app-view-course-contents_50.png => test-basic-usage-of-one-course-in-app-view-course-contents_52.png} (100%) diff --git a/src/addons/mod/chat/tests/behat/basic_usage.feature b/src/addons/mod/chat/tests/behat/basic_usage.feature index e2aa9a8a542..a9ead388073 100755 --- a/src/addons/mod/chat/tests/behat/basic_usage.feature +++ b/src/addons/mod/chat/tests/behat/basic_usage.feature @@ -15,6 +15,7 @@ Feature: Test basic usage of chat in app | user | course | role | | student1 | C1 | student | | student2 | C1 | student | + And I enable "chat" "mod" plugin And the following "activities" exist: | activity | name | intro | course | idnumber | groupmode | | chat | Test chat name | Test chat | C1 | chat | 0 | diff --git a/src/addons/mod/chat/tests/behat/navigation.feature b/src/addons/mod/chat/tests/behat/navigation.feature index 02af0d793ac..aa41a3637c4 100644 --- a/src/addons/mod/chat/tests/behat/navigation.feature +++ b/src/addons/mod/chat/tests/behat/navigation.feature @@ -13,6 +13,7 @@ Feature: Test chat navigation | user | course | role | | student1 | C1 | student | | student2 | C1 | student | + And I enable "chat" "mod" plugin And the following "activities" exist: | activity | name | intro | course | idnumber | groupmode | | chat | Test chat name | Test chat | C1 | chat | 0 | diff --git a/src/addons/mod/survey/tests/behat/basic_usage.feature b/src/addons/mod/survey/tests/behat/basic_usage.feature index fa7950a8858..a89f8a23939 100755 --- a/src/addons/mod/survey/tests/behat/basic_usage.feature +++ b/src/addons/mod/survey/tests/behat/basic_usage.feature @@ -16,6 +16,7 @@ Feature: Test basic usage of survey activity in app | user | course | role | | student1 | C1 | student | | teacher1 | C1 | editingteacher | + And I enable "survey" "mod" plugin And the following "activities" exist: | activity | name | intro | course | idnumber | groupmode | | survey | Test survey name | Test survey | C1 | survey | 0 | diff --git a/src/core/features/course/tests/behat/basic_usage.feature b/src/core/features/course/tests/behat/basic_usage.feature index 7c9b6dc4d97..690c5b869ad 100755 --- a/src/core/features/course/tests/behat/basic_usage.feature +++ b/src/core/features/course/tests/behat/basic_usage.feature @@ -17,6 +17,8 @@ Feature: Test basic usage of one course in app | user | course | role | | teacher1 | C1 | editingteacher | | student1 | C1 | student | + And I enable "chat" "mod" plugin + And I enable "survey" "mod" plugin And the following "activities" exist: | activity | name | intro | course | idnumber | option | section | | choice | Choice course 1 | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 | 1 | @@ -345,7 +347,7 @@ Feature: Test basic usage of one course in app Scenario: Navigation between sections using the bottom arrows When I entered the course "Course 1" as "student1" in the app Then the header should be "Course 1" in the app - And I should find "Test forum name" in the app + And I should find "Test forum name" in the app And I should find "Test wiki name" in the app And I should find "Choice course 1" in the app And I should find "assignment" in the app diff --git a/src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_46.png b/src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_48.png similarity index 100% rename from src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_46.png rename to src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_48.png diff --git a/src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_50.png b/src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_52.png similarity index 100% rename from src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_50.png rename to src/core/features/course/tests/behat/snapshots/test-basic-usage-of-one-course-in-app-view-course-contents_52.png