This repo contains a simple React appliction connected to Firebase. It uses Firebase Auth plus Firestore for data storage. It includes tests for auth, storing data, and logging out.
git clone [email protected]:mihalik/cypress-firebase-example.git
npm install
npm run dev
This will run a static webserver on port 5000 which will host the index.html and index.js files. You can verify by opening your browser and navigating to http://localhost:5000.
npm run cypress
This will run Cypress and load the tests.
The current implementation uses a login command to login before each test using beforeEach
. Ideally this would bypass automating the login form to improve test speed.
Due to some issues with long-polling (used by Firebase) and using a single-page application with Cypress (#761), these tests use a blank.html page after each test to clear out any lingering XHR requests.