2023-08-10 02:34:16 +02:00
|
|
|
/* eslint-env detox/detox */
|
|
|
|
|
2023-12-05 21:50:56 +01:00
|
|
|
import {describe, beforeAll, it} from '@jest/globals'
|
|
|
|
import {expect} from 'detox'
|
2023-09-21 04:47:56 +02:00
|
|
|
import {openApp, loginAsAlice, createServer, sleep} from '../util'
|
2023-08-10 02:34:16 +02:00
|
|
|
|
|
|
|
describe('Self-labeling', () => {
|
|
|
|
beforeAll(async () => {
|
2023-09-21 04:47:56 +02:00
|
|
|
await createServer('?users')
|
2023-08-10 02:34:16 +02:00
|
|
|
await openApp({
|
|
|
|
permissions: {notifications: 'YES', medialibrary: 'YES', photos: 'YES'},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
it('Login', async () => {
|
2023-09-21 04:47:56 +02:00
|
|
|
await loginAsAlice()
|
2023-08-10 02:34:16 +02:00
|
|
|
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()
|
2023-08-29 04:10:36 +02:00
|
|
|
await sleep(3e3)
|
2023-08-10 02:34:16 +02:00
|
|
|
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()
|
|
|
|
})
|
|
|
|
})
|