forked from Silverfish/proton-bridge
GODT-1817: Delete old tests that are already ported or handled in Gluon
This commit is contained in:
@ -1,92 +0,0 @@
|
||||
Feature: IMAP auth
|
||||
Scenario: Authenticates successfully
|
||||
Given there is connected user "user"
|
||||
When IMAP client authenticates "user"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with bad password
|
||||
Given there is connected user "user"
|
||||
When IMAP client authenticates "user" with bad password
|
||||
Then IMAP response is "IMAP error: NO backend/credentials: incorrect password"
|
||||
|
||||
@ignore-live-auth
|
||||
Scenario: Authenticates with disconnected user
|
||||
Given there is disconnected user "user"
|
||||
When IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO account is logged out, use the app to login again"
|
||||
|
||||
@ignore-live-auth
|
||||
Scenario: Authenticates with connected user that was loaded without internet
|
||||
Given there is user "user" which just logged in
|
||||
And there is no internet connection
|
||||
When bridge starts
|
||||
And the internet connection is restored
|
||||
And the event loop of "user" loops once
|
||||
And IMAP client authenticates "user"
|
||||
# Problems during IMAP auth could lead to the user being disconnected.
|
||||
# This could take a few milliseconds because it happens async in separate goroutines.
|
||||
# We wait enough time for that to happen, then check that it didn't happen (user should remain connected).
|
||||
And 2 seconds pass
|
||||
Then "user" is connected
|
||||
|
||||
@ignore-live-auth
|
||||
Scenario: Authenticates with freshly logged-out user
|
||||
Given there is user "user" which just logged in
|
||||
When "user" logs out
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO account is logged out, use the app to login again"
|
||||
|
||||
@ignore-live-auth
|
||||
Scenario: Authenticates user which was re-logged in
|
||||
Given there is user "user" which just logged in
|
||||
When "user" logs out
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "IMAP error: NO account is logged out, use the app to login again"
|
||||
When "user" logs in
|
||||
And IMAP client authenticates "user"
|
||||
Then IMAP response is "OK"
|
||||
When IMAP client selects "INBOX"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with no user
|
||||
When IMAP client authenticates with username "user@pm.me" and password "bridgepassword"
|
||||
Then IMAP response is "IMAP error: NO user user@pm.me not found"
|
||||
|
||||
Scenario: Authenticates with capital letter
|
||||
Given there is connected user "userAddressWithCapitalLetter"
|
||||
When IMAP client authenticates "userAddressWithCapitalLetter"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - primary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "primary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - secondary one
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "secondary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates with more addresses - disabled address
|
||||
Given there is connected user "userMoreAddresses"
|
||||
When IMAP client authenticates "userMoreAddresses" with address "disabled"
|
||||
Then IMAP response is "IMAP error: NO user .* not found"
|
||||
|
||||
@ignore-live
|
||||
Scenario: Authenticates with secondary address of account with disabled primary address
|
||||
Given there is connected user "userDisabledPrimaryAddress"
|
||||
When IMAP client authenticates "userDisabledPrimaryAddress" with address "secondary"
|
||||
Then IMAP response is "OK"
|
||||
|
||||
Scenario: Authenticates two users
|
||||
Given there is connected user "user"
|
||||
And there is connected user "userMoreAddresses"
|
||||
When IMAP client "imap1" authenticates "user"
|
||||
Then IMAP response to "imap1" is "OK"
|
||||
When IMAP client "imap2" authenticates "userMoreAddresses" with address "primary"
|
||||
Then IMAP response to "imap2" is "OK"
|
||||
|
||||
Scenario: Logs out user
|
||||
Given there is connected user "user"
|
||||
When IMAP client logs out
|
||||
Then IMAP response is "OK"
|
||||
@ -1,90 +0,0 @@
|
||||
Feature: IMAP search messages
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
Given there are messages in mailbox "INBOX" for "user"
|
||||
| from | to | cc | subject | read | starred | deleted | body |
|
||||
| john.doe@email.com | user@pm.me | | foo | false | false | false | hello |
|
||||
| jane.doe@email.com | user@pm.me | name@pm.me | bar | true | true | false | world |
|
||||
| jane.doe@email.com | name@pm.me | | baz | true | false | true | bye |
|
||||
And there is IMAP client logged in as "user"
|
||||
And there is IMAP client selected in "INBOX"
|
||||
|
||||
Scenario: Search by Sequence numbers
|
||||
When IMAP client searches for "1"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1[^0-9]*$"
|
||||
|
||||
Scenario: Search by UID
|
||||
When IMAP client searches for "UID 2"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 2[^0-9]*$"
|
||||
|
||||
Scenario: Search by Sequence numbers and UID
|
||||
When IMAP client searches for "1 UID 1"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1[^0-9]*$"
|
||||
|
||||
Scenario: Search by Sequence numbers and UID without match
|
||||
When IMAP client searches for "1 UID 2"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH[^0-9]*$"
|
||||
|
||||
Scenario: Search by Subject
|
||||
When IMAP client searches for "SUBJECT foo"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1[^0-9]*$"
|
||||
|
||||
Scenario: Search by From
|
||||
When IMAP client searches for "FROM jane.doe@email.com"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 2 3[^0-9]*$"
|
||||
|
||||
Scenario: Search by To
|
||||
When IMAP client searches for "TO user@pm.me"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1 2[^0-9]*$"
|
||||
|
||||
Scenario: Search by CC
|
||||
When IMAP client searches for "CC name@pm.me"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 2[^0-9]*$"
|
||||
|
||||
Scenario: Search flagged messages
|
||||
When IMAP client searches for "FLAGGED"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 2[^0-9]*$"
|
||||
|
||||
Scenario: Search not flagged messages
|
||||
When IMAP client searches for "UNFLAGGED"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1 3[^0-9]*$"
|
||||
|
||||
Scenario: Search seen messages
|
||||
When IMAP client searches for "SEEN"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 2 3[^0-9]*$"
|
||||
|
||||
Scenario: Search unseen messages
|
||||
When IMAP client searches for "UNSEEN"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1[^0-9]*$"
|
||||
|
||||
Scenario: Search deleted messages
|
||||
When IMAP client searches for "DELETED"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 3[^0-9]*$"
|
||||
|
||||
Scenario: Search undeleted messages
|
||||
When IMAP client searches for "UNDELETED"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1 2[^0-9]*$"
|
||||
|
||||
Scenario: Search recent messages
|
||||
When IMAP client searches for "RECENT"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 1 2 3[^0-9]*$"
|
||||
|
||||
Scenario: Search by more criterias
|
||||
When IMAP client searches for "SUBJECT baz TO name@pm.me SEEN UNFLAGGED"
|
||||
Then IMAP response is "OK"
|
||||
And IMAP response contains "SEARCH 3[^0-9]*$"
|
||||
@ -1,26 +0,0 @@
|
||||
Feature: User agent
|
||||
Background:
|
||||
Given there is connected user "user"
|
||||
|
||||
Scenario: Get user agent
|
||||
Given there is IMAP client logged in as "user"
|
||||
Then API user-agent is "UnknownClient/0.0.1 ([GOOS])"
|
||||
When IMAP client sends ID with argument:
|
||||
"""
|
||||
"name" "Foo" "version" "1.4.0"
|
||||
"""
|
||||
Then API user-agent is "Foo/1.4.0 ([GOOS])"
|
||||
|
||||
Scenario: Update user agent
|
||||
Given there is IMAP client logged in as "user"
|
||||
Then API user-agent is "UnknownClient/0.0.1 ([GOOS])"
|
||||
When IMAP client sends ID with argument:
|
||||
"""
|
||||
"name" "Foo" "version" "1.4.0"
|
||||
"""
|
||||
Then API user-agent is "Foo/1.4.0 ([GOOS])"
|
||||
When IMAP client sends ID with argument:
|
||||
"""
|
||||
"name" "Bar" "version" "4.2.0"
|
||||
"""
|
||||
Then API user-agent is "Bar/4.2.0 ([GOOS])"
|
||||
Reference in New Issue
Block a user