GODT-1645: Split scenarios for live testing.

This commit is contained in:
Jakub
2022-08-29 17:33:35 +02:00
committed by Romain Le Jeune
parent 73f8811a4b
commit f960a3ae38
6 changed files with 27 additions and 2 deletions

View File

@ -25,7 +25,11 @@ test-bridge: check-godog
test-live: test-live-bridge test-live-ie
test-live-bridge: FEATURES ?= features
test-live-bridge: check-godog
TEST_ENV=live godog --tags="~@ignore && ~@ignore-live" $(FEATURES)
TEST_ENV=live godog --tags="~@ignore && ~@ignore-live && ~@ignore-live-auth" $(FEATURES)
test-live-bridge-auth: check-godog
TEST_ENV=live godog --tags="@ignore-live-auth" $(FEATURES)
# Doesn't work in parallel!
# Provide TEST_ACCOUNTS with your accounts.

View File

@ -62,7 +62,7 @@ func (ctx *TestContext) LoginUser(username string, password, mailboxPassword []b
ctx.addCleanupChecked(
func() error {
if os.Getenv(EnvName) == EnvLive {
logrus.Warn("Pausing user.Logout by two minutes to not hit issues with too many login attempts.")
logrus.Warn("Pausing user.Logout by 2 minutes to not hit issues with too many login attempts.")
time.Sleep(2 * time.Minute)
}
return user.Logout()

View File

@ -9,11 +9,13 @@ Feature: IMAP auth
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
@ -27,12 +29,14 @@ Feature: IMAP auth
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

View File

@ -1,34 +1,43 @@
Feature: Delete user
@ignore-live-auth
Scenario: Deleting connected user
Given there is user "user" which just logged in
When user deletes "user"
Then last response is "OK"
And "user" has database file
@ignore-live-auth
Scenario: Deleting connected user with cache
Given there is user "user" which just logged in
When user deletes "user" with cache
Then last response is "OK"
And "user" does not have database file
@ignore-live-auth
Scenario: Deleting connected user without database file
Given there is user "user" which just logged in
And there is no database file for "user"
When user deletes "user" with cache
Then last response is "OK"
# THIS IS BLOCKED BY ANTI-ABUSE
@ignore-live
Scenario: Deleting disconnected user
Given there is disconnected user "user"
When user deletes "user"
Then last response is "OK"
And "user" has database file
# THIS IS BLOCKED BY ANTI-ABUSE
@ignore-live
Scenario: Deleting disconnected user with cache
Given there is disconnected user "user"
When user deletes "user" with cache
Then last response is "OK"
And "user" does not have database file
# THIS IS BLOCKED BY ANTI-ABUSE
@ignore-live
Scenario: Deleting disconnected user without database file
Given there is disconnected user "user"
And there is no database file for "user"

View File

@ -1,4 +1,5 @@
Feature: Login for the first time
@ignore-live-auth
Scenario: Normal login
Given there is user "user"
When "user" logs in
@ -19,6 +20,7 @@ Feature: Login for the first time
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
@ -34,6 +36,7 @@ Feature: Login for the first time
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
@ -43,6 +46,7 @@ Feature: Login for the first time
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
@ -62,6 +66,7 @@ Feature: Login for the first time
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"

View File

@ -1,4 +1,5 @@
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"
@ -18,6 +19,7 @@ Feature: Re-login
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"
@ -27,6 +29,7 @@ Feature: Re-login
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"