Skip to content

Commit

Permalink
Acceptance test for group names with emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
bhawanaprasain committed May 16, 2019
1 parent 7e920e3 commit bafb83f
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: add groups
| group_id | comment |
| simplegroup | nothing special here |
| España | special European characters |
| नेपाली | Unicode group name |
| नेपाली | Unicode group name |

Scenario Outline: admin creates a group
When the administrator sends a group creation request for group "<group_id>" using the provisioning API
Expand All @@ -42,6 +42,7 @@ Feature: add groups
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😅 😆 | emoji |

# Note: these groups do get created OK, but:
# 1) the "should exist" step fails because the API to check their existence does not work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: add users to group
| group_id | comment |
| simplegroup | nothing special here |
| España | special European characters |
| नेपाली | Unicode group name |
| नेपाली | Unicode group name |

Scenario Outline: adding a user to a group
Given user "brand-new-user" has been created with default attributes
Expand All @@ -44,6 +44,7 @@ Feature: add users to group
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😁 😂 | emoji |

@issue-31015
Scenario Outline: adding a user to a group that has a forward-slash in the group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: delete groups
| group_id | comment |
| simplegroup | nothing special here |
| España | special European characters |
| नेपाली | Unicode group name |
| नेपाली | Unicode group name |

Scenario Outline: admin deletes a group
Given group "<group_id>" has been created
Expand All @@ -44,6 +44,8 @@ Feature: delete groups
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😁 😂 | emoji |


@issue-31015
Scenario Outline: admin deletes a group that has a forward-slash in the group name
Expand Down Expand Up @@ -82,4 +84,4 @@ Feature: delete groups
When user "subadmin" tries to delete group "new-group" using the provisioning API
Then the OCS status code should be "997"
And the HTTP status code should be "401"
And group "new-group" should exist
And group "new-group" should exist
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ Feature: get subadmin groups
Scenario: admin gets subadmin groups of a user
Given user "brand-new-user" has been created with default attributes
And group "new-group" has been created
And group "😅 😆" has been created
And user "brand-new-user" has been made a subadmin of group "new-group"
And user "brand-new-user" has been made a subadmin of group "😅 😆"
When the administrator gets all the groups where user "brand-new-user" is subadmin using the provisioning API
Then the subadmin groups returned by the API should be
| new-group |
| 😅 😆 |
And the OCS status code should be "100"
And the HTTP status code should be "200"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ Feature: get user groups
And group "Admin & Finance (NP)" has been created
And group "admin:Pokhara@Nepal" has been created
And group "नेपाली" has been created
And group "😅 😆" has been created
And user "brand-new-user" has been added to group "new-group"
And user "brand-new-user" has been added to group "0"
And user "brand-new-user" has been added to group "Admin & Finance (NP)"
And user "brand-new-user" has been added to group "admin:Pokhara@Nepal"
And user "brand-new-user" has been added to group "नेपाली"
And user "brand-new-user" has been added to group "😅 😆"
When the administrator gets all the groups of user "brand-new-user" using the provisioning API
Then the groups returned by the API should be
| new-group |
| 0 |
| Admin & Finance (NP) |
| admin:Pokhara@Nepal |
| नेपाली |
| नेपाली |
| 😅 😆 |
And the OCS status code should be "100"
And the HTTP status code should be "200"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Feature: remove a user from a group
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😁 😂 | emoji |

@issue-31015
Scenario Outline: admin removes a user from a group that has a forward-slash in the group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Feature: add groups
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😅 😆 | emoji |

# Note: these groups do get created OK, but:
# 1) the "should exist" step fails because the API to check their existence does not work.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Feature: add users to group
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😅 😆 | emoji |

@issue-31015
Scenario Outline: adding a user to a group that has a forward-slash in the group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Feature: delete groups
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😅 😆 | emoji |

@issue-31015
Scenario Outline: admin deletes a group that has a forward-slash in the group name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ Feature: get subadmin groups
Scenario: admin gets subadmin groups of a user
Given user "brand-new-user" has been created with default attributes
And group "new-group" has been created
And group "😅 😆" has been created
And user "brand-new-user" has been made a subadmin of group "new-group"
And user "brand-new-user" has been made a subadmin of group "😅 😆"
When the administrator gets all the groups where user "brand-new-user" is subadmin using the provisioning API
Then the subadmin groups returned by the API should be
| new-group |
| 😅 😆 |
And the OCS status code should be "200"
And the HTTP status code should be "200"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ Feature: get user groups
And group "Admin & Finance (NP)" has been created
And group "admin:Pokhara@Nepal" has been created
And group "नेपाली" has been created
And group "😅 😆" has been created
And user "brand-new-user" has been added to group "new-group"
And user "brand-new-user" has been added to group "0"
And user "brand-new-user" has been added to group "Admin & Finance (NP)"
And user "brand-new-user" has been added to group "admin:Pokhara@Nepal"
And user "brand-new-user" has been added to group "नेपाली"
And user "brand-new-user" has been added to group "😅 😆"
When the administrator gets all the groups of user "brand-new-user" using the provisioning API
Then the groups returned by the API should be
| new-group |
| 0 |
| Admin & Finance (NP) |
| admin:Pokhara@Nepal |
| नेपाली |
| 😅 😆 |
And the OCS status code should be "200"
And the HTTP status code should be "200"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Feature: remove a user from a group
| España | special European characters |
| नेपाली | Unicode group name |

Scenario Outline: admin removes a user from a group
Scenario Outline: admin removes a user from a group
Given user "brand-new-user" has been created with default attributes
And group "<group_id>" has been created
And user "brand-new-user" has been added to group "<group_id>"
Expand All @@ -48,6 +48,7 @@ Feature: remove a user from a group
| 50%2Eagle | %2E literal looks like an escaped "." |
| 50%2Fix | %2F literal looks like an escaped slash |
| staff?group | Question mark |
| 😅 😆 | emoji |

@issue-31015
Scenario Outline: admin removes a user from a group that has a forward-slash in the group name
Expand Down

0 comments on commit bafb83f

Please sign in to comment.