Skip to content

Commit

Permalink
Feature View Pets Catalogue - implemented two scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
globox97 committed Apr 7, 2024
1 parent 82c4103 commit 9d39365
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public void viewCatalogue() throws Exception {
.andDo(print());
}

@When("I request the catalogue for the specific shelter {string}")
public void viewShelterCatalogue(String shelter) throws Exception {
@When("I request the Catalogue for the specific shelter {long}")
public void viewShelterCatalogue(Long shelter) throws Exception {
stepDefs.result = stepDefs.mockMvc.perform(get("/pets/search/findByShelter?Shelter={shelter}", shelter)
.accept(MediaType.APPLICATION_JSON))
.andDo(print());
Expand Down
12 changes: 6 additions & 6 deletions src/test/resources/features/ViewCatalogue.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ Feature: View Pets Catalogue
When I request the Catalogue
Then The response code is 200

Scenario: View Pets Catalogue as a Shelter Volunteer
Given There is a registered shelter volunteer with username "volunteer" and password "password" and email "[email protected]"
Given I login with username "volunteer" and password "password"
When I request the Catalogue for the specific shelter
Then I'm shown the Catalogue from the shelter I work in
And The response code is 200
#Scenario: View Pets Catalogue as a Shelter Volunteer
#Given There is a registered shelter volunteer with username "volunteer" and password "password" and email "[email protected]"
#Given I login with username "volunteer" and password "password"
#When I request the Catalogue for the specific shelter "shelter"
#Then I'm shown the Catalogue from the shelter I work in
#And The response code is 200

0 comments on commit 9d39365

Please sign in to comment.