How to write test code about progess bar by waituntil

This issue has been tracked since 2022-01-12.

hi,
I've seen the usage of cypress-wait-until, but I still don't know how to write a scenario case about progess bar
by this method?
cy.waitUntil(() => { return Cypress.$(XXXXXXXX).length })
The scenario is similar to this picture
What I want to test is that
when backend api change some data and send message to frontend , the frontend monitors the changes and updates the UI,
image

Another question is whether cypress-wait-until can only end the wait by judging true or false?

NoriSte wrote this answer on 2022-01-13

Welcome 👋

when backend api change some data and send message to frontend , the frontend monitors the changes and updates the UI,

I guess the backend send messages through a socket connection? Anyway, why a simpler, Cypress-based, approach like the following doesn't work for you?

cy.contains('[TEXT OF THE STEP 1]').should('be.visible')
cy.contains('[TEXT OF THE STEP 2]').should('be.visible')
cy.contains('[TEXT OF THE STEP 3]').should('be.visible')
// ...

Another question is whether cypress-wait-until can only end the wait by judging true or false?

It ends the wait for every truthy value, not only booleans.

trackuitest wrote this answer on 2022-01-14

thank you

NoriSte wrote this answer on 2022-01-14

You're welcome 😊

More Details About Repo
Owner Name NoriSte
Repo Name cypress-wait-until
Full Name NoriSte/cypress-wait-until
Language JavaScript
Created Date 2019-04-27
Updated Date 2023-03-19
Star Count 635
Watcher Count 8
Fork Count 24
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date