Skip to content

Commit

Permalink
Adjust tests for usernames contain plus sign
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Dec 19, 2019
1 parent 29db822 commit 28d5e5b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
14 changes: 9 additions & 5 deletions tests/acceptance/features/cliProvisioning/addUser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ Feature: add a user using the using the occ command
So that I can give people controlled individual access to resources on the ownCloud server and
So that I can write scripts to add users

Scenario: admin creates an ordinary user using the occ command
Scenario Outline: admin creates an ordinary user using the occ command
When the administrator creates this user using the occ command:
| username |
| <username> |
Then the command should have been successful
And the command output should contain the text 'The user "<username>" was created successfully'
And user "<username>" should exist
And user "<username>" should be able to access a skeleton file
Examples:
| username |
| justauser |
Then the command should have been successful
And the command output should contain the text 'The user "justauser" was created successfully'
And user "justauser" should exist
And user "justauser" should be able to access a skeleton file
| a@-+_.b |

Scenario: admin creates an ordinary user specifying attributes using the occ command
When the administrator creates this user using the occ command:
Expand Down
20 changes: 10 additions & 10 deletions tests/acceptance/features/webUIAddUsers/addUsers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ Feature: add users
Then the user should be redirected to a webUI page with the title "Files - %productname%"

Scenario: use the webUI to create a user with special valid characters
When the administrator creates a user with the name "@-_.'" and the password "%regular%" using the webUI
When the administrator creates a user with the name "@-+_.'" and the password "%regular%" using the webUI
And the administrator logs out of the webUI
And user "@-_.'" logs in using the webUI
And user "@-+_.'" logs in using the webUI
Then the user should be redirected to a webUI page with the title "Files - %productname%"

Scenario: use the webUI to create a user with special invalid characters
When the administrator attempts to create these users then the notifications should be as listed
| user | password | notification |
| a#% | "%regular%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-'" |
| a+^ | "%alt1%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-'" |
| a)~ | "%alt2%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-'" |
| a(= | "%alt3%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-'" |
| a`*^ | "%alt4%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "_.@-'" |
| user | password | notification |
| a#% | "%regular%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "+_.@-'" |
| a+^ | "%alt1%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "+_.@-'" |
| a)~ | "%alt2%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "+_.@-'" |
| a(= | "%alt3%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "+_.@-'" |
| a`*^ | "%alt4%" | Error creating user: Only the following characters are allowed in a username: "a-z", "A-Z", "0-9", and "+_.@-'" |

Scenario: use the webUI to create a user with empty password
When the administrator attempts to create a user with the name "bijay" and the password "" using the webUI
Expand Down Expand Up @@ -71,7 +71,7 @@ Feature: add users
Examples:
| username | comment |
| guiusr1 | simple user-name |
| a@-_.'b | complicated user-name |
| a@-+_.'b | complicated user-name |

Scenario Outline: user sets his own password but retypes it wrongly after being created with an Email address only
When the administrator creates a user with the name "<username>" and the email "guiusr1@owncloud" without a password using the webUI
Expand All @@ -85,7 +85,7 @@ Feature: add users
Examples:
| username | comment |
| guiusr1 | simple user-name |
| a@-_.'b | complicated user-name |
| a@-+_.'b | complicated user-name |

Scenario Outline: webUI refuses to create users with invalid Email addresses
When the administrator creates a user with the name "guiusr1" and the email "<email>" without a password using the webUI
Expand Down

0 comments on commit 28d5e5b

Please sign in to comment.