Testing with @testing-library/react-native
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react-native
Direzione di ricerca
Inizia eseguendo il test @testing-library/react-native mostrato e analizza il mock walkthroughable intorno a CopilotText. Confronta l’albero renderizzato con il componente Text e determina perché testID non viene esposto. Il lavoro è completato quando getByTestId('test-schedule-name') trova l’elemento CopilotText nella configurazione di test documentata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Current Behavior
Testing with @testing-library/react-native the CopilotText element is not found
Unable to find an element with testID: test-schedule-name
...
const CopilotText = walkthroughable(Text);
^
Input Code
import { walkthroughable, CopilotStep } from 'react-native-copilot';
...
const CopilotText = walkthroughable(Text);
...
<View>
<CopilotStep order={2} name='name'>
<CopilotText testID={'test-schedule-name'}>
{this.props.scheduleName}
</CopilotText>
</CopilotStep>
</View>
...
The test
jest.mock('react-native-copilot', () => ({
walkthroughable: WrappedComponent => ({ copilot, ...props }) => <WrappedComponent {...copilot} {...props} />,
}));
it('displays name', () => {
const { getByTestId } = render(<MyComponent />);
const scheduleName = getByTestId('test-schedule-name');
...
});
Expected behavior/code
Be able to select the CopilotText as the Text do
Environment
react-native-copilot: [e.g. v2.4.6]react-native: 0.59.0react-native-svg: 9.11.1
Possible Solution
Another way of mocking the module (?)
- Lingua principale
- TypeScript
- Stelle
- 2.4k
- Fork
- 425
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mohebifar/react-native-copilot
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
mohebifar/react-native-copilot#354 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
mohebifar/react-native-copilot#351 · 1 commento · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
mohebifar/react-native-copilot#349 · 11 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
mohebifar/react-native-copilot#348 · 2 commenti ·
Tutte le issue di mohebifar/react-native-copilot
Issue simili
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
ag-ui-protocol/ag-ui#3504 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Dokploy/dokploy#6151 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NousResearch/hermes-agent#161712 ·
I maintainer di solito rispondono entro 1 giorno
-
bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
rothgar/rabble.radio#283 ·
I maintainer di solito rispondono entro 1 giorno
-
bug from-app needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nightly-labs/openbot#19805 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno