Testing with @testing-library/react-native
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, react-native
Línea de trabajo
Empieza ejecutando la prueba mostrada de @testing-library/react-native e inspecciona el mock de walkthroughable alrededor de CopilotText. Compara el árbol renderizado con el componente Text y determina por qué testID no queda expuesto. Se considera terminado cuando getByTestId('test-schedule-name') encuentra el elemento CopilotText con la configuración de prueba documentada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 (?)
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.4k
- Forks
- 425
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de mohebifar/react-native-copilot
-
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
mohebifar/react-native-copilot#354 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
mohebifar/react-native-copilot#351 · 1 comentario · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
mohebifar/react-native-copilot#349 · 11 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
mohebifar/react-native-copilot#348 · 2 comentarios ·
Todos los issues de mohebifar/react-native-copilot
Issues similares
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
ag-ui-protocol/ag-ui#3504 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Dokploy/dokploy#6151 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NousResearch/hermes-agent#161712 ·
Los mantenedores suelen responder en 1 día
-
bug p3
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rothgar/rabble.radio#283 ·
Los mantenedores suelen responder en 1 día
-
bug from-app needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
nightly-labs/openbot#19805 · 1 comentario ·
Los mantenedores suelen responder en 1 día