Fix home screen tests
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
/* eslint-env detox/detox */
|
/* eslint-env detox/detox */
|
||||||
|
|
||||||
|
import {describe, beforeAll, it} from '@jest/globals'
|
||||||
|
import {expect} from 'detox'
|
||||||
import {openApp, loginAsAlice, createServer} from '../util'
|
import {openApp, loginAsAlice, createServer} from '../util'
|
||||||
|
|
||||||
describe('Home screen', () => {
|
describe('Home screen', () => {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {colors} from 'lib/styles'
|
|||||||
import {useTheme} from 'lib/ThemeContext'
|
import {useTheme} from 'lib/ThemeContext'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {useAnimatedValue} from 'lib/hooks/useAnimatedValue'
|
import {useAnimatedValue} from 'lib/hooks/useAnimatedValue'
|
||||||
|
import {IS_TEST} from '#/env'
|
||||||
|
|
||||||
const TIMEOUT = 4e3
|
const TIMEOUT = 4e3
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ export function show(
|
|||||||
message: string,
|
message: string,
|
||||||
_icon: FontAwesomeProps['icon'] = 'check',
|
_icon: FontAwesomeProps['icon'] = 'check',
|
||||||
) {
|
) {
|
||||||
|
if (IS_TEST) return
|
||||||
const item = new RootSiblings(<Toast message={message} />)
|
const item = new RootSiblings(<Toast message={message} />)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
item.destroy()
|
item.destroy()
|
||||||
|
|||||||
Reference in New Issue
Block a user