mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
GODT-2003: introduces 3 phases user state (SignedOut/Locked/Connected)
WIP: introduced UserState enum in GUI and implemented logic.
This commit is contained in:
@ -24,6 +24,7 @@ import (
|
||||
"net/mail"
|
||||
|
||||
"github.com/ProtonMail/gopenpgp/v2/crypto"
|
||||
"github.com/ProtonMail/proton-bridge/v2/internal/bridge"
|
||||
"github.com/bradenaw/juniper/iterator"
|
||||
"github.com/bradenaw/juniper/xslices"
|
||||
"github.com/cucumber/godog"
|
||||
@ -306,7 +307,7 @@ func (s *scenario) userIsListedAndConnected(username string) error {
|
||||
return errors.New("user not listed")
|
||||
}
|
||||
|
||||
if !user.Connected {
|
||||
if user.State != bridge.Connected {
|
||||
return errors.New("user not connected")
|
||||
}
|
||||
|
||||
@ -329,7 +330,7 @@ func (s *scenario) userIsListedButNotConnected(username string) error {
|
||||
return errors.New("user not listed")
|
||||
}
|
||||
|
||||
if user.Connected {
|
||||
if user.State == bridge.Connected {
|
||||
return errors.New("user connected")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user