Skip to content
Snippets Groups Projects
Unverified Commit f9143d32 authored by Maz Ameli's avatar Maz Ameli Committed by GitHub
Browse files

Grammar and microcopy tweaks to Unsubscribe modal (#18040)

* grammar and microcopy tweaks

* update cypress test

* fix another test

* update test again
parent 571488b0
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ const UnsubscribeUserForm = ({ user, onUnsubscribe, onClose }) => {
return (
<ModalContent
title={t`Unsubscribe from all subscriptions / alerts`}
title={t`Unsubscribe ${user.common_name} from all subscriptions and alerts?`}
footer={[
error ? <FormMessage key="message" formError={error} /> : null,
<Button key="cancel" onClick={onClose}>{t`Cancel`}</Button>,
......@@ -34,15 +34,15 @@ const UnsubscribeUserForm = ({ user, onUnsubscribe, onClose }) => {
key="submit"
danger
onClick={handleConfirmClick}
>{t`Confirm`}</Button>,
>{t`Unsubscribe`}</Button>,
]}
onClose={onClose}
>
<ModalMessage>
{t`This will delete any dashboard subscriptions or alerts that ${user.common_name} has created and remove them as a recipient from other people’s subscriptions or alerts.`}
{t`This will delete any dashboard subscriptions or alerts ${user.common_name} has created, and remove them as a recipient from any other subscriptions or alerts.`}
</ModalMessage>
<ModalMessage>
{t`This does not effect email distribution lists that are managed outside of Metabase.`}
{t`This does not affect email distribution lists that are managed outside of Metabase.`}
</ModalMessage>
</ModalContent>
);
......
......@@ -21,7 +21,7 @@ describe("UnsubscribeUserForm", () => {
/>,
);
screen.getByText("Confirm").click();
screen.getByText("Unsubscribe").click();
waitFor(() => {
expect(onUnsubscribe).toHaveBeenCalled();
......@@ -43,7 +43,7 @@ describe("UnsubscribeUserForm", () => {
/>,
);
screen.getByText("Confirm").click();
screen.getByText("Unsubscribe").click();
waitFor(() => {
expect(onUnsubscribe).toHaveBeenCalled();
......
......@@ -313,9 +313,9 @@ describeWithToken("scenarios > admin > people", () => {
});
modal().within(() => {
cy.findByText(fullName, { exact: false });
cy.findByText("Confirm").click();
cy.findByText("Confirm").should("not.exist");
cy.findAllByText(fullName, { exact: false });
cy.findByText("Unsubscribe").click();
cy.findByText("Unsubscribe").should("not.exist");
});
cy.visit("/account/notifications");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment