- Started by writing test cases to cover user interactions with web application.
- Used Cypress’s API commands such as
cy.visit()
,cy.get()
,cy.type()
, etc., to interact with elements on the web page. - Utilized Firebase API calls within mine Cypress tests to manipulate data and perform assertions.
Example: If application involves user authentication, write tests to verify login functionality using Firebase Authentication API.
Trying to add auth test in cypress
Here’s sample code below.
// Add data to Firebase Realtime Database
cy.request('PUT', 'https://your-firebase-project.firebaseio.com/data.json', {
key: 'value'
}).then((response) => {
expect(response.status).to.eq(200);
});
Is there any other work around like we use rest API’s for auth. Major issue is to use auth from firebase in cypress.
New contributor
Bilal Hussain is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.