diff --git a/karma.conf.js b/karma.conf.js index 1c5ca4f..3ea9ce3 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,3 +1,10 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-extraneous-dependencies +const playwright = require("playwright"); + +process.env.FIREFOX_BIN = playwright.firefox.executablePath(); +process.env.CHROME_BIN = playwright.chromium.executablePath(); +process.env.WEBKIT_HEADLESS_BIN = playwright.webkit.executablePath(); + module.exports = function (config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) diff --git a/package-lock.json b/package-lock.json index 548f618..8f51a16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "karma-mocha-reporter": "^2.2.5", "karma-safari-launcher": "^1.0.0", "mocha": "^10.2.0", + "playwright": "^1.36.2", "typescript": "^5.1.6" }, "engines": { @@ -12156,6 +12157,34 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/playwright": { + "version": "1.36.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.2.tgz", + "integrity": "sha512-4Fmlq3KWsl85Bl4InJw1NC21aeQV0iSZuFvTDcy1F8zVmXmgQRe89GxF8zMSRt/KIS+2tUolak7EXVl9aC+JdA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "playwright-core": "1.36.2" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/playwright-core": { + "version": "1.36.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.2.tgz", + "integrity": "sha512-sQYZt31dwkqxOrP7xy2ggDfEzUxM1lodjhsQ3NMMv5uGTRDsLxU0e4xf4wwMkF2gplIxf17QMBCodSFgm6bFVQ==", + "dev": true, + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -24668,6 +24697,21 @@ } } }, + "playwright": { + "version": "1.36.2", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.2.tgz", + "integrity": "sha512-4Fmlq3KWsl85Bl4InJw1NC21aeQV0iSZuFvTDcy1F8zVmXmgQRe89GxF8zMSRt/KIS+2tUolak7EXVl9aC+JdA==", + "dev": true, + "requires": { + "playwright-core": "1.36.2" + } + }, + "playwright-core": { + "version": "1.36.2", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.2.tgz", + "integrity": "sha512-sQYZt31dwkqxOrP7xy2ggDfEzUxM1lodjhsQ3NMMv5uGTRDsLxU0e4xf4wwMkF2gplIxf17QMBCodSFgm6bFVQ==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", diff --git a/package.json b/package.json index 1c1696c..a21d394 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "karma-mocha-reporter": "^2.2.5", "karma-safari-launcher": "^1.0.0", "mocha": "^10.2.0", + "playwright": "^1.36.2", "typescript": "^5.1.6" }, "dependencies": {