diff --git a/src/addons/mod/forum/tests/behat/basic_usage.feature b/src/addons/mod/forum/tests/behat/basic_usage.feature index 7f7035095..d1fe3a64d 100755 --- a/src/addons/mod/forum/tests/behat/basic_usage.feature +++ b/src/addons/mod/forum/tests/behat/basic_usage.feature @@ -52,9 +52,17 @@ Feature: Test basic usage of forum activity in app Scenario: Reply a post Given I entered the forum activity "Test forum name" on course "Course 1" as "student1" in the app + When I replace "/.*/" within ".addon-mod-forum-discussion-author p" with "[Publication date]" + And I replace "/\d+ seconds ago/" within ".addon-mod-forum-discussion-more-info ion-note" with "[seconds] seconds ago" + Then the UI should match the snapshot + When I press "Initial discussion" in the app And I press "Reply" in the app - And I set the field "Message" to "ReplyMessage" in the app + And I scroll to "Post to forum" in the app + And I replace "/.*/" within ".addon-mod-forum-post-author p:last-child" with "[Publication date]" + Then the UI should match the snapshot + + When I set the field "Message" to "ReplyMessage" in the app And I press "Post to forum" in the app Then I should find "Initial discussion message" in the app And I should find "ReplyMessage" in the app diff --git a/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_14.png b/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_14.png new file mode 100644 index 000000000..b25411147 Binary files /dev/null and b/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_14.png differ diff --git a/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_9.png b/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_9.png new file mode 100644 index 000000000..03499bae9 Binary files /dev/null and b/src/addons/mod/forum/tests/behat/snapshots/test-basic-usage-of-forum-activity-in-app-reply-a-post_9.png differ