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

Added navigator mock before tests to allow tests in headless mode #785

Merged
merged 12 commits into from
Jul 23, 2024

Conversation

kkerti
Copy link
Collaborator

@kkerti kkerti commented Jul 23, 2024

Use this before the tests:

test.beforeEach(({ page }) => {
  // mocks navigator.serial, so headless UI tests can run!
  page.addInitScript(
    "Object.defineProperty(navigator,'serial',{set: () => undefined, get: () => undefined})"
  );
});

Copy link
Contributor

Visit the preview URL for this PR (updated for commit cb29f46):

https://grid-editor-web--pr785-kk-test-chrome-navig-gr4ehglb.web.app

(expires Tue, 30 Jul 2024 08:09:54 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2b65ba6ef19c55d367eaffd04e46bcde25305d6f

@kkerti kkerti merged commit 37e2ff4 into stable Jul 23, 2024
9 checks passed
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.

2 participants