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

187
Vistas
Json file does not load after selecting from dropdown

I have a fixture file which have both positive and negative amounts.

I have a dropdown which makes me select ALL,positive and negative amount.

when i select negative for example the table does not get refreshed with negative amounts.

enter image description here

This is the dropdown html This is my code test:

cy.intercept('/api/amounts/***/*****', {fixture: 'amount.json'}).as('amount')
        cy.wait('@amount')
     
        cy.get('.dropdown-header-title').eq(3).click()
        cy.get('.dropdown-list-item').contains('Negative').then(option =>{
            option[0].click()
            cy.get('.dropdown-header-title').contains('Negative')
        })

The json file can be as below:

{
  amount: ['-200,000', '40000', '400', '-200']
}

For info i have added just dummy test data but the file is larger thank you

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use readfile instead of fixture

cy.readFile("cypress/fixtures/amount.json").then((profile) => {
  cy.intercept('/api/amounts/***/*****', { fixture: 'amount.json' }).as('amount')
  cy.wait('@amount')

  cy.get('.dropdown-header-title').eq(3).click()
  cy.get('.dropdown-list-item').contains('Negative').then(option => {
    option[0].click()
    cy.get('.dropdown-header-title').contains('Negative')
  })
})
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