diff --git a/VINScanner/.babelrc b/VINScanner/.babelrc deleted file mode 100644 index ce7fa12..0000000 --- a/VINScanner/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": ["@babel/preset-env"], - "plugins": ["istanbul"] - } - \ No newline at end of file diff --git a/VINScanner/.nycrc b/VINScanner/.nycrc deleted file mode 100644 index 8f077d1..0000000 --- a/VINScanner/.nycrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@istanbuljs/nyc-config-typescript", - "all": true, - "check-coverage": true, - "reporter": ["text", "html", "lcov"], - "include": ["**/*.js"], - "exclude": [ - "tests", - "node_modules", - "coverage" - ] -} diff --git a/VINScanner/package.json b/VINScanner/package.json deleted file mode 100644 index e12744b..0000000 --- a/VINScanner/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "vinscanner", - "version": "1.0.0", - "main": "index.js", - "scripts": { - "test": "nyc --reporter=html --reporter=text npm run test:playwright", - "test:playwright": "playwright test", - "dev": "vite --host" - }, - "keywords": [], - "author": "", - "license": "ISC", - "description": "", - "devDependencies": { - "@istanbuljs/nyc-config-typescript": "^1.0.2", - "@playwright/test": "^1.46.1", - "babel-plugin-istanbul": "^7.0.0", - "nyc": "^17.0.0", - "playwright": "^1.46.1", - "source-map-support": "^0.5.21", - "ts-node": "^10.9.2", - "vite": "^4.4.0" - } -} diff --git a/playwright.config.ts b/playwright.config.ts index 531293a..6801c0d 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -11,7 +11,7 @@ import { defineConfig, devices } from "@playwright/test"; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - testDir: "./", + testDir: "./VINScanner/tests", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -26,9 +26,11 @@ export default defineConfig({ use: { /* Base URL to use in actions like `await page.goto('/')`. */ baseURL: "http://localhost:3000", - + /* Enable headless mode by default */ + headless: true, /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: "on-first-retry", + ignoreHTTPSErrors: true, }, /* Configure projects */ @@ -38,7 +40,7 @@ export default defineConfig({ use: { ...devices["Desktop Chrome"], launchOptions: { - args: ["--enable-web-rtc", "--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream"], + args: ["--disable-web-security", "--enable-web-rtc", "--headless=chrome"], }, contextOptions: { /* Camera permission */ @@ -52,20 +54,29 @@ export default defineConfig({ use: { ...devices["Desktop Firefox"], launchOptions: { - args: ["--use-fake-device-for-media-stream", "--use-fake-ui-for-media-stream"], + args: [ + // "--use-fake-device-for-media-stream", + // "--use-fake-ui-for-media-stream", + "--headless=firefox", + "--disable-web-security", + "--enable-web-rtc", + ], firefoxUserPrefs: { "permissions.default.camera": 1, // Allow camera access automatically - "media.navigator.streams.fake": true, // Use fake streams if needed + // "media.navigator.streams.fake": true, // Use fake streams if needed }, }, }, }, - { - name: "webkit", - use: { - ...devices["Desktop Safari"], - }, - }, + // { + // name: "webkit", + // use: { + // ...devices["Desktop Safari"], + // launchOptions: { + // args: ["--disable-web-security", "--enable-web-rtc"], + // }, + // }, + // }, ], /* Run your local dev server before starting the tests */