diff options
author | Paul Frazee <pfrazee@gmail.com> | 2024-05-13 08:43:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 08:43:13 -0700 |
commit | d49b93dc7e77962c143e4798344c8e35ab8a637e (patch) | |
tree | b893fa4388413cbd1cf139c4cd848c91d1cc13b0 /__e2e__/tests/thread-muting.test.ts | |
parent | 5cd4ac3a34f629945ccb86e451fbf20dd06e6863 (diff) | |
download | voidsky-d49b93dc7e77962c143e4798344c8e35ab8a637e.tar.zst |
Replace e2e tests with Maestro (#3983)
* Setup maestro tests and convert some initial tests * Remove detox * Replace all tests with maestro
Diffstat (limited to '__e2e__/tests/thread-muting.test.ts')
-rw-r--r-- | __e2e__/tests/thread-muting.test.ts | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/__e2e__/tests/thread-muting.test.ts b/__e2e__/tests/thread-muting.test.ts deleted file mode 100644 index ae62f93dc..000000000 --- a/__e2e__/tests/thread-muting.test.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* eslint-env detox/detox */ - -import {describe, beforeAll, it} from '@jest/globals' -import {expect} from 'detox' -import {openApp, loginAsAlice, loginAsBob, createServer} from '../util' - -describe('Thread muting', () => { - beforeAll(async () => { - await createServer('?users&follows') - await openApp({permissions: {notifications: 'YES'}}) - }) - - it('Login, create a thread, and log out', async () => { - await loginAsAlice() - await element(by.id('homeScreenFeedTabs-Following')).tap() - await element(by.id('composeFAB')).tap() - await element(by.id('composerTextInput')).typeText('Test thread') - await element(by.id('composerPublishBtn')).tap() - await expect(element(by.id('composeFAB'))).toBeVisible() - }) - - it('Login, reply to the thread, and log out', async () => { - await loginAsBob() - await element(by.id('homeScreenFeedTabs-Following')).tap() - const alicePosts = by.id('feedItem-by-alice.test') - await element(by.id('replyBtn').withAncestor(alicePosts)).atIndex(0).tap() - await element(by.id('composerTextInput')).typeText('Reply 1') - await element(by.id('composerPublishBtn')).tap() - await expect(element(by.id('composeFAB'))).toBeVisible() - }) - - it('Login, confirm notification exists, mute thread, and log out', async () => { - await loginAsAlice() - await element(by.id('bottomBarNotificationsBtn')).tap() - const bobNotifs = by.id('feedItem-by-bob.test') - await expect( - element(by.id('postText').withAncestor(bobNotifs)).atIndex(0), - ).toHaveText('Reply 1') - await element(by.id('postDropdownBtn').withAncestor(bobNotifs)) - .atIndex(0) - .tap() - await element(by.text('Mute thread')).tap() - // have to wait for the toast to clear - await waitFor(element(by.id('viewHeaderDrawerBtn'))) - .toBeVisible() - .withTimeout(5000) - }) - - it('Login, reply to the thread twice, and log out', async () => { - await loginAsBob() - - await element(by.id('bottomBarProfileBtn')).tap() - await element(by.id('profilePager-selector-1')).tap() - const bobPosts = by.id('feedItem-by-bob.test') - await element(by.id('replyBtn').withAncestor(bobPosts)).atIndex(0).tap() - await element(by.id('composerTextInput')).typeText('Reply 2') - await element(by.id('composerPublishBtn')).tap() - await expect(element(by.id('composeFAB'))).toBeVisible() - - const alicePosts = by.id('feedItem-by-alice.test') - await element(by.id('replyBtn').withAncestor(alicePosts)).atIndex(0).tap() - await element(by.id('composerTextInput')).typeText('Reply 3') - await element(by.id('composerPublishBtn')).tap() - await expect(element(by.id('composeFAB'))).toBeVisible() - - await element(by.id('bottomBarHomeBtn')).tap() - }) - - it('Login, confirm notifications dont exist, unmute the thread, confirm notifications exist', async () => { - await loginAsAlice() - - await element(by.id('bottomBarNotificationsBtn')).tap() - const bobNotifs = by.id('feedItem-by-bob.test') - await expect( - element(by.id('postText').withAncestor(bobNotifs)).atIndex(0), - ).not.toExist() - - await element(by.id('bottomBarHomeBtn')).tap() - const alicePosts = by.id('feedItem-by-alice.test') - await element(by.id('postDropdownBtn').withAncestor(alicePosts)) - .atIndex(0) - .tap() - await element(by.text('Unmute thread')).tap() - - // TODO - // the swipe down to trigger PTR isnt working and I dont want to block on this - // -prf - // await element(by.id('bottomBarNotificationsBtn')).tap() - // await element(by.id('notifsFeed')).swipe('down', 'fast') - // await waitFor(element(by.id('postText').withAncestor(bobNotifs))) - // .toBeVisible() - // .withTimeout(5000) - // await expect( - // element(by.id('postText').withAncestor(bobNotifs)).atIndex(0), - // ).toHaveText('Reply 2') - // await expect( - // element(by.id('postText').withAncestor(bobNotifs)).atIndex(1), - // ).toHaveText('Reply 3') - // await expect( - // element(by.id('postText').withAncestor(bobNotifs)).atIndex(2), - // ).toHaveText('Reply 1') - }) -}) |