Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

114
Vistas
How do test the title is showing in full length and not displaying with a dotted line with cypress?

I am new to working with cypress. I want to test the title text with any length is showing completely with full length and not dotted. I tested the title like below but still, I do not know how to check if the title with long length is displaying with dotted or not!! Thank you for any help.

cy.get(selectors.Content)   
  .find(selectors.dataComponent('title'))     
  .should('be.visible')     
  .and('not.be.empty')
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

If you want to test that there is no ellipsis, try

cy.get(selectors.Content)    
  .find(selectors.dataComponent('title'))      
  .should('be.visible')      
  .and('not.be.empty')  

cy.get(selectors.Content)    
  .find(selectors.dataComponent('title'))      
  .invoke('text')
  .should('not.contain', '...')

Or more strict,

cy.get(selectors.Content)    
  .find(selectors.dataComponent('title'))      
  .invoke('text')
  .should(title => expect(title.endsWith('...')).to.eq(false))
about 4 years ago · Juan Pablo Isaza Denunciar

0

If you know the full length,

cy.get(selectors.Content)    
  .find(selectors.dataComponent('title'))      
  .invoke('text')
  .should('have.length', 20)
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda