|
|
|
@ -5,7 +5,7 @@ Feature: Skills |
|
|
|
|
|
|
|
|
|
Scenario: Create a skill skill1 |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_create.php" |
|
|
|
|
And I am on "main/skills/skill_create.php" |
|
|
|
|
When I fill in the following: |
|
|
|
|
| name | skill1 | |
|
|
|
|
| short_code | s1 | |
|
|
|
@ -17,7 +17,7 @@ Feature: Skills |
|
|
|
|
|
|
|
|
|
Scenario: Create a second level skill |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_create.php" |
|
|
|
|
And I am on "main/skills/skill_create.php" |
|
|
|
|
When I fill in the following: |
|
|
|
|
| name | skill11 | |
|
|
|
|
| short_code | s11 | |
|
|
|
@ -30,7 +30,7 @@ Feature: Skills |
|
|
|
|
|
|
|
|
|
Scenario: Create a skill skilldis |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_create.php" |
|
|
|
|
And I am on "main/skills/skill_create.php" |
|
|
|
|
When I fill in the following: |
|
|
|
|
| name | skilldis | |
|
|
|
|
| short_code | sdis | |
|
|
|
@ -40,41 +40,41 @@ Feature: Skills |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "The skill has been created: skilldis" |
|
|
|
|
|
|
|
|
|
# This following scenario needs to be adapted because |
|
|
|
|
# This following scenario needs to be adapted because |
|
|
|
|
# the first skill in the list is disable and not the one named skilldis |
|
|
|
|
# So Intead of having then I follow "Disable" I put the exact page "/main/admin/skill_list.php?id=4&action=disable" |
|
|
|
|
# So Intead of having then I follow "Disable" I put the exact page "/main/skills/skill_list.php?id=4&action=disable" |
|
|
|
|
# where I should get because there is nothing unique to identify this link other than the URL |
|
|
|
|
# The problem is that it will only work if the there was no skills created before lauching the behat tests |
|
|
|
|
# The disable function works, it's the behat test that do no activate the function on the correct line |
|
|
|
|
Scenario: Disable a skill skilldis |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_list.php" |
|
|
|
|
And I am on "main/skills/skill_list.php" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "skilldis" |
|
|
|
|
Then I am on "/main/admin/skill_list.php?id=4&action=disable" |
|
|
|
|
Then I am on "/main/skills/skill_list.php?id=4&action=disable" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "Skill \"skilldis\" disabled" |
|
|
|
|
|
|
|
|
|
# This following scenario needs to be adapted because |
|
|
|
|
# This following scenario needs to be adapted because |
|
|
|
|
# the first skill in the list is tried to be enable and not the one named skilldis |
|
|
|
|
# So Intead of having then I follow "Enable" I put the exact page "/main/admin/skill_list.php?id=4&action=enable" |
|
|
|
|
# So Intead of having then I follow "Enable" I put the exact page "/main/skills/skill_list.php?id=4&action=enable" |
|
|
|
|
# where I should get because there is nothing unique to identify this link other than the URL |
|
|
|
|
# The problem is that it will only work if the there was no skills created before lauching the behat tests |
|
|
|
|
# The enable function works, it's the behat test that do no activate the function on the correct line |
|
|
|
|
Scenario: Enable a skill skilldis |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_list.php" |
|
|
|
|
And I am on "main/skills/skill_list.php" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "skilldis" |
|
|
|
|
Then I am on "/main/admin/skill_list.php?id=4&action=enable" |
|
|
|
|
Then I am on "/main/skills/skill_list.php?id=4&action=enable" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "Skill \"skilldis\" enabled" |
|
|
|
|
|
|
|
|
|
# This scenario works but it needs to be adapted |
|
|
|
|
# This scenario works but it needs to be adapted |
|
|
|
|
# because it does not update skill1 but the first in the list |
|
|
|
|
Scenario: Update a skill skill1 |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/admin/skill_list.php" |
|
|
|
|
And I am on "main/skills/skill_list.php" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I should see "skill1" |
|
|
|
|
Then I follow "Edit" |
|
|
|
@ -87,7 +87,7 @@ Feature: Skills |
|
|
|
|
|
|
|
|
|
Scenario: Assign skill11 to user 1 |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/badge/assign.php?user=1" |
|
|
|
|
And I am on "main/skills/assign.php?user=1" |
|
|
|
|
When I select "skill11" from "skill" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I fill in the following: |
|
|
|
@ -99,7 +99,7 @@ Feature: Skills |
|
|
|
|
|
|
|
|
|
Scenario: Reassign skill11 to user 1 |
|
|
|
|
Given I am a platform administrator |
|
|
|
|
And I am on "main/badge/assign.php?user=1" |
|
|
|
|
And I am on "main/skills/assign.php?user=1" |
|
|
|
|
When I select "skill11" from "skill" |
|
|
|
|
And wait for the page to be loaded |
|
|
|
|
Then I fill in the following: |
|
|
|
@ -118,7 +118,7 @@ Feature: Skills |
|
|
|
|
# The following scenario need to be completed once the funcionality is ready |
|
|
|
|
# Scenario: Set a badge to a skill |
|
|
|
|
# Given I am a platform administrator |
|
|
|
|
# And I am on "main/admin/skill_list.php" |
|
|
|
|
# And I am on "main/skills/skill_list.php" |
|
|
|
|
# Then I should see "skill11" |
|
|
|
|
# Then I follow "Create badge" |
|
|
|
|
# Then I follow "Browse" |
|
|
|
|