forked from Silverfish/proton-bridge
GODT-1817: Port old user feature tests
This commit is contained in:
@ -1,76 +0,0 @@
|
|||||||
Feature: Address mode
|
|
||||||
Background:
|
|
||||||
Given there is connected user "userMoreAddresses"
|
|
||||||
And there is "userMoreAddresses" with mailbox "Folders/mbox"
|
|
||||||
And there are messages in mailbox "Folders/mbox" for "userMoreAddresses"
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
|
|
||||||
Scenario: All messages in one mailbox with combined mode
|
|
||||||
Given there is "userMoreAddresses" in "combined" address mode
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
|
|
||||||
Scenario: Messages separated in more mailboxes with split mode
|
|
||||||
Given there is "userMoreAddresses" in "split" address mode
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
|
|
||||||
Scenario: Switch address mode from combined to split mode
|
|
||||||
Given there is "userMoreAddresses" in "combined" address mode
|
|
||||||
When "userMoreAddresses" changes the address mode
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" has address mode in "split" mode
|
|
||||||
And mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
|
|
||||||
Scenario: Switch address mode from split to combined mode
|
|
||||||
Given there is "userMoreAddresses" in "split" address mode
|
|
||||||
When "userMoreAddresses" changes the address mode
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" has address mode in "combined" mode
|
|
||||||
And mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
|
|
||||||
Scenario: Make secondary address primary in combined mode
|
|
||||||
Given there is "userMoreAddresses" in "combined" address mode
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
When "userMoreAddresses" swaps address "primary" with address "secondary"
|
|
||||||
And "userMoreAddresses" receives an address event
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [secondary] | foo |
|
|
||||||
| jane.doe@mail.com | [primary] | bar |
|
|
||||||
|
|
||||||
Scenario: Make secondary address primary in split mode
|
|
||||||
Given there is "userMoreAddresses" in "split" address mode
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [primary] | foo |
|
|
||||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| jane.doe@mail.com | [secondary] | bar |
|
|
||||||
When "userMoreAddresses" swaps address "primary" with address "secondary"
|
|
||||||
And "userMoreAddresses" receives an address event
|
|
||||||
Then mailbox "Folders/mbox" for address "primary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| jane.doe@mail.com | [primary] | bar |
|
|
||||||
And mailbox "Folders/mbox" for address "secondary" of "userMoreAddresses" has messages
|
|
||||||
| from | to | subject |
|
|
||||||
| john.doe@mail.com | [secondary] | foo |
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
Feature: Login for the first time
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Normal login
|
|
||||||
Given there is user "user"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "user" is connected
|
|
||||||
And "user" has database file
|
|
||||||
And "user" has running event loop
|
|
||||||
And "user" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Login with bad username
|
|
||||||
When "user" logs in with bad password
|
|
||||||
Then last response is "failed to login: Incorrect login credentials. Please try again"
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Login with bad password
|
|
||||||
Given there is user "user"
|
|
||||||
When "user" logs in with bad password
|
|
||||||
Then last response is "failed to login: Incorrect login credentials. Please try again"
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Login without internet connection
|
|
||||||
Given there is no internet connection
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "failed to login: no internet connection"
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Login user with 2FA
|
|
||||||
Given there is user "user2fa"
|
|
||||||
When "user2fa" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "user2fa" is connected
|
|
||||||
And "user2fa" has database file
|
|
||||||
And "user2fa" has running event loop
|
|
||||||
And "user2fa" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Login user with capital letters in address
|
|
||||||
Given there is user "userAddressWithCapitalLetter"
|
|
||||||
When "userAddressWithCapitalLetter" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userAddressWithCapitalLetter" is connected
|
|
||||||
And "userAddressWithCapitalLetter" has database file
|
|
||||||
And "userAddressWithCapitalLetter" has running event loop
|
|
||||||
And "userAddressWithCapitalLetter" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Login user with more addresses
|
|
||||||
Given there is user "userMoreAddresses"
|
|
||||||
When "userMoreAddresses" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" is connected
|
|
||||||
And "userMoreAddresses" has database file
|
|
||||||
And "userMoreAddresses" has running event loop
|
|
||||||
And "userMoreAddresses" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Login user with disabled primary address
|
|
||||||
Given there is user "userDisabledPrimaryAddress"
|
|
||||||
When "userDisabledPrimaryAddress" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userDisabledPrimaryAddress" is connected
|
|
||||||
And "userDisabledPrimaryAddress" has database file
|
|
||||||
And "userDisabledPrimaryAddress" has running event loop
|
|
||||||
And "userDisabledPrimaryAddress" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Login two users
|
|
||||||
Given there is user "user"
|
|
||||||
And there is user "userMoreAddresses"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "user" is connected
|
|
||||||
When "userMoreAddresses" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" is connected
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
Feature: Re-login
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Re-login with connected user and database file
|
|
||||||
Given there is user "user" which just logged in
|
|
||||||
And there is database file for "user"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "failed to finish login: user is already connected"
|
|
||||||
And "user" is connected
|
|
||||||
And "user" has running event loop
|
|
||||||
And "user" has non-zero space
|
|
||||||
|
|
||||||
@ignore
|
|
||||||
Scenario: Re-login with connected user and no database file
|
|
||||||
Given there is user "user" which just logged in
|
|
||||||
And there is no database file for "user"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "failed to finish login: user is already connected"
|
|
||||||
And "user" is connected
|
|
||||||
And "user" has database file
|
|
||||||
And "user" has running event loop
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Re-login with disconnected user and database file
|
|
||||||
Given there is disconnected user "user"
|
|
||||||
And there is database file for "user"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "user" is connected
|
|
||||||
And "user" has running event loop
|
|
||||||
And "user" has non-zero space
|
|
||||||
|
|
||||||
@ignore-live-auth
|
|
||||||
Scenario: Re-login with disconnected user and no database file
|
|
||||||
Given there is disconnected user "user"
|
|
||||||
And there is no database file for "user"
|
|
||||||
When "user" logs in
|
|
||||||
Then last response is "OK"
|
|
||||||
And "user" is connected
|
|
||||||
And "user" has database file
|
|
||||||
And "user" has running event loop
|
|
||||||
And "user" has non-zero space
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
Feature: Session deleted on API
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Session revoked after start
|
|
||||||
Given there is connected user "user"
|
|
||||||
When session was revoked for "user"
|
|
||||||
And the event loop of "user" loops once
|
|
||||||
Then "user" is disconnected
|
|
||||||
|
|
||||||
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Starting with revoked session
|
|
||||||
Given there is user "user" which just logged in
|
|
||||||
And session was revoked for "user"
|
|
||||||
When bridge starts
|
|
||||||
Then "user" is disconnected
|
|
||||||
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
Feature: Sync bridge
|
|
||||||
Background:
|
|
||||||
Given there is connected user "userMoreAddresses"
|
|
||||||
And there is "userMoreAddresses" with mailboxes
|
|
||||||
| Folders/one |
|
|
||||||
| Folders/two |
|
|
||||||
| Labels/three |
|
|
||||||
| Labels/four |
|
|
||||||
And there are messages for "userMoreAddresses" as follows
|
|
||||||
| address | mailboxes | messages |
|
|
||||||
| primary | INBOX,Folders/one | 1 |
|
|
||||||
| primary | Archive,Labels/three | 2 |
|
|
||||||
| primary | INBOX | 1000 |
|
|
||||||
| primary | Archive | 1200 |
|
|
||||||
| primary | Folders/one | 1400 |
|
|
||||||
| primary | Folders/two | 1600 |
|
|
||||||
| primary | Labels/three | 1800 |
|
|
||||||
| primary | Labels/four | 2000 |
|
|
||||||
| secondary | INBOX | 100 |
|
|
||||||
| secondary | Archive | 120 |
|
|
||||||
| secondary | Folders/one | 140 |
|
|
||||||
| secondary | Folders/two | 160 |
|
|
||||||
| secondary | Labels/three | 180 |
|
|
||||||
| secondary | Labels/four | 200 |
|
|
||||||
|
|
||||||
# Too heavy for live.
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Sync in combined mode
|
|
||||||
And there is "userMoreAddresses" in "combined" address mode
|
|
||||||
When bridge syncs "userMoreAddresses"
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" has the following messages
|
|
||||||
| mailboxes | messages |
|
|
||||||
| INBOX | 1101 |
|
|
||||||
| Archive | 1322 |
|
|
||||||
| Folders/one | 1541 |
|
|
||||||
| Folders/two | 1760 |
|
|
||||||
| Labels/three | 1982 |
|
|
||||||
| Labels/four | 2200 |
|
|
||||||
|
|
||||||
# Too heavy for live.
|
|
||||||
@ignore-live
|
|
||||||
Scenario: Sync in split mode
|
|
||||||
And there is "userMoreAddresses" in "split" address mode
|
|
||||||
When bridge syncs "userMoreAddresses"
|
|
||||||
Then last response is "OK"
|
|
||||||
And "userMoreAddresses" has the following messages
|
|
||||||
| address | mailboxes | messages |
|
|
||||||
| primary | INBOX | 1001 |
|
|
||||||
| primary | Archive | 1202 |
|
|
||||||
| primary | Folders/one | 1401 |
|
|
||||||
| primary | Folders/two | 1600 |
|
|
||||||
| primary | Labels/three | 1802 |
|
|
||||||
| primary | Labels/four | 2000 |
|
|
||||||
| secondary | INBOX | 100 |
|
|
||||||
| secondary | Archive | 120 |
|
|
||||||
| secondary | Folders/one | 140 |
|
|
||||||
| secondary | Folders/two | 160 |
|
|
||||||
| secondary | Labels/three | 180 |
|
|
||||||
| secondary | Labels/four | 200 |
|
|
||||||
@ -1,6 +1,8 @@
|
|||||||
Feature: A user can login
|
Feature: A user can login
|
||||||
Background:
|
Background:
|
||||||
Given there exists an account with username "[user:user]" and password "password"
|
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
|
And bridge starts
|
||||||
|
|
||||||
Scenario: Login to account
|
Scenario: Login to account
|
||||||
@ -20,6 +22,14 @@ Feature: A user can login
|
|||||||
When the user logs in with username "[user:user]" and password "password"
|
When the user logs in with username "[user:user]" and password "password"
|
||||||
Then user "[user:user]" is not listed
|
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
|
Scenario: Login to account without internet but the connection is later restored
|
||||||
When the user logs in with username "[user:user]" and password "password"
|
When the user logs in with username "[user:user]" and password "password"
|
||||||
And bridge stops
|
And bridge stops
|
||||||
|
|||||||
Reference in New Issue
Block a user