MDL-47410 tool_licensemanager: Update tool_licensemanager behat tests

Updates the tool_licensemanager behat tests to utilize the ability to
conviniently populate the date selector fields.
This commit is contained in:
Mihail Geshoski 2021-02-11 12:01:09 +08:00
parent b7bef8f297
commit 76fe097b55
2 changed files with 20 additions and 30 deletions

View File

@ -10,12 +10,10 @@ Feature: Delete custom licenses
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
And I press "Save changes"
And I click on "Delete" "icon" in the "MIT" "table_row"
When I click on "Save changes" "button" in the "Delete licence" "dialogue"

View File

@ -9,12 +9,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | January |
| version[year] | 2020 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##first day of January 2020## |
When I press "Save changes"
Then I should see "Licence manager"
And I should see "MIT Licence" in the "MIT" "table_row"
@ -25,12 +23,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | January |
| version[year] | 2020 |
| shortname | MIT |
| fullname | MIT Licence |
| source | opensource.org/licenses/MIT |
| Licence version | ##2020-01-01## |
When I press "Save changes"
Then I should see "Invalid source URL"
And I set the following fields to these values:
@ -49,12 +45,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 March 2019## |
When I press "Save changes"
Then I should see "Licence manager"
And I should see "2019030100" in the "MIT" "table_row"
@ -65,12 +59,10 @@ Feature: Custom licences
And I navigate to "Licence > Licence manager" in site administration
And I click on "Create licence" "link"
And I set the following fields to these values:
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| version[day] | 1 |
| version[month] | March |
| version[year] | 2019 |
| shortname | MIT |
| fullname | MIT Licence |
| source | https://opensource.org/licenses/MIT |
| Licence version | ##1 Mar 2019## |
And I press "Save changes"
And I should see "Licence manager"
And I should see "MIT Licence" in the "MIT" "table_row"