Files
proton-bridge/tests/features/user/login.feature
James Houlahan c9d496956c test: Refactor account management, fix map-random-order race condition
Some SMTP tests made use of disabled addresses. We stored addresses
in a map, meaning the order was randomized. This lead to tests sometimes
attempting to authenticate over SMTP using a disabled address, failing.
2023-02-07 18:26:13 +01:00

46 lines
2.1 KiB
Gherkin

Feature: A user can login
Background:
Given there exists an account with username "[user:user]" and password "password"
Given there exists an account with username "[user:MixedCaps]" and password "password"
Given there exists a disabled account with username "[user:disabled]" and password "password"
And bridge starts
Scenario: Login to account
When the user logs in with username "[user:user]" and password "password"
Then user "[user:user]" is listed and connected
Scenario: Login to account with wrong password
When the user logs in with username "[user:user]" and password "wrong"
Then user "[user:user]" is not listed
Scenario: Login to nonexistent account
When the user logs in with username "nonexistent" and password "unknown"
Then user "nonexistent" is not listed
Scenario: Login to account without internet
Given the internet is turned off
When the user logs in with username "[user:user]" and password "password"
Then user "[user:user]" is not listed
Scenario: Login to account with caps
When the user logs in with username "[user:MixedCaps]" and password "password"
Then user "[user:MixedCaps]" is listed and connected
Scenario: Login to account with disabled primary
When the user logs in with username "[user:disabled]" and password "password"
Then user "[user:disabled]" is listed and connected
Scenario: Login to account without internet but the connection is later restored
When the user logs in with username "[user:user]" and password "password"
And bridge stops
And the internet is turned off
And bridge starts
And the internet is turned on
Then user "[user:user]" is eventually listed and connected
Scenario: Login to multiple accounts
Given there exists an account with username "[user:additional]" and password "password"
When the user logs in with username "[user:user]" and password "password"
And the user logs in with username "[user:additional]" and password "password"
Then user "[user:user]" is listed and connected
And user "[user:additional]" is listed and connected