This repository has been archived by the owner on Feb 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlogging-in.feature
38 lines (31 loc) · 1.72 KB
/
logging-in.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@connectivity
Feature: Logging In
As soon as the client is initialised, it creates a connection with
the server. However the connection is initially in a quarantine
state until it sends an authentication message. The auth message
(A|REQ|<JSON authData>) must always be the first message send by
the client.
Scenario: The client logs in with valid authentication credentials
Given the test server is ready
And the client is initialised
And the server sends the message C|A+
When the client logs in with username "XXX" and password "YYY"
Then the last message the server recieved is A|REQ|{"username":"XXX","password":"YYY"}+
And the clients connection state is "AUTHENTICATING"
# The client receives a login confirmation
When the server sends the message A|A+
Then the clients connection state is "OPEN"
And the last login was successful
Scenario: The client logs in with invalid credentials
Given the client is initialised
When the client logs in with username "XXX" and password "YYY"
But the server sends the message A|E|INVALID_AUTH_DATA|Sinvalid authentication data+
Then the last login failed with error message "invalid authentication data"
# The client's authentication data is rejected
When the client logs in with username "XXX" and password "ZZZ"
But the server sends the message A|E|INVALID_AUTH_DATA|Sinvalid authentication data+
Then the last login failed with error message "invalid authentication data"
# The client has made too many unsuccessful authentication attempts
When the client logs in with username "XXX" and password "ZZZ"
But the server sends the message A|E|TOO_MANY_AUTH_ATTEMPTS|Stoo many authentication attempts+
Then the last login failed with error message "too many authentication attempts"