You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a two containers inside a section.
Both hit different end points to derive some a values, post that they compare these values and decide either to render. (thats how the app works).
i have written a cypress test to cover the same, wherein i have two aliases calculating the two values:
.getByAutomationId('wipIssue').within(()=>{cy.get('section').within(()=>{cy.getByAutomationId(‘balance’).first().invoke('text').as(‘balance’);});cy.getByAutomationId('lotCardGroup').within(()=>{cy.get('div').within(()=>{cy.getByAutomationId('lot-CH10312823').click().find(‘sfb’).invoke(‘text’).as(‘sfbVal’);});});});//Assert a conditionif(@balance<= @sfbVal){// provide an outcome or reason}
help me compare the two values ('balance' against 'sfbVal') to complete my cypress test.
The text was updated successfully, but these errors were encountered:
Ensure when comparing later that you are within a .then(() => {}) command so the values are defined when they are called.
In the future, we recommend questions relating to how to use Cypress be asked in our community chat. Issues in our GitHub repo are reserved for potential bugs or feature requests.
I have a two containers inside a section.
Both hit different end points to derive some a values, post that they compare these values and decide either to render. (thats how the app works).
i have written a cypress test to cover the same, wherein i have two aliases calculating the two values:
help me compare the two values ('balance' against 'sfbVal') to complete my cypress test.
The text was updated successfully, but these errors were encountered: