mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-07 15:08:24 +00:00
Change 'Verify' to 'Continue' in verify this device toast (#32813)
This commit is contained in:
@@ -84,7 +84,7 @@ const getSetupCaption = (state: DeviceStateForToast): string => {
|
|||||||
case "set_up_recovery":
|
case "set_up_recovery":
|
||||||
return _t("action|continue");
|
return _t("action|continue");
|
||||||
case "verify_this_session":
|
case "verify_this_session":
|
||||||
return _t("action|verify");
|
return _t("action|continue");
|
||||||
case "key_storage_out_of_sync":
|
case "key_storage_out_of_sync":
|
||||||
return _t("encryption|enter_recovery_key");
|
return _t("encryption|enter_recovery_key");
|
||||||
case "turn_on_key_storage":
|
case "turn_on_key_storage":
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ describe("SetupEncryptionToast", () => {
|
|||||||
|
|
||||||
await expect(screen.findByText("Verify this session")).resolves.toBeInTheDocument();
|
await expect(screen.findByText("Verify this session")).resolves.toBeInTheDocument();
|
||||||
await expect(screen.findByRole("button", { name: "Later" })).resolves.toBeInTheDocument();
|
await expect(screen.findByRole("button", { name: "Later" })).resolves.toBeInTheDocument();
|
||||||
await expect(screen.findByRole("button", { name: "Verify" })).resolves.toBeInTheDocument();
|
await expect(screen.findByRole("button", { name: "Continue" })).resolves.toBeInTheDocument();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should dismiss the toast when 'Later' button clicked, and remember it", async () => {
|
it("should dismiss the toast when 'Later' button clicked, and remember it", async () => {
|
||||||
@@ -354,14 +354,14 @@ describe("SetupEncryptionToast", () => {
|
|||||||
expect(DeviceListener.sharedInstance().dismissEncryptionSetup).toHaveBeenCalled();
|
expect(DeviceListener.sharedInstance().dismissEncryptionSetup).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should open the verification dialog when 'Verify' clicked", async () => {
|
it("should open the verification dialog when 'Continue' clicked", async () => {
|
||||||
jest.spyOn(Modal, "createDialog");
|
jest.spyOn(Modal, "createDialog");
|
||||||
|
|
||||||
// When we show the toast, and click Verify
|
// When we show the toast, and click Verify
|
||||||
act(() => showToast("verify_this_session"));
|
act(() => showToast("verify_this_session"));
|
||||||
|
|
||||||
const user = userEvent.setup();
|
const user = userEvent.setup();
|
||||||
await user.click(await screen.findByRole("button", { name: "Verify" }));
|
await user.click(await screen.findByRole("button", { name: "Continue" }));
|
||||||
|
|
||||||
// Then the dialog was opened
|
// Then the dialog was opened
|
||||||
expect(Modal.createDialog).toHaveBeenCalledWith(SetupEncryptionDialog, {}, undefined, false, true);
|
expect(Modal.createDialog).toHaveBeenCalledWith(SetupEncryptionDialog, {}, undefined, false, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user