/chrome-extension-e2e

End-to-end test demo for Chrome 🔬🌐

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

License People Stars Forks Watches Last Updated

End-to-end test demo for Chrome 🔬🌐

A demo created for showcasing end to end testing of a chrome extension using puppeteer.

✨ Features

  • Comes with a easy to modify counter extension
  • Comes with extensive tests for the extension

⚡ Setup

⚙️ Requirements

  • Chrome Browser

💻 Installation

Installing chrome-extension-e2e is as simple as cloning and symlinking!

git clone https://github.com/2kabhishek/chrome-extension-e2e

To run the tests, simply run the following command:

yarn
yarn test

If you want to try the extension, you can load it in chrome as follows:

  1. Open up chrome://extensions/ in your browser and click “Developer mode” in the top right.
  2. Now click “Load unpacked extension…” and select the extension’s src directory.
  3. You should now see the extension in the list.

🧑‍💻 Behind The Code

🌈 Inspiration

Was learning about testing chrome extensions and decided to create a demo for the same.

💡 Challenges/Learnings

  • You can persist the id of a chrome extension by adding the public key to the manifest, this is necessary for testing.
  • Learned about the chrome extension ecosystem and how to test them.

🧰 Tooling

  • dots2k — Dev Environment
  • nvim2k — Personalized Editor
  • mac2k — Desktop Environment

⭐ hit the star button if you found this useful ⭐

Source | Blog | Twitter | LinkedIn | More Links | Other Projects