import React from 'react' import {Pressable, View} from 'react-native' import {useStores} from 'state/index' import {navigate} from '../../../Navigation' /** * This utility component is only included in the test simulator * build. It gives some quick triggers which help improve the pace * of the tests dramatically. */ const BTN = {height: 1, width: 1, backgroundColor: 'red'} export function TestCtrls() { const store = useStores() const onPressSignInAlice = async () => { await store.session.login({ service: 'http://localhost:3000', identifier: 'alice.test', password: 'hunter2', }) } const onPressSignInBob = async () => { await store.session.login({ service: 'http://localhost:3000', identifier: 'bob.test', password: 'hunter2', }) } return ( store.session.logout()} accessibilityRole="button" style={BTN} /> navigate('Home')} accessibilityRole="button" style={BTN} /> navigate('Settings')} accessibilityRole="button" style={BTN} /> navigate('Moderation')} accessibilityRole="button" style={BTN} /> store.preferences.toggleHomeFeedMergeFeedEnabled()} accessibilityRole="button" style={BTN} /> store.me.mainFeed.refresh()} accessibilityRole="button" style={BTN} /> store.shell.openModal({name: 'invite-codes'})} accessibilityRole="button" style={BTN} /> ) }