[tests-only][full-ci] Add API tests for creating groups (graph API) (#4992)

This commit is contained in:
Sawjan Gurung
2022-11-11 09:31:13 +05:45
committed by GitHub
parent 4efe8fd43b
commit 03f53a3031
5 changed files with 74 additions and 18 deletions
@@ -0,0 +1,37 @@
@api @skipOnOcV10
Feature: create group
Only user with admin permissions can create new groups
Background:
Given user "Alice" has been created with default attributes and without skeleton files
And the administrator has given "Alice" the role "Admin" using the settings api
Scenario Outline: admin user creates a group
When user "Alice" creates a group "<groupname>" using the Graph API
Then the HTTP status code should be "200"
And group "<groupname>" should exist
Examples:
| groupname |
| simplegroup |
| España§àôœ |
| |
| $x<=>[y*z^2+1]! |
| 😅 😆 |
| comma,grp1 |
| Finance (NP) |
| slash\Middle |
Scenario: admin user tries to create a group that already exists
Given group "mygroup" has been created
When user "Alice" tries to create a group "mygroup" using the Graph API
And the HTTP status code should be "400"
And group "mygroup" should exist
Scenario: normal user tries to create a group
Given user "Brian" has been created with default attributes and without skeleton files
When user "Brian" tries to create a group "mygroup" using the Graph API
And the HTTP status code should be "401"
And group "mygroup" should not exist
@@ -25,7 +25,7 @@ Feature: create user
| name | pass with space | example@example.org | my pass | 200 | should |
| nameWithCharacters(*:!;_+-&) | user | new@example.org | 123 | 400 | should not |
| withoutEmail | without email | | 123 | 400 | should not |
| Alice | same userName | new@example.org | 123 | 500 | should |
| Alice | same userName | new@example.org | 123 | 400 | should |
| name with space | name with space | example@example.org | 123 | 400 | should not |