diff options
Diffstat (limited to '__e2e__/tests')
-rw-r--r-- | __e2e__/tests/home-screen.test.ts | 6 | ||||
-rw-r--r-- | __e2e__/tests/mute-lists.test.ts | 29 | ||||
-rw-r--r-- | __e2e__/tests/profile-screen.test.ts | 12 | ||||
-rw-r--r-- | __e2e__/tests/thread-screen.test.ts | 12 |
4 files changed, 44 insertions, 15 deletions
diff --git a/__e2e__/tests/home-screen.test.ts b/__e2e__/tests/home-screen.test.ts index d0eeb6703..7bad3c19a 100644 --- a/__e2e__/tests/home-screen.test.ts +++ b/__e2e__/tests/home-screen.test.ts @@ -56,12 +56,12 @@ describe('Home screen', () => { .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 swipe between feeds', async () => { diff --git a/__e2e__/tests/mute-lists.test.ts b/__e2e__/tests/mute-lists.test.ts index 9c6980bb3..870e7ced2 100644 --- a/__e2e__/tests/mute-lists.test.ts +++ b/__e2e__/tests/mute-lists.test.ts @@ -138,4 +138,33 @@ describe('Mute lists', () => { await element(by.id('saveBtn')).tap() await expect(element(by.id('listAddRemoveUserModal'))).not.toBeVisible() }) + + it('Can report a mute list', async () => { + await element(by.id('bottomBarHomeBtn')).tap() + // Last test leaves us in the list view so we are going back 1 screen to the lists list screen + await element(by.id('viewHeaderDrawerBtn')).tap() + // then to the moderation screen + await element(by.id('viewHeaderDrawerBtn')).tap() + // then to the home screen + await element(by.id('viewHeaderDrawerBtn')).tap() + // then open the drawer to go to settings + await element(by.id('viewHeaderDrawerBtn')).tap() + await element(by.id('menuItemButton-Settings')).tap() + await element(by.id('signOutBtn')).tap() + await expect(element(by.id('signInButton'))).toBeVisible() + await login(service, 'bob.test', 'hunter2') + await element(by.id('bottomBarSearchBtn')).tap() + await element(by.id('searchTextInput')).typeText('alice') + await element(by.id('searchAutoCompleteResult-alice.test')).tap() + await element(by.id('selector-3')).tap() + await element(by.id('list-Bad Ppl')).tap() + await element(by.id('reportListBtn')).tap() + await expect(element(by.id('reportModal'))).toBeVisible() + await expect(element(by.text('Report List'))).toBeVisible() + await element( + by.id('reportReasonRadios-com.atproto.moderation.defs#reasonRude'), + ).tap() + await element(by.id('sendReportBtn')).tap() + await expect(element(by.id('reportModal'))).not.toBeVisible() + }) }) diff --git a/__e2e__/tests/profile-screen.test.ts b/__e2e__/tests/profile-screen.test.ts index 59b7326b6..da7980094 100644 --- a/__e2e__/tests/profile-screen.test.ts +++ b/__e2e__/tests/profile-screen.test.ts @@ -125,12 +125,12 @@ describe('Profile screen', () => { it('Can report another user', async () => { await element(by.id('profileHeaderDropdownBtn')).tap() await element(by.text('Report Account')).tap() - await expect(element(by.id('reportAccountModal'))).toBeVisible() + await expect(element(by.id('reportModal'))).toBeVisible() await element( - by.id('reportAccountRadios-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('reportAccountModal'))).not.toBeVisible() + await expect(element(by.id('reportModal'))).not.toBeVisible() }) it('Can like posts', async () => { @@ -173,11 +173,11 @@ describe('Profile screen', () => { const posts = by.id('feedItem-by-bob.test') await element(by.id('postDropdownBtn').withAncestor(posts)).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() }) }) 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() }) }) |