Prompt users to set up recovery (#30075)
* Show indicator in settings dialog when user doesn't have recovery set up * Update settings headers to use red dot for recommended settings * update recovery setup toast and remember if the user dismisses it * update playwright snapshots * use typed event emitters * reverse logic for the account data flag * fix comment and type
This commit is contained in:
@@ -104,12 +104,14 @@ describe("<ChangeRecoveryKey />", () => {
|
||||
expect(screen.getByText("The recovery key you entered is not correct.")).toBeInTheDocument();
|
||||
expect(asFragment()).toMatchSnapshot();
|
||||
|
||||
const setAccountDataSpy = jest.spyOn(matrixClient, "setAccountData");
|
||||
await userEvent.clear(input);
|
||||
// If the user enters the correct recovery key, the finish button should be enabled
|
||||
await userEvent.type(input, "encoded private key");
|
||||
await waitFor(() => expect(finishButton).not.toHaveAttribute("aria-disabled", "true"));
|
||||
|
||||
await user.click(finishButton);
|
||||
expect(setAccountDataSpy).toHaveBeenCalledWith("io.element.recovery", { enabled: true });
|
||||
expect(onFinish).toHaveBeenCalledWith();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user