Hide recovery key when prompting for verification (#30471)
* Separate security_key_title from security_key_label since they differ in designs See https://www.figma.com/design/ZodBLtGnKmRTGJo5SGLnH3/ER-137--Excluding-Insecure-Devices?node-id=92-8818&t=02JILBe2n7sx7ljU-1 In parallel with this, I have updated security_key_title in localazy. * Hide recovery key on entry screen after login
This commit is contained in:
@@ -31,7 +31,7 @@ describe("AccessSecretStorageDialog", () => {
|
||||
|
||||
const enterRecoveryKey = async (valueToEnter: string = recoveryKey): Promise<void> => {
|
||||
await act(async () => {
|
||||
fireEvent.change(screen.getByRole("textbox"), {
|
||||
fireEvent.change(screen.getByTitle("Recovery key"), {
|
||||
target: {
|
||||
value: valueToEnter,
|
||||
},
|
||||
@@ -67,7 +67,7 @@ describe("AccessSecretStorageDialog", () => {
|
||||
renderComponent({ onFinished, checkPrivateKey });
|
||||
|
||||
// check that the input field is focused
|
||||
expect(screen.getByRole("textbox")).toHaveFocus();
|
||||
expect(screen.getByTitle("Recovery key")).toHaveFocus();
|
||||
|
||||
await enterRecoveryKey();
|
||||
await submitDialog();
|
||||
@@ -111,7 +111,7 @@ describe("AccessSecretStorageDialog", () => {
|
||||
renderComponent({ checkPrivateKey, keyInfo });
|
||||
|
||||
await enterRecoveryKey();
|
||||
expect(screen.getByRole("textbox")).toHaveValue(recoveryKey);
|
||||
expect(screen.getByTitle("Recovery key")).toHaveValue(recoveryKey);
|
||||
|
||||
await expect(screen.findByText("The recovery key you entered is not correct.")).resolves.toBeInTheDocument();
|
||||
expect(screen.getByText("Continue")).toHaveAttribute("aria-disabled", "true");
|
||||
|
||||
Reference in New Issue
Block a user