diff --git a/mod/h5pactivity/tests/behat/h5pactivity_completion.feature b/mod/h5pactivity/tests/behat/h5pactivity_completion.feature
index de03694e662..43b4c622beb 100644
--- a/mod/h5pactivity/tests/behat/h5pactivity_completion.feature
+++ b/mod/h5pactivity/tests/behat/h5pactivity_completion.feature
@@ -26,7 +26,8 @@ Feature: View activity completion information in the h5p activity
       | packagefilepath    | h5p/tests/fixtures/filltheblanks.h5p |
 
   Scenario: View automatic completion items
-    Given I am on the "Music history" "h5pactivity activity" page logged in as teacher1
+    Given I change window size to "large"
+    And I am on the "Music history" "h5pactivity activity" page logged in as teacher1
     # Teacher view.
     And "Music history" should have the "View" completion condition
     And "Music history" should have the "Receive a grade" completion condition
diff --git a/mod/h5pactivity/tests/behat/h5pactivity_completion_pass_grade.feature b/mod/h5pactivity/tests/behat/h5pactivity_completion_pass_grade.feature
index 112e9b940db..9c1ff08bfef 100644
--- a/mod/h5pactivity/tests/behat/h5pactivity_completion_pass_grade.feature
+++ b/mod/h5pactivity/tests/behat/h5pactivity_completion_pass_grade.feature
@@ -30,7 +30,8 @@ Feature: Pass grade activity completion information in the h5p activity
 
   Scenario: View automatic completion items
     # Teacher view.
-    Given I am on the "Music history" "h5pactivity activity" page logged in as teacher1
+    Given I change window size to "large"
+    And I am on the "Music history" "h5pactivity activity" page logged in as teacher1
     And "Music history" should have the "View" completion condition
     And "Music history" should have the "Receive a grade" completion condition
     And "Music history" should have the "Receive a passing grade" completion condition