OIDC settings tweaks (#28787)
* Hide 3pid account settings if account is managed externally As they would be disabled and just confusing otherwise Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Show manage device button instead of sign out button for other devices in OIDC mode Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Tidy up Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Fix tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9d5141cfaa
commit
16d2cccb73
@@ -1234,34 +1234,13 @@ describe("<SessionManagerTab />", () => {
|
||||
toggleDeviceDetails(getByTestId, alicesMobileDevice.device_id);
|
||||
|
||||
const deviceDetails = getByTestId(`device-detail-${alicesMobileDevice.device_id}`);
|
||||
const signOutButton = deviceDetails.querySelector(
|
||||
const manageDeviceButton = deviceDetails.querySelector(
|
||||
'[data-testid="device-detail-sign-out-cta"]',
|
||||
) as Element;
|
||||
fireEvent.click(signOutButton);
|
||||
|
||||
await screen.findByRole("dialog");
|
||||
expect(
|
||||
screen.getByText(
|
||||
"You will be redirected to your server's authentication provider to complete sign out.",
|
||||
),
|
||||
).toBeInTheDocument();
|
||||
// correct link to auth provider
|
||||
expect(screen.getByText("Continue")).toHaveAttribute(
|
||||
expect(manageDeviceButton).toHaveAttribute(
|
||||
"href",
|
||||
`https://issuer.org/account?action=session_end&device_id=${alicesMobileDevice.device_id}`,
|
||||
`https://issuer.org/account?action=org.matrix.session_view&device_id=${alicesMobileDevice.device_id}`,
|
||||
);
|
||||
|
||||
// go to the link
|
||||
fireEvent.click(screen.getByText("Continue"));
|
||||
await flushPromises();
|
||||
|
||||
// come back from the link and close the modal
|
||||
fireEvent.click(screen.getByText("Close"));
|
||||
|
||||
await flushPromises();
|
||||
|
||||
// devices were refreshed
|
||||
expect(mockClient.getDevices).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not allow removing multiple devices at once", async () => {
|
||||
|
||||
Reference in New Issue
Block a user