diff options
Diffstat (limited to '__e2e__/tests/thread-screen.test.ts')
-rw-r--r-- | __e2e__/tests/thread-screen.test.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/__e2e__/tests/thread-screen.test.ts b/__e2e__/tests/thread-screen.test.ts index 02831d055..e3cff12c9 100644 --- a/__e2e__/tests/thread-screen.test.ts +++ b/__e2e__/tests/thread-screen.test.ts @@ -1,5 +1,7 @@ /* eslint-env detox/detox */ +import {describe, beforeAll, it} from '@jest/globals' +import {expect} from 'detox' import {openApp, loginAsAlice, createServer} from '../util' describe('Thread screen', () => { @@ -31,15 +33,15 @@ describe('Thread screen', () => { it('Can like the root post', async () => { const post = by.id('postThreadItem-by-bob.test') await expect( - element(by.id('likeCount').withAncestor(post)).atIndex(0), + element(by.id('likeCount-expanded').withAncestor(post)).atIndex(0), ).not.toExist() await element(by.id('likeBtn').withAncestor(post)).atIndex(0).tap() await expect( - element(by.id('likeCount').withAncestor(post)).atIndex(0), + element(by.id('likeCount-expanded').withAncestor(post)).atIndex(0), ).toHaveText('1 like') await element(by.id('likeBtn').withAncestor(post)).atIndex(0).tap() await expect( - element(by.id('likeCount').withAncestor(post)).atIndex(0), + element(by.id('likeCount-expanded').withAncestor(post)).atIndex(0), ).not.toExist() }) @@ -61,21 +63,21 @@ describe('Thread screen', () => { it('Can repost the root post', async () => { const post = by.id('postThreadItem-by-bob.test') await expect( - element(by.id('repostCount').withAncestor(post)).atIndex(0), + element(by.id('repostCount-expanded').withAncestor(post)).atIndex(0), ).not.toExist() await element(by.id('repostBtn').withAncestor(post)).atIndex(0).tap() await expect(element(by.id('repostModal'))).toBeVisible() await element(by.id('repostBtn').withAncestor(by.id('repostModal'))).tap() await expect(element(by.id('repostModal'))).not.toBeVisible() await expect( - element(by.id('repostCount').withAncestor(post)).atIndex(0), + element(by.id('repostCount-expanded').withAncestor(post)).atIndex(0), ).toHaveText('1 repost') await element(by.id('repostBtn').withAncestor(post)).atIndex(0).tap() await expect(element(by.id('repostModal'))).toBeVisible() await element(by.id('repostBtn').withAncestor(by.id('repostModal'))).tap() await expect(element(by.id('repostModal'))).not.toBeVisible() await expect( - element(by.id('repostCount').withAncestor(post)).atIndex(0), + element(by.id('repostCount-expanded').withAncestor(post)).atIndex(0), ).not.toExist() }) |