Open nihal467 opened 2 weeks ago
@nihal467 Is this the required solution for the above issue
Example: Before:
verifyUploadFilePresence(fileName: string) {
cy.wait(2000);
cy.get("#file-div").scrollIntoView();
cy.verifyContentPresence("#file-div", [fileName]);
}
After:
verifyUploadFilePresence(fileName: string) {
// Replace cy.wait(2000) with intercepting the file upload API call
cy.intercept('POST', '/api/upload-file').as('fileUpload');
cy.wait('@fileUpload'); // Wait for the file upload request to finish
cy.get("#file-div").scrollIntoView();
cy.verifyContentPresence("#file-div", [fileName]);
}
If this is correct I would like to work on this
Describe the bug
Currently there are multiple places in the cypress file, we use the hardcoded cy.wait(), it's creating a lot of flaky test across the test
Expected behavior
Screenshots