Skip to content

Commit

Permalink
#333 Convert DomActions playwright-based unit test to WebTestRunner H…
Browse files Browse the repository at this point in the history
…TML test (#491)

* #333 Convert DomActions playwright-based unit test to WebTestRunner HTML test

* #333 CR: Expect whole AutoConsent instance in DomActions constructor

* #333 CR: Improve structure of test files

* #333 CR: Align esbuild settings in web-test-runner.config.mjs with prod ones

* #333 CR: Simplify counters logic in dom-actions.click.ts

---------

Co-authored-by: ondrej.frei <[email protected]>
  • Loading branch information
freiondrej and ondrej.frei authored Oct 14, 2024
1 parent 1a80848 commit 76eaaec
Show file tree
Hide file tree
Showing 10 changed files with 3,608 additions and 321 deletions.
1 change: 0 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ jobs:
node-version: 16.x
cache: 'npm'
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run test:lib
1 change: 0 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -ex
ESBUILD="node_modules/.bin/esbuild --bundle"

$ESBUILD --format=iife --target=es2021 --minify playwright/content.ts --outfile=dist/autoconsent.playwright.js
$ESBUILD --format=iife --target=es2021 playwright/unit.ts --outfile=dist/autoconsent.unit.js
$ESBUILD --format=esm --target=es2021 lib/web.ts --outfile=dist/autoconsent.esm.js
$ESBUILD --format=cjs --target=es2021 --platform=node lib/web.ts --outfile=dist/autoconsent.cjs.js

Expand Down
2 changes: 1 addition & 1 deletion lib/dom-actions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ElementSelector, HideMethod, VisibilityCheck } from "./rules";
import { DomActionsProvider } from "./types";
import {DomActionsProvider} from "./types";
import { getStyleElement, hideElements, isElementVisible, waitFor } from "./utils";
import AutoConsent from "./web";

Expand Down
Loading

0 comments on commit 76eaaec

Please sign in to comment.