Skip to content

Commit

Permalink
Merge pull request coralproject#4181 from coralproject/fix/CORL-2775-…
Browse files Browse the repository at this point in the history
…match-ban-modal-design

[CORL-2775] match ban modal design
  • Loading branch information
tessalt authored May 23, 2023
2 parents 671afd7 + 00054e1 commit 656058d
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 140 deletions.
22 changes: 21 additions & 1 deletion src/core/client/admin/components/BanModal.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ $ban-modal-text: var(--palette-text-500);
height: calc(12 * var(--mini-unit));
}

.sitesToggle {
.domainBanHeader {
margin-bottom: var(--spacing-2);
}

.form {
margin-bottom: var(--spacing-3);
}

.banFromHeader {
margin-bottom: var(--spacing-2);
}

.sitesOptions {
margin-bottom: var(--spacing-1);
}

.banDomainOption {
margin: var(--spacing-1) 0;
}

.customizeMessage {
align-self: flex-start;
}
10 changes: 5 additions & 5 deletions src/core/client/admin/components/BanModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ it("creates domain ban for unmoderated domain while updating user ban status", a
const modal = getBanModal(container, user);

const banDomainButton = within(modal).getByLabelText(
`Ban all new accounts on test.com`
`Ban all new commenter accounts from test.com`
);
userEvent.click(banDomainButton);
screen.debug(banDomainButton);
Expand Down Expand Up @@ -173,7 +173,7 @@ test.each(gteOrgMods)(
const modal = getBanModal(container, commenterUser);

const banDomainButton = within(modal).getByLabelText(
`Ban all new accounts on test.com`
`Ban all new commenter accounts from test.com`
);

expect(banDomainButton).toBeInTheDocument();
Expand All @@ -199,7 +199,7 @@ test.each(siteMods)(
const modal = getBanModal(container, commenterUser);

const banDomainButton = within(modal).queryByText(
`Ban all new accounts on test.com`
`Ban all new commenter accounts from test.com`
);

expect(banDomainButton).toBeNull();
Expand Down Expand Up @@ -234,7 +234,7 @@ it("does not display ban domain option for moderated domain", async () => {
const modal = getBanModal(container, user);

const banDomainButton = within(modal).queryByText(
`Ban all new accounts on test.com`
`Ban all new commenter accounts from test.com`
);

expect(banDomainButton).not.toBeInTheDocument();
Expand Down Expand Up @@ -280,7 +280,7 @@ test.each([...PROTECTED_EMAIL_DOMAINS.values()])(
const modal = getBanModal(container, user);

const banDomainButton = within(modal).queryByText(
`Ban all new accounts on test.com`
`Ban all new commenter accounts from test.com`
);

expect(banDomainButton).not.toBeInTheDocument();
Expand Down
Loading

0 comments on commit 656058d

Please sign in to comment.