https://github.com/nickytonline/xtremejs-2024-demo
Demo browser extension for my xtreme.js 2024 talk on end to end testing browser extensions.
https://github.com/nickytonline/xtremejs-2024-demo
e2e-testing extension-chrome playwright
Last synced: 12 days ago
JSON representation
Demo browser extension for my xtreme.js 2024 talk on end to end testing browser extensions.
- Host: GitHub
- URL: https://github.com/nickytonline/xtremejs-2024-demo
- Owner: nickytonline
- License: mit
- Created: 2024-11-09T22:51:43.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-10T00:56:55.000Z (6 months ago)
- Last Synced: 2025-03-29T21:11:17.637Z (about 1 month ago)
- Topics: e2e-testing, extension-chrome, playwright
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# XtremeJS 2024 Browser Extension Demo
This repository contains a demo browser extension with end-to-end tests. It is part of the XtremeJS 2024 talk "End to End Testing for Browser Extensions" by Nick Taylor. You can find the full schedule [here](https://xtremejs.dev/2024/schedule/).
## Installation
To test this extension in a browser, you need to load it unpacked. Below are the instructions for Google Chrome and Firefox. For other Chromium-based browsers, the process is similar.
### Google Chrome
1. Open Chrome and navigate to `chrome://extensions/`.
2. Enable "Developer mode" by toggling the switch in the top right corner.
3. Click on the "Load unpacked" button.
4. Select the `src` directory of this repository.### Firefox
1. Open Firefox and navigate to `about:debugging#/runtime/this-firefox`.
2. Click on the "Load Temporary Add-on..." button.
3. Select any file in the `src` directory of this repository (e.g., `manifest.json`).## Running End-to-End Tests
To run the end-to-end tests, you do not need to load the extension in a browser. Simply use the following commands:
```sh
npm install
npm playwright install
npm run e2e
```or if you prefer to run the tests in headful mode (Playwright GUI), run:
```sh
npm install
npm playwright install
npm run e2e:ui
```