From ba5238d86aa896e5dead8cd7c7515f2af5295866 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 11 Jul 2019 15:01:56 -0600 Subject: [PATCH] Finally fix tests --- src/components/views/auth/InteractiveAuthEntryComponents.js | 2 +- test/components/views/dialogs/InteractiveAuthDialog-test.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/views/auth/InteractiveAuthEntryComponents.js b/src/components/views/auth/InteractiveAuthEntryComponents.js index f5f61d57cd..6e2c31fc55 100644 --- a/src/components/views/auth/InteractiveAuthEntryComponents.js +++ b/src/components/views/auth/InteractiveAuthEntryComponents.js @@ -96,7 +96,7 @@ export const PasswordAuthEntry = React.createClass({ user: this.props.matrixClient.credentials.userId, identifier: { type: "m.id.user", - user: this.props.matrixClient.getUserId(), + user: this.props.matrixClient.credentials.userId, }, password: this.state.password, }); diff --git a/test/components/views/dialogs/InteractiveAuthDialog-test.js b/test/components/views/dialogs/InteractiveAuthDialog-test.js index aa757ce03e..95f76dfd3e 100644 --- a/test/components/views/dialogs/InteractiveAuthDialog-test.js +++ b/test/components/views/dialogs/InteractiveAuthDialog-test.js @@ -97,11 +97,10 @@ describe('InteractiveAuthDialog', function() { ReactTestUtils.Simulate.submit(formNode, {}); expect(doRequest.callCount).toEqual(1); - expect(doRequest.calledWithExactly({ + expect(doRequest.calledWithMatch({ session: "sess", type: "m.login.password", password: "s3kr3t", - user: "@user:id", // TODO: Remove this. See https://github.com/vector-im/riot-web/issues/10312 identifier: { type: "m.id.user", user: "@user:id",