Skip to content

Commit c68967a

Browse files
author
Mihail Geshoski
committed
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.
1 parent 7a868e5 commit c68967a

File tree

2 files changed

+20
-30
lines changed

2 files changed

+20
-30
lines changed

admin/tool/licensemanager/tests/behat/delete_license.feature

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ Feature: Delete custom licenses
1010
And I navigate to "Licence > Licence manager" in site administration
1111
And I click on "Create licence" "link"
1212
And I set the following fields to these values:
13-
| shortname | MIT |
14-
| fullname | MIT Licence |
15-
| source | https://opensource.org/licenses/MIT |
16-
| version[day] | 1 |
17-
| version[month] | March |
18-
| version[year] | 2019 |
13+
| shortname | MIT |
14+
| fullname | MIT Licence |
15+
| source | https://opensource.org/licenses/MIT |
16+
| Licence version | ##1 March 2019## |
1917
And I press "Save changes"
2018
And I click on "Delete" "icon" in the "MIT" "table_row"
2119
When I click on "Save changes" "button" in the "Delete licence" "dialogue"

admin/tool/licensemanager/tests/behat/edit_license.feature

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ Feature: Custom licences
99
And I navigate to "Licence > Licence manager" in site administration
1010
And I click on "Create licence" "link"
1111
And I set the following fields to these values:
12-
| shortname | MIT |
13-
| fullname | MIT Licence |
14-
| source | https://opensource.org/licenses/MIT |
15-
| version[day] | 1 |
16-
| version[month] | January |
17-
| version[year] | 2020 |
12+
| shortname | MIT |
13+
| fullname | MIT Licence |
14+
| source | https://opensource.org/licenses/MIT |
15+
| Licence version | ##first day of January 2020## |
1816
When I press "Save changes"
1917
Then I should see "Licence manager"
2018
And I should see "MIT Licence" in the "MIT" "table_row"
@@ -25,12 +23,10 @@ Feature: Custom licences
2523
And I navigate to "Licence > Licence manager" in site administration
2624
And I click on "Create licence" "link"
2725
And I set the following fields to these values:
28-
| shortname | MIT |
29-
| fullname | MIT Licence |
30-
| source | opensource.org/licenses/MIT |
31-
| version[day] | 1 |
32-
| version[month] | January |
33-
| version[year] | 2020 |
26+
| shortname | MIT |
27+
| fullname | MIT Licence |
28+
| source | opensource.org/licenses/MIT |
29+
| Licence version | ##2020-01-01## |
3430
When I press "Save changes"
3531
Then I should see "Invalid source URL"
3632
And I set the following fields to these values:
@@ -49,12 +45,10 @@ Feature: Custom licences
4945
And I navigate to "Licence > Licence manager" in site administration
5046
And I click on "Create licence" "link"
5147
And I set the following fields to these values:
52-
| shortname | MIT |
53-
| fullname | MIT Licence |
54-
| source | https://opensource.org/licenses/MIT |
55-
| version[day] | 1 |
56-
| version[month] | March |
57-
| version[year] | 2019 |
48+
| shortname | MIT |
49+
| fullname | MIT Licence |
50+
| source | https://opensource.org/licenses/MIT |
51+
| Licence version | ##1 March 2019## |
5852
When I press "Save changes"
5953
Then I should see "Licence manager"
6054
And I should see "2019030100" in the "MIT" "table_row"
@@ -65,12 +59,10 @@ Feature: Custom licences
6559
And I navigate to "Licence > Licence manager" in site administration
6660
And I click on "Create licence" "link"
6761
And I set the following fields to these values:
68-
| shortname | MIT |
69-
| fullname | MIT Licence |
70-
| source | https://opensource.org/licenses/MIT |
71-
| version[day] | 1 |
72-
| version[month] | March |
73-
| version[year] | 2019 |
62+
| shortname | MIT |
63+
| fullname | MIT Licence |
64+
| source | https://opensource.org/licenses/MIT |
65+
| Licence version | ##1 Mar 2019## |
7466
And I press "Save changes"
7567
And I should see "Licence manager"
7668
And I should see "MIT Licence" in the "MIT" "table_row"

0 commit comments

Comments
 (0)