mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
Support password reset workflow on Webatrice (#4445)
* Support password reset workflow. Also fix issue where a user would be disconnected "randomly" if they had a failed login, then successful one. Refactored a bit on Status Labels since they weren't really necessary and added complexity. * Disconnect in default cases where we don't know what to do, but shouldn't stay connected to the server
This commit is contained in:
parent
013bb8269f
commit
ac300b0b6d
10 changed files with 189 additions and 77 deletions
|
|
@ -51,7 +51,6 @@ describe('SessionCommands', () => {
|
|||
SessionCommands.connect(options, WebSocketConnectReason.REGISTER);
|
||||
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalled();
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalledWith(StatusEnum.REGISTERING, expect.any(String));
|
||||
|
||||
expect(webClient.connect).toHaveBeenCalled();
|
||||
expect(webClient.connect).toHaveBeenCalledWith({ ...options, reason: WebSocketConnectReason.REGISTER });
|
||||
|
|
@ -62,7 +61,6 @@ describe('SessionCommands', () => {
|
|||
SessionCommands.connect(options, WebSocketConnectReason.ACTIVATE_ACCOUNT);
|
||||
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalled();
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalledWith(StatusEnum.ACTIVATING_ACCOUNT, expect.any(String));
|
||||
|
||||
expect(webClient.connect).toHaveBeenCalled();
|
||||
expect(webClient.connect).toHaveBeenCalledWith({ ...options, reason: WebSocketConnectReason.ACTIVATE_ACCOUNT });
|
||||
|
|
@ -138,7 +136,7 @@ describe('SessionCommands', () => {
|
|||
|
||||
expect(SessionCommands.listUsers).toHaveBeenCalled();
|
||||
expect(SessionCommands.listRooms).toHaveBeenCalled();
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalledWith(StatusEnum.LOGGEDIN, 'Logged in.');
|
||||
expect(SessionCommands.updateStatus).toHaveBeenCalledWith(StatusEnum.LOGGED_IN, 'Logged in.');
|
||||
});
|
||||
|
||||
it('RespClientUpdateRequired should update status', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue