From d0f3c1130ebfa43cf3ed304ccdf146a1eeaf449d Mon Sep 17 00:00:00 2001 From: Alexander Bias Date: Thu, 22 Aug 2024 07:09:49 +0200 Subject: [PATCH] Upgrade: Replace deprecated Behat steps and fix a Behat scenario which broke on 4.4. --- CHANGES.md | 1 + tests/behat/local_sandbox.feature | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5ab8f71..7e0650e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ Changes ### Unreleased +* 2024-08-22 - Upgrade: Replace deprecated Behat steps and fix a Behat scenario which broke on 4.4. * 2024-08-20 - Prepare compatibility for Moodle 4.4. ### v4.3-r2 diff --git a/tests/behat/local_sandbox.feature b/tests/behat/local_sandbox.feature index 871b6b0..e966f5c 100644 --- a/tests/behat/local_sandbox.feature +++ b/tests/behat/local_sandbox.feature @@ -11,8 +11,8 @@ Feature: Configuring the sandbox plugin And I log in as "admin" And I am on "Sandbox Test Course" course homepage And I navigate to "Course reuse" in current page administration - And I select "Restore" from the "jump" singleselect - And I upload "local/sandbox/tests/fixtures/sandbox-test.mbz" file to "Files" filemanager + And I click on "Restore" "link" + And I upload "local/sandbox/tests/fixtures/sandbox-test.mbz" file to "Backup file" filemanager And I click on "Restore" "button" And I click on "Continue" "button" And I click on "Continue" "button" in the ".bcs-current-course.backup-section" "css_element" @@ -20,16 +20,17 @@ Feature: Configuring the sandbox plugin And I select "Yes" from the "Overwrite course configuration" singleselect And I click on "Next" "button" And I click on "Perform restore" "button" - And I click on "Continue" "button" + And I run all adhoc tasks And I navigate to "Courses > Sandbox" in site administration And I upload "local/sandbox/tests/fixtures/sandbox-test.mbz" file to "Course backups" filemanager And I click on "Save changes" "button" And I log out + @testme Scenario: Check basic restore functionality. When I log in as "admin" And I am on "Sandbox Test Course" course homepage with editing mode on - And I add a "Assignment" to section "1" and I fill the form with: + And I add a assign activity to course "Sandbox Test Course" section "1" and I fill the form with: | Assignment name | This is an assignment | And I add the "Calendar" block Then I should see "This is an assignment"