{"repo":"nearform/playwright-firebase","free":true,"listed":false,"github":"https://github.com/nearform/playwright-firebase","clone":"git clone https://github.com/nearform/playwright-firebase.git","description":"A plugin to handle Firebase authentication in Playwright tests","language":"TypeScript","stars":28,"topics":["firebase","playwright"],"license":null,"category":"scrapers-browser-automation","readme_excerpt":"@nearform/playwright-firebase [!NOTE] This is an ESM only package, please make sure your usage follows the rules of ESM User the following guide to learn more Tidy way to authenticate Playwright E2E tests on Firebase. Install using npm: or yarn: Want to see it in action? Go to Example to try it out! Contents 1. Setup 2. Motivation 3. Example Setup Firebase environment variables To set up this plugin you will need three sensitive environment variables in order to authenticate with Firebase. These are: 1. Firebase Service Account 2. Firebase User ID 3. Firebase Configurations For more information about Firebase you can read the documentation here It's recommended to place these values in a .env file. For clarity, the Firebase User ID is often abbreviated to UID, as you will find below. The plugin accepts - Service Account: JSON - UID: string - Firebase Configurations: JSON you don't need to place quotes around these environment variables. Attaching playright-firebase as a fixture to Playwright Playwright is based on fixtures. You have likely already used them within Playwright, they are the { page } object that is passed in to test . More information on them here. In the very same way, we are able to add our own fixture, which we call auth to the tests. To do so, we need to create a setup file that will automatically run before all other tests. We will call this auth.setup.ts Above we import the test directly from @playwright/test as base and then export a new test object which","default_branch":null,"files":null,"tree":[],"storefront":"/r/nearform","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nearform/playwright-firebase/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}