Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
Is it possible to use "it" within support folder? Cypress

community! I have looked up many resources including cypress.io, but didn't find such info. So, I'm guessing cypress doesn't support this opportunity but maybe someone has some clues.

Is Cypress able to use the test block "it" within "support" folder with Custom Commands or can I only use it within "integration" folder?

I have a lot of API requests where, for example, the response 200 is similar to each other. It would be fine to reuse these expects like reusable functions in Custom Commands

The next expects I would want to reuse for the different spec.js. Is it possible?

it('Response has status 200', () => {
    expect(responseBody.status).to.eq(200)
})
it('Field "success" has value "true"', () => {
    expect(responseBody.body.status.success).to.eq(true)
})
it('Field "code" has response "200"', () => {
    expect(responseBody.body.status.code).to.eq(200)
})
it('Field "message" has value "OK"', () => {
    expect(responseBody.body.status.message).to.eq("OK")
})
it('Check the length of the list', () => {
    expect(responseBody.body.result.length).to.be.eq(237)
})
it('Check the USA is present in the list', () => {
    expect(responseBody.body.result[224].name).to.eq("United States")
})
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda