diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-09 17:34:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 17:34:16 -0700 |
commit | 03d152675ee1ce208856498acf7285fbf07fd45b (patch) | |
tree | 70803ebe16276b3a6b7c350f78d069641a0a6118 /__e2e__/tests/self-labeling.test.ts | |
parent | 48813a96d686d97009e260d0a87f32d28a631052 (diff) | |
download | voidsky-03d152675ee1ce208856498acf7285fbf07fd45b.tar.zst |
Add self-labeling controls (#1141)
* Add self-label modal * Use the shield-exclamation icon consistently on post moderation * Wire up self-labeling * Bump @atproto/api@0.6.0 * Bump @atproto/dev-env@^0.2.3 * Add e2e test for self-labeling * Fix types
Diffstat (limited to '__e2e__/tests/self-labeling.test.ts')
-rw-r--r-- | __e2e__/tests/self-labeling.test.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/__e2e__/tests/self-labeling.test.ts b/__e2e__/tests/self-labeling.test.ts new file mode 100644 index 000000000..70164cb85 --- /dev/null +++ b/__e2e__/tests/self-labeling.test.ts @@ -0,0 +1,34 @@ +/* eslint-env detox/detox */ + +import {openApp, login, createServer, sleep} from '../util' + +describe('Self-labeling', () => { + let service: string + beforeAll(async () => { + service = await createServer('?users') + await openApp({ + permissions: {notifications: 'YES', medialibrary: 'YES', photos: 'YES'}, + }) + }) + + it('Login', async () => { + await login(service, 'alice', 'hunter2') + await element(by.id('homeScreenFeedTabs-Following')).tap() + }) + + it('Post an image with the porn label', async () => { + await element(by.id('composeFAB')).tap() + await element(by.id('composerTextInput')).typeText('Post with an image') + await element(by.id('openGalleryBtn')).tap() + await sleep(1e3) + await element(by.id('labelsBtn')).tap() + await element(by.id('pornLabelBtn')).tap() + await element(by.id('confirmBtn')).tap() + await element(by.id('composerPublishBtn')).tap() + await expect(element(by.id('composeFAB'))).toBeVisible() + const posts = by.id('feedItem-by-alice.test') + await expect( + element(by.id('contentHider-embed').withAncestor(posts)).atIndex(0), + ).toExist() + }) +}) |