mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-09 04:36:02 -05:00
Inappropriate nickname report help
This commit is contained in:
@@ -66,6 +66,8 @@ class ReportUserDialog {
|
||||
this.locators = {
|
||||
matchIdInput: page.getByLabel("Match ID"),
|
||||
sentToast: page.getByText("Report sent to the staff"),
|
||||
submitButton: page.getByTestId("submit-button"),
|
||||
nicknameInstructions: page.getByTestId("nickname-report-instructions"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,28 @@ test.describe("User report", () => {
|
||||
await expect(adminPage.text(description)).toBeVisible();
|
||||
});
|
||||
|
||||
test("points elsewhere instead of reporting an inappropriate nickname", async ({
|
||||
page,
|
||||
factories,
|
||||
}) => {
|
||||
const reporter = await factories.UserFactory.create();
|
||||
await factories.LFGPostFactory.create({ authorId: NZAP_TEST_ID });
|
||||
|
||||
await impersonate(page, reporter.id);
|
||||
|
||||
const lfg = new LFGPage(page);
|
||||
await lfg.goto();
|
||||
const card = await lfg.openUserCard("N-ZAP");
|
||||
const reportDialog = await card.openReportDialog();
|
||||
|
||||
await expect(reportDialog.locators.submitButton).toBeVisible();
|
||||
|
||||
await reportDialog.form.select("category", "INAPPROPRIATE_NICKNAME");
|
||||
|
||||
await expect(reportDialog.locators.nicknameInstructions).toBeVisible();
|
||||
await expect(reportDialog.locators.submitButton).not.toBeVisible();
|
||||
});
|
||||
|
||||
test("prefills the match id when reporting from a match page", async ({
|
||||
page,
|
||||
factories,
|
||||
|
||||
Reference in New Issue
Block a user