We build too many walls and not enough bridges

This commit is contained in:
Jakub
2020-04-08 12:59:16 +02:00
commit 17f4d6097a
494 changed files with 62753 additions and 0 deletions

View File

@ -0,0 +1,46 @@
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 bridge 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 bridge 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 |

View File

@ -0,0 +1,36 @@
Feature: Delete user
Scenario: Deleting connected user
Given there is connected user "user"
When user deletes "user" from bridge
Then bridge response is "OK"
And "user" has database file
Scenario: Deleting connected user with cache
Given there is connected user "user"
When user deletes "user" from bridge with cache
Then bridge response is "OK"
And "user" does not have database file
Scenario: Deleting connected user without database file
Given there is connected user "user"
And there is no database file for "user"
When user deletes "user" from bridge with cache
Then bridge response is "OK"
Scenario: Deleting disconnected user
Given there is disconnected user "user"
When user deletes "user" from bridge
Then bridge response is "OK"
And "user" has database file
Scenario: Deleting disconnected user with cache
Given there is disconnected user "user"
When user deletes "user" from bridge with cache
Then bridge response is "OK"
And "user" does not have database file
Scenario: Deleting disconnected user without database file
Given there is disconnected user "user"
And there is no database file for "user"
When user deletes "user" from bridge with cache
Then bridge response is "OK"

View File

@ -0,0 +1,66 @@
Feature: Login to bridge for the first time
Scenario: Normal bridge login
Given there is user "user"
When "user" logs in to bridge
Then bridge response is "OK"
And "user" is connected
And "user" has database file
And "user" has running event loop
Scenario: Login with bad username
When "user" logs in to bridge with bad password
Then bridge response is "failed to login: Incorrect login credentials. Please try again"
Scenario: Login with bad password
Given there is user "user"
When "user" logs in to bridge with bad password
Then bridge response is "failed to login: Incorrect login credentials. Please try again"
Scenario: Login without internet connection
Given there is no internet connection
When "user" logs in to bridge
Then bridge response is "failed to login: cannot reach the server"
@ignore-live
Scenario: Login user with 2FA
Given there is user "user2fa"
When "user2fa" logs in to bridge
Then bridge response is "OK"
And "user2fa" is connected
And "user2fa" has database file
And "user2fa" has running event loop
Scenario: Login user with capital letters in address
Given there is user "userAddressWithCapitalLetter"
When "userAddressWithCapitalLetter" logs in to bridge
Then bridge response is "OK"
And "userAddressWithCapitalLetter" is connected
And "userAddressWithCapitalLetter" has database file
And "userAddressWithCapitalLetter" has running event loop
Scenario: Login user with more addresses
Given there is user "userMoreAddresses"
When "userMoreAddresses" logs in to bridge
Then bridge response is "OK"
And "userMoreAddresses" is connected
And "userMoreAddresses" has database file
And "userMoreAddresses" has running event loop
@ignore-live
Scenario: Login user with disabled primary address
Given there is user "userDisabledPrimaryAddress"
When "userDisabledPrimaryAddress" logs in to bridge
Then bridge response is "OK"
And "userDisabledPrimaryAddress" is connected
And "userDisabledPrimaryAddress" has database file
And "userDisabledPrimaryAddress" has running event loop
Scenario: Login two users
Given there is user "user"
And there is user "userMoreAddresses"
When "user" logs in to bridge
Then bridge response is "OK"
And "user" is connected
When "userMoreAddresses" logs in to bridge
Then bridge response is "OK"
And "userMoreAddresses" is connected

View File

@ -0,0 +1,35 @@
Feature: Re-login to bridge
Scenario: Re-login with connected user and database file
Given there is connected user "user"
And there is database file for "user"
When "user" logs in to bridge
Then bridge response is "failed to finish login: user is already logged in"
And "user" is connected
And "user" has running event loop
@ignore
Scenario: Re-login with connected user and no database file
Given there is connected user "user"
And there is no database file for "user"
When "user" logs in to bridge
Then bridge response is "failed to finish login: user is already logged in"
And "user" is connected
And "user" has database file
And "user" has running event loop
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 to bridge
Then bridge response is "OK"
And "user" is connected
And "user" has running event loop
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 to bridge
Then bridge response is "OK"
And "user" is connected
And "user" has database file
And "user" has running event loop

View File

@ -0,0 +1,78 @@
Feature: Start bridge
Scenario: Start with connected user, database file and internet connection
Given there is connected user "user"
And there is database file for "user"
When bridge starts
Then "user" is connected
And "user" has loaded store
And "user" has running event loop
And "user" has API auth
Scenario: Start with connected user, database file and no internet connection
Given there is connected user "user"
And there is database file for "user"
And there is no internet connection
When bridge starts
Then "user" is connected
And "user" has loaded store
And "user" has running event loop
And "user" does not have API auth
@ignore
Scenario: Start with connected user, no database file and internet connection
Given there is connected user "user"
And there is no database file for "user"
When bridge starts
Then "user" is connected
And "user" has loaded store
And "user" has running event loop
And "user" has API auth
@ignore
Scenario: Start with connected user, no database file and no internet connection
Given there is connected user "user"
And there is no database file for "user"
And there is no internet connection
When bridge starts
Then "user" is disconnected
And "user" does not have API auth
Scenario: Start with disconnected user, database file and internet connection
Given there is disconnected user "user"
And there is database file for "user"
When bridge starts
Then "user" is disconnected
And "user" has loaded store
And "user" does not have running event loop
And "user" does not have API auth
Scenario: Start with disconnected user, database file and no internet connection
Given there is disconnected user "user"
And there is database file for "user"
And there is no internet connection
When bridge starts
Then "user" is disconnected
And "user" has loaded store
And "user" does not have running event loop
And "user" does not have API auth
@ignore
Scenario: Start with disconnected user, no database file and internet connection
Given there is disconnected user "user"
And there is no database file for "user"
When bridge starts
Then "user" is disconnected
And "user" does not have loaded store
And "user" does not have running event loop
And "user" does not have API auth
@ignore
Scenario: Start with disconnected user, no database file and no internet connection
Given there is disconnected user "user"
And there is no database file for "user"
And there is no internet connection
When bridge starts
Then "user" is disconnected
And "user" does not have loaded store
And "user" does not have running event loop
And "user" does not have API auth

View File

@ -0,0 +1,60 @@
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 bridge 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 bridge 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 |