Complete the code to retry the assertion automatically in Cypress.
cy.get('button').click(); cy.get('.result').should([1], 'Success');
The should('have.text', 'Success') assertion checks the exact text and retries automatically until it passes or times out.
Complete the code to retry a custom command until it succeeds.
Cypress.Commands.add('checkStatus', () => { cy.request('/status').its('body.status').should([1], 'ready'); });
The should('equal', 'ready') assertion retries until the status equals 'ready'.
Fix the error in the retry assertion to correctly wait for the element to be visible.
cy.get('.loading').should([1]);
The correct Cypress assertion is should('be.visible') which retries until the element is visible.
Fill both blanks to retry the assertion that the input value is 'test'.
cy.get('input').should([1], [2]);
The assertion should('have.value', 'test') retries until the input's value is exactly 'test'.
Fill all three blanks to retry a custom command that waits for a status 'complete' and asserts it.
Cypress.Commands.add('waitForComplete', () => { cy.request('/task-status').its([1]).should([2], [3]); });
The command checks the property body.status and retries the assertion should('equal', 'complete') until the status is 'complete'.