Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
¿Cómo y dónde puedo agregar accesorios testid a este código?

¿Cómo puedo agregar los accesorios de identificación de prueba para habilitar la prueba de Fila de nombre, Agregado de CONTENIDO y Título de contenido?

Estoy usando reaccionar. Quiero agregar el atributo test-id para todos los enlaces de navegación. ¿Cómo y dónde puedo agregar esto? He intentado agregarlo en const Array

 Array<NavLists> = [ { id: 'nav__name-row, title: 'Name Row', link: getNameUrl() }, { id: 'nav__content-aggregate, title: 'Content Aggregrate, link: getDAggregrateUrl() }, { id: 'nav__content-title', title: 'Content Title', link: getTitleUrl() }, { id: 'nav__content-index', title: 'Content Index, link: getIndexUrl() } ] Const HorizontalNav: React.FC<Props> = (props) => { Const {location} = props Const {pathname} = location Const founditem = navLists.find(navItem) => pathname.include(navItem.link)) || navLists[0] Return ( <div> <Tabs selectedTabiD = {founditem.id)> {navItems.map((navitem) => ( <Tab key = {navItem.id} id = {navitem.id}> {navitem.id === founditem.id ? <span>{navItem.title}</span> : <Link to {navItem.link}>{navitem.title}</link>} </tab> ```
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Si necesita adjuntar un atributo data-* para realizar pruebas, es probable que la sintaxis sea data-testid .

Usar atributos de datos

 <Link data-testid={navItem.id} to={navItem.link} > {navitem.title} </link>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!