Skip to content

Commit

Permalink
Background usage implemented in feature
Browse files Browse the repository at this point in the history
  • Loading branch information
xipi3000 committed Mar 30, 2024
1 parent 6cb13bf commit f0f9507
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/test/resources/features/KickUserFromShelter.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,23 @@ Feature: Kick ShelterVolunteer from Shelter
As a Admin
I want to be able to kick a volunteer from the shelter


Background:
Given There is a registered user with username "user" and password "pass" and email "[email protected]"
And There a shelter with name "shelter1" email "[email protected]" and mobile "12345678"
And There is a shelter volunteer with username "volunteer" and password "pass" in the shelter "shelter1"
And There is a shelter volunteer with username "volunteer1" and password "pass" in the shelter "shelter1"
And There a shelter with name "shelter2" email "[email protected]" and mobile "12345679"
And There is a shelter volunteer with username "volunteer2" and password "pass" in the shelter "shelter2"

Scenario: Kick volunteer from shelter

Given There a shelter with name "shelter" email "[email protected]" and mobile "12345678"
And There is a shelter volunteer with username "user" and password "pass" in the shelter "shelter"
And I can login with username "user" and password "pass"
And I can login with username "volunteer" and password "pass"
Then The response code is 200
And There is a shelter volunteer with username "volunteer" and password "pass" in the shelter "shelter"
When I kick user "volunteer" from shelter "shelter"
And There is a shelter volunteer with username "volunteer1" and password "pass" in the shelter "shelter"
When I kick user "volunteer1" from shelter "shelter"
Then The response code is 200

Scenario: Kick volunteer from shelter as user

Given There a shelter with name "shelter" email "[email protected]" and mobile "12345678"
And There is a registered user with username "user" and password "pass" and email "[email protected]"
And I can login with username "user" and password "pass"
Then The response code is 200
And There is a shelter volunteer with username "volunteer" and password "pass" in the shelter "shelter"
Expand All @@ -28,11 +29,8 @@ Feature: Kick ShelterVolunteer from Shelter

Scenario: Kick volunteer from shelter as volunteer in another shelter

Given There a shelter with name "shelter" email "[email protected]" and mobile "12345678"
And There a shelter with name "shelter2" email "[email protected]" and mobile "12345679"
And There is a shelter volunteer with username "user" and password "pass" in the shelter "shelter2"
And I can login with username "user" and password "pass"
Given I can login with username "volunteer" and password "pass"
Then The response code is 200
And There is a shelter volunteer with username "volunteer" and password "pass" in the shelter "shelter"
When I kick user "volunteer" from shelter "shelter"
When I kick user "volunteer2" from shelter "shelter"
Then The response code is 412

0 comments on commit f0f9507

Please sign in to comment.