Skip to content

Commit

Permalink
Update user and group ids in behat tests
Browse files Browse the repository at this point in the history
Pinging the redmine server for the health check create a new AnonymousUser with id 4

refs kbsali#410
  • Loading branch information
Art4 committed Jul 5, 2024
1 parent 097ac2e commit f9e1ea8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions tests/Behat/features/groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Feature: Interacting with the REST API for groups
"""
And the returned data has proterties with the following data
| property | value |
| id | 4 |
| id | 5 |
| name | Test Group |

Scenario: Listing of zero groups
Expand Down Expand Up @@ -52,7 +52,7 @@ Feature: Interacting with the REST API for groups
"""
And the returned data "groups.0" property contains the following data
| property | value |
| id | 4 |
| id | 5 |
| name | Test Group |

Scenario: Listing names of all groups
Expand All @@ -69,16 +69,16 @@ Feature: Interacting with the REST API for groups
And the returned data contains "5" items
And the returned data contains the following data
| property | value |
| 4 | Test Group D |
| 5 | Test Group E |
| 6 | Test Group C |
| 7 | Test Group B |
| 8 | Test Group A |
| 5 | Test Group D |
| 6 | Test Group E |
| 7 | Test Group C |
| 8 | Test Group B |
| 9 | Test Group A |

Scenario: Showing a specific group
Given I have a "NativeCurlClient" client
And I create a group with name "Test Group"
When I show the group with id "4"
When I show the group with id "5"
Then the response has the status code "200"
And the response has the content type "application/json"
And the returned data has only the following properties
Expand All @@ -93,7 +93,7 @@ Feature: Interacting with the REST API for groups
"""
And the returned data "group" property contains the following data
| property | value |
| id | 4 |
| id | 5 |
| name | Test Group |

@error
Expand All @@ -110,7 +110,7 @@ Feature: Interacting with the REST API for groups
And I create a group with the following data
| property | value |
| name | Test Group |
When I update the group with id "4" with the following data
When I update the group with id "5" with the following data
| property | value |
| name | new group name |
Then the response has the status code "204"
Expand All @@ -121,7 +121,7 @@ Feature: Interacting with the REST API for groups
Scenario: Adding an user to a group
Given I have a "NativeCurlClient" client
And I create a group with name "Test Group"
When I add the user with id "1" to the group with id "4"
When I add the user with id "1" to the group with id "5"
Then the response has the status code "204"
And the response has an empty content type
And the response has the content ""
Expand All @@ -130,8 +130,8 @@ Feature: Interacting with the REST API for groups
Scenario: Removing an user from a group
Given I have a "NativeCurlClient" client
And I create a group with name "Test Group"
And I add the user with id "1" to the group with id "4"
When I remove the user with id "1" from the group with id "4"
And I add the user with id "1" to the group with id "5"
When I remove the user with id "1" from the group with id "5"
Then the response has the status code "204"
And the response has an empty content type
And the response has the content ""
Expand All @@ -140,7 +140,7 @@ Feature: Interacting with the REST API for groups
Scenario: Deleting a group
Given I have a "NativeCurlClient" client
And I create a group with name "Test Group"
When I remove the group with id "4"
When I remove the group with id "5"
Then the response has the status code "204"
And the response has an empty content type
And the response has the content ""
Expand Down
6 changes: 3 additions & 3 deletions tests/Behat/features/user.feature
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Feature: Interacting with the REST API for users
"""
And the returned data has proterties with the following data
| property | value |
| id | 4 |
| id | 5 |
| login | username |
| admin | false |
| firstname | first |
Expand All @@ -53,7 +53,7 @@ Feature: Interacting with the REST API for users
| firstname | first |
| lastname | last |
| mail | mail@example.com |
When I update the user with id "4" and the following data
When I update the user with id "5" and the following data
| property | value |
| firstname | new_first |
| lastname | new_last |
Expand Down Expand Up @@ -121,7 +121,7 @@ Feature: Interacting with the REST API for users
| firstname | first |
| lastname | last |
| mail | mail@example.com |
When I remove the user with id "4"
When I remove the user with id "5"
Then the response has the status code "204"
And the response has an empty content type
And the response has the content ""
Expand Down

0 comments on commit f9e1ea8

Please sign in to comment.