Other: fIxed GUI Tester to comply with latest gRPC changes.

This commit is contained in:
Xavier Michelon
2023-01-06 07:20:53 +01:00
parent 16aaa1b050
commit 700836aea0
10 changed files with 128 additions and 125 deletions

View File

@ -71,7 +71,7 @@ void UsersTab::onAddUserButton() {
users_.append(user);
GRPCService &grpc = app().grpc();
if (grpc.isStreaming()) {
grpc.sendEvent(newLoginFinishedEvent(user->id()));
grpc.sendEvent(newLoginFinishedEvent(user->id(), false));
}
}
@ -171,6 +171,16 @@ bridgepp::SPUser UsersTab::userWithID(QString const &userID) {
}
//****************************************************************************************************************************************************
/// \param[in] username The username.
/// \return The user with the given username.
/// \return A null pointer if the user is not in the list.
//****************************************************************************************************************************************************
bridgepp::SPUser UsersTab::userWithUsername(QString const &username) {
return users_.userWithUsername(username);
}
//****************************************************************************************************************************************************
/// \return true iff the next login attempt should trigger a username/password error.
//****************************************************************************************************************************************************
@ -235,14 +245,6 @@ bool UsersTab::nextUserTwoPasswordsAbort() const {
}
//****************************************************************************************************************************************************
/// \return true iff the next login attempt should trigger a 2nd password error with abort.
//****************************************************************************************************************************************************
bool UsersTab::nextUserAlreadyLoggedIn() const {
return ui_.checkAlreadyLoggedIn->isChecked();
}
//****************************************************************************************************************************************************
/// \return the message for the username/password error.
//****************************************************************************************************************************************************

View File

@ -38,6 +38,7 @@ public: // member functions.
UsersTab &operator=(UsersTab &&) = delete; ///< Disabled move assignment operator.
UserTable &userTable(); ///< Returns a reference to the user table.
bridgepp::SPUser userWithID(QString const &userID); ///< Get the user with the given ID.
bridgepp::SPUser userWithUsername(QString const &username); ///< Get the user with the given username.
bool nextUserUsernamePasswordError() const; ///< Check if next user login should trigger a username/password error.
bool nextUserFreeUserError() const; ///< Check if next user login should trigger a Free user error.
bool nextUserTFARequired() const; ///< Check if next user login should requires 2FA.
@ -46,7 +47,6 @@ public: // member functions.
bool nextUserTwoPasswordsRequired() const; ///< Check if next user login requires 2nd password
bool nextUserTwoPasswordsError() const; ///< Check if next user login should trigger 2nd password error.
bool nextUserTwoPasswordsAbort() const; ///< Check if next user login should trigger 2nd password abort.
bool nextUserAlreadyLoggedIn() const; ///< Check if next user login should report user as already logged in.
QString usernamePasswordErrorMessage() const; ///< Return the username password error message.
public slots:

View File

@ -170,13 +170,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkAlreadyLoggedIn">
<property name="text">
<string>Already logged in</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>