Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add E2E testing for adblockers #4050

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

seia-soto
Copy link
Member

@seia-soto seia-soto commented Jun 27, 2024

Introduction

This PR adds E2E testing for adblockers: adblocker-puppeteer, adblocker-playwright, adblocker-electron, and adblocker-webextension. The motivation of adding E2E testing comes from the replace modifier support. I found that implementing an E2E test to adblocker library doesn't make sense because adblocker library itself doesn't represent or illustrates end-user environment.

The tests will end up same as unit tests. Note that not all of adblocker library is implemented due to some challenges:

adblocker-electron

adblocker-webextension
This package itself doesn't represent the webextension.
We'll need to prepare a complete adblocker implementation for this.

We may use adblocker-webextension-example but it's still at the open discussion.

Approach

Warning The discussion for the direction is not completed yet. The sort of things in this section is to describe the current approach.

  1. Setup a shared testing helper library that opens a server serves testing website.
  2. The script included in the testing website performs the actual test and report it to DOM.
  3. Each adblocker implementation visits the page and grabs the testing result from the DOM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant