From abbc6543f423efdcd26f44666d9847ecd70779dc Mon Sep 17 00:00:00 2001 From: Foysal Ahamed Date: Tue, 15 Aug 2023 23:32:06 +0200 Subject: :sparkles: Repurpose report post modal and re-use for list reporting (#1070) * :sparkles: Repupose report post modal and re-use for list reporting * :sparkles: Allow reporting a feed generator * :sparkles: :recycle: Refactor report modal into one shared component for reporting different collections * :white_check_mark: Adjust report option selector in tests * :white_check_mark: Add test for list reporting * :recycle: :sparkles: Refactor reason options and add options for list and feedgen * :broom: Cleanup remaining todo * Fix to mutelist react keys * Fix regression from rebase * Improve customfeed mobile header --------- Co-authored-by: Paul Frazee --- __e2e__/tests/thread-screen.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '__e2e__/tests/thread-screen.test.ts') diff --git a/__e2e__/tests/thread-screen.test.ts b/__e2e__/tests/thread-screen.test.ts index 081282a36..0964988e9 100644 --- a/__e2e__/tests/thread-screen.test.ts +++ b/__e2e__/tests/thread-screen.test.ts @@ -105,23 +105,23 @@ describe('Thread screen', () => { const post = by.id('postThreadItem-by-bob.test') await element(by.id('postDropdownBtn').withAncestor(post)).atIndex(0).tap() await element(by.text('Report post')).tap() - await expect(element(by.id('reportPostModal'))).toBeVisible() + await expect(element(by.id('reportModal'))).toBeVisible() await element( - by.id('reportPostRadios-com.atproto.moderation.defs#reasonSpam'), + by.id('reportReasonRadios-com.atproto.moderation.defs#reasonSpam'), ).tap() await element(by.id('sendReportBtn')).tap() - await expect(element(by.id('reportPostModal'))).not.toBeVisible() + await expect(element(by.id('reportModal'))).not.toBeVisible() }) it('Can report a reply post', async () => { const post = by.id('postThreadItem-by-carla.test') await element(by.id('postDropdownBtn').withAncestor(post)).atIndex(0).tap() await element(by.text('Report post')).tap() - await expect(element(by.id('reportPostModal'))).toBeVisible() + await expect(element(by.id('reportModal'))).toBeVisible() await element( - by.id('reportPostRadios-com.atproto.moderation.defs#reasonSpam'), + by.id('reportReasonRadios-com.atproto.moderation.defs#reasonSpam'), ).tap() await element(by.id('sendReportBtn')).tap() - await expect(element(by.id('reportPostModal'))).not.toBeVisible() + await expect(element(by.id('reportModal'))).not.toBeVisible() }) }) -- cgit 1.4.1