* Add test case for null identity_providers for SSO
* Fix typing for identity_providers
* Make null idp explicit and handle in analytics
* chore: whitespace fix
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
(cherry picked from commit 60cd740b66
)
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
This commit is contained in:
parent
c0bac337de
commit
b66510a90b
3 changed files with 18 additions and 3 deletions
|
@ -146,4 +146,19 @@ describe('Login', function() {
|
|||
const ssoButtons = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, "mx_SSOButton");
|
||||
expect(ssoButtons.length).toBe(3);
|
||||
});
|
||||
|
||||
it("should show single SSO button if identity_providers is null", async () => {
|
||||
mockClient.loginFlows.mockResolvedValue({
|
||||
flows: [{
|
||||
"type": "m.login.sso",
|
||||
}],
|
||||
});
|
||||
|
||||
const root = render();
|
||||
|
||||
await flushPromises();
|
||||
|
||||
const ssoButtons = ReactTestUtils.scryRenderedDOMComponentsWithClass(root, "mx_SSOButton");
|
||||
expect(ssoButtons.length).toBe(1);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue