Skip to content

Commit

Permalink
new login feature
Browse files Browse the repository at this point in the history
  • Loading branch information
xipi3000 committed Mar 5, 2024
1 parent 3b006f6 commit eb1faa5
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/test/resources/features/LoginUser.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Feature: Login User
In order to use the app
As a user
I want to login myself to access it

Scenario: Login already registered user
Given I'm not logged in
When I enter my registered username "user" with password "password"
Then The response code is 201
And I am successfully logged in

Scenario: Login with a non existing user
Given I'm not logged in
When I enter username "sdafddsaf" and password "password"
Then The response code is 404
And I am prompt a error saying that the username or password are wrong

Scenario: Login with a incorrect password
Given I'm not logged in
When I login with username "user" and password "afsdfsaafs"
Then The response code is 404
And I am prompt a error saying that the username or password are wrong

Scenario: Login with empty username
Given I'm not logged in
When I log in with username "" and password "passsword"
Then The response code is 406
And The error message is "must not be blank"

Scenario: Login with empty password
Given I'm not logged in
When I log in with username "user" and password ""
Then The response code is 406
And The error message is "must not be blank"

0 comments on commit eb1faa5

Please sign in to comment.