Skip to content

Commit

Permalink
MDL-79844 mod_lti: fix those behat tests remaining in the mod
Browse files Browse the repository at this point in the history
These cover the module's use of the site or course tools and deal with
mod-specific concerns like the visibility in the activity chooser. This
change just makes sure these use the core generators so they stil pass.
  • Loading branch information
snake committed May 9, 2024
1 parent bedf59e commit c411579
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mod/lti/tests/behat/addtool.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Feature: Add tools
| user | course | role |
| teacher1 | C1 | editingteacher |
# A site tool configured to show as a preconfigured tool and in the activity chooser.
And the following "mod_lti > tool types" exist:
And the following "core_ltix > tool types" exist:
| name | baseurl | coursevisible | state |
| Teaching Tool 1 | /ltix/tests/fixtures/tool_provider.php | 2 | 1 |
# A course tool in course 1.
And the following "mod_lti > course tools" exist:
And the following "core_ltix > course tools" exist:
| name | baseurl | course |
| Course tool 1 | /ltix/tests/fixtures/tool_provider.php | C1 |

Expand Down Expand Up @@ -64,7 +64,7 @@ Feature: Add tools
# Add a course tool with the same URL as that of the manually configured instance (the tool URL found in the above cartridge).
# This would normally be domain-matched during edit, resulting in the assignment of a preconfigured tool to the instance.
# In this case, because config changes and domain matching are disabled, the test confirms this doesn't take place.
And the following "mod_lti > course tools" exist:
And the following "core_ltix > course tools" exist:
| name | baseurl | course | lti_sendname | lti_sendemailaddr | lti_acceptgrades |
| Course tool 2 | http://www.example.com/lti/provider.php | C1 | 0 | 1 | 2 |
When I am on the "A manual tool" "lti activity editing" page logged in as teacher1
Expand Down
6 changes: 3 additions & 3 deletions mod/lti/tests/behat/backup_restore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Restoring Moodle 2 backup restores LTI configuration
| enableasyncbackup | 0 |

Scenario: Backup and restore course with preconfigured site LTI tool on the same site
Given the following "mod_lti > tool types" exist:
Given the following "core_ltix > tool types" exist:
| name | description | baseurl | coursevisible | state |
| My site tool | Site tool description | https://www.moodle.org | 2 | 1 |
And the following "mod_lti > tool instances" exist:
Expand All @@ -31,12 +31,12 @@ Feature: Restoring Moodle 2 backup restores LTI configuration
And I am on site homepage
And I follow "Course 1 copy 1"
Then I should see "My LTI module"
And I navigate to "Plugins > Activity modules > External tool > Manage tools" in site administration
And I navigate to "General > LTI > Manage tools" in site administration
And "This tool is being used 2 times" "text" should exist in the "//div[contains(@id,'tool-card-container') and contains(., 'My site tool')]" "xpath_element"

@javascript
Scenario: Backup and restore course with preconfigured course LTI tool on the same site
Given the following "mod_lti > course tools" exist:
Given the following "core_ltix > course tools" exist:
| name | description | baseurl | course | lti_resourcekey | lti_password | lti_launchcontainer |
| My course tool | Example description | http://www.example.com/lti/provider.php | C1 | my key | my secret | 5 |
# In the first course create an LTI module that uses a course preconfigured tool
Expand Down
2 changes: 1 addition & 1 deletion mod/lti/tests/behat/contentitem.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Content-Item support
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "mod_lti > tool types" exist:
And the following "core_ltix > tool types" exist:
| name | description | baseurl | coursevisible | state | lti_contentitem |
| Teaching Tool 1 | Tool 1 description | /ltix/tests/fixtures/tool_provider.php | 2 | 1 | 1 |

Expand Down

0 comments on commit c411579

Please sign in to comment.