proton-bridge/tests/features/user/login.feature

64 lines
3.1 KiB
Gherkin
Raw Normal View History

2022-08-26 15:00:21 +00:00
Feature: A user can login
Background:
Given there exists an account with username "[user:user]" and password "password2"
And there exists an account with username "[user:MixedCaps]" and password "password3"
And there exists a disabled account with username "[user:disabled]" and password "password4"
2023-05-22 11:16:56 +00:00
Then it succeeds
2022-08-26 15:00:21 +00:00
And bridge starts
2023-05-22 11:16:56 +00:00
Then it succeeds
2022-08-26 15:00:21 +00:00
Scenario: Login to account
When the user logs in with username "[user:user]" and password "password2"
Then user "[user:user]" is eventually listed and connected
2022-08-26 15:00:21 +00:00
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
2022-08-26 15:00:21 +00:00
Scenario: Login to nonexistent account
When the user logs in with username "nonexistent" and password "unknown"
Then user "nonexistent" is not listed
2022-08-26 15:00:21 +00:00
Scenario: Login to account without internet
Given the internet is turned off
When the user logs in with username "[user:user]" and password "password2"
Then user "[user:user]" is not listed
2022-08-26 15:00:21 +00:00
2023-01-10 10:47:05 +00:00
Scenario: Login to account with caps
When the user logs in with username "[user:MixedCaps]" and password "password3"
Then user "[user:MixedCaps]" is eventually listed and connected
2023-01-10 10:47:05 +00:00
Scenario: Login to account with disabled primary
When the user logs in with username "[user:disabled]" and password "password4"
Then user "[user:disabled]" is eventually listed and connected
2023-01-10 10:47:05 +00:00
Scenario: Login to account without internet but the connection is later restored
When the user logs in with username "[user:user]" and password "password2"
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
2022-08-26 15:00:21 +00:00
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 "password2"
And the user logs in with username "[user:additional]" and password "password"
Then user "[user:user]" is eventually listed and connected
And user "[user:additional]" is eventually listed and connected
Scenario: Login to account with an alias address
Given the account "[user:user]" has additional address "[user:alias]@[domain]"
When the user logs in with alias address "[user:alias]@[domain]" and password "password2"
Then user "[user:user]" is eventually listed and connected
Scenario: Login to account with an alias address that no longer exists
Given the account "[user:user]" has additional address "[user:alias]@[domain]"
And the user logs in with alias address "[user:alias]@[domain]" and password "password2"
And user "[user:user]" is eventually listed and connected
When user "[user:user]" is deleted
Then user "[user:user]" is not listed
When the account "[user:user]" no longer has additional address "[user:alias]@[domain]"
Then user "[user:user]" is not listed
When the user logs in with alias address "[user:alias]@[domain]" and password "password2"
Then it fails