diff --git a/.gitignore b/.gitignore index 9eb5b266ffc79..b71f00f4cc582 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ __coverage__ csak-timelog.json .idea/ debug/ +test-results/ # Lefthook lefthook-local.yml diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5dc5d72c0a43a..802674aad7c42 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,7 @@ "syler.sass-indented", "redhat.vscode-yaml", "vue.volar", - "eamodio.gitlens" + "eamodio.gitlens", + "ms-playwright.playwright" ] } diff --git a/_scripts/clean.mjs b/_scripts/clean.mjs index b4ac899f8d303..aee867d1178de 100644 --- a/_scripts/clean.mjs +++ b/_scripts/clean.mjs @@ -3,8 +3,10 @@ import { join } from 'path' const BUILD_PATH = join(import.meta.dirname, '..', 'build') const DIST_PATH = join(import.meta.dirname, '..', 'dist') +const TEST_RESULTS_PATH = join(import.meta.dirname, '..', 'test-results') await Promise.all([ rm(BUILD_PATH, { recursive: true, force: true }), - rm(DIST_PATH, { recursive: true, force: true }) + rm(DIST_PATH, { recursive: true, force: true }), + rm(TEST_RESULTS_PATH, { recursive: true, force: true }), ]) diff --git a/_scripts/webpack.main.config.js b/_scripts/webpack.main.config.js index 86f77e9ad22b2..b87f3823d1e1b 100644 --- a/_scripts/webpack.main.config.js +++ b/_scripts/webpack.main.config.js @@ -5,74 +5,77 @@ const JsonMinimizerPlugin = require('json-minimizer-webpack-plugin') const isDevMode = process.env.NODE_ENV === 'development' -/** @type {import('webpack').Configuration} */ -const config = { - name: 'main', - mode: process.env.NODE_ENV, - devtool: isDevMode ? 'eval-cheap-module-source-map' : false, - entry: { - main: path.join(__dirname, '../src/main/index.js'), - }, - module: { - rules: [ - { - test: /\.js$/, - use: 'babel-loader', - exclude: /node_modules/, - }, - { - resource: path.resolve(__dirname, '../node_modules/mime-db/db.json'), - use: path.join(__dirname, 'mime-db-shrinking-loader.js') - } - ], - generator: { - json: { - JSONParse: false +module.exports = (env) => { + /** @type {import('webpack').Configuration} */ + const config = { + name: 'main', + mode: process.env.NODE_ENV, + devtool: isDevMode ? 'eval-cheap-module-source-map' : false, + entry: { + main: path.join(__dirname, '../src/main/index.js'), + }, + module: { + rules: [ + { + test: /\.js$/, + use: 'babel-loader', + exclude: /node_modules/, + }, + { + resource: path.resolve(__dirname, '../node_modules/mime-db/db.json'), + use: path.join(__dirname, 'mime-db-shrinking-loader.js') + } + ], + generator: { + json: { + JSONParse: false + } } - } - }, - // webpack defaults to only optimising the production builds, so having this here is fine - optimization: { - minimizer: [ - '...', // extend webpack's list instead of overwriting it - new JsonMinimizerPlugin({ - exclude: /\/locales\/.*\.json/ + }, + // webpack defaults to only optimising the production builds, so having this here is fine + optimization: { + minimizer: [ + '...', // extend webpack's list instead of overwriting it + new JsonMinimizerPlugin({ + exclude: /\/locales\/.*\.json/ + }) + ] + }, + node: { + __dirname: isDevMode, + __filename: isDevMode + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.platform': `'${process.platform}'`, + 'process.env.IS_ELECTRON_MAIN': true, + 'process.env.IS_TESTS': env.IS_TESTS }) - ] - }, - node: { - __dirname: isDevMode, - __filename: isDevMode - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.platform': `'${process.platform}'`, - 'process.env.IS_ELECTRON_MAIN': true - }) - ], - output: { - filename: '[name].js', - libraryTarget: 'commonjs2', - path: path.join(__dirname, '../dist'), - }, - target: 'electron-main', -} + ], + output: { + filename: '[name].js', + libraryTarget: 'commonjs2', + path: path.join(__dirname, '../dist'), + }, + target: 'electron-main', + } -if (!isDevMode) { - config.plugins.push( - new CopyWebpackPlugin({ - patterns: [ - { - from: path.join(__dirname, '../static'), - to: path.join(__dirname, '../dist/static'), - globOptions: { - dot: true, - ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/manifest.json', '**/dashFiles/**', '**/storyboards/**'], + if (!isDevMode) { + config.plugins.push( + new CopyWebpackPlugin({ + patterns: [ + { + from: path.join(__dirname, '../static'), + to: path.join(__dirname, '../dist/static'), + globOptions: { + dot: true, + ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/manifest.json', '**/dashFiles/**', '**/storyboards/**'], + }, }, - }, - ] - }) - ) -} + ] + }) + ) + } -module.exports = config + return config +} diff --git a/eslint.config.mjs b/eslint.config.mjs index 04bf5a45b626d..59f9cb31c9339 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,3 +1,4 @@ +import { defineConfig } from "eslint/config"; import eslintPluginVue from 'eslint-plugin-vue' import vuejsAccessibility from 'eslint-plugin-vuejs-accessibility' import eslintPluginUnicorn from 'eslint-plugin-unicorn' @@ -12,13 +13,14 @@ import jsdoc from 'eslint-plugin-jsdoc' import stylistic from '@stylistic/eslint-plugin' import eslintPluginImportX from 'eslint-plugin-import-x' import eslintPluginN from 'eslint-plugin-n' +import eslintPluginPlaywright from 'eslint-plugin-playwright' import eslintPluginPromise from 'eslint-plugin-promise' import freetube from './_scripts/eslint-rules/plugin.mjs' import activeLocales from './static/locales/activeLocales.json' with { type: 'json' } -export default [ +export default defineConfig([ { ignores: [ 'build/', @@ -427,7 +429,7 @@ export default [ } }, { - files: ['_scripts/**/*.mjs'], + files: ['_scripts/**/*.mjs', 'tests/**/*.mjs'], languageOptions: { globals: globals.node, ecmaVersion: 'latest', @@ -447,5 +449,24 @@ export default [ 'unicorn/prefer-date-now': 'error', 'unicorn/prefer-array-index-of': 'error', } + }, + { + files: ['tests/playwright/helpers.mjs', 'tests/playwright/**/*spec.mjs'], + extends: [eslintPluginPlaywright.configs['flat/recommended']], + settings: { + playwright: { + globalAliases: { + test: ["electronDesktopTest", "electronMobileTest", "electronTabletTest"], + } + } + }, + rules: { + "playwright/expect-expect": [ + "error", + { + "assertFunctionNames": ["validateAccessibility"], + } + ] + } } -] +]) diff --git a/package.json b/package.json index 7b35547899933..9bcf5050550db 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "lint-all": "pnpm run \"/^(lint|lint-json)$/\"", "lint": "pnpm run \"/^(eslint-lint|lint-style)$/\"", "lint-fix": "pnpm run \"/^(eslint-lint|lint-style)-fix$/\"", - "eslint-lint": "eslint --config eslint.config.mjs \"src/**/*.js\" \"src/renderer/**/*.vue\" \"static/*.js\" \"_scripts/*.js\" \"_scripts/**/*.mjs\"", - "eslint-lint-fix": "eslint --config eslint.config.mjs --fix \"src/**/*.js\" \"src/renderer/**/*.vue\" \"static/*.js\" \"_scripts/*.js\" \"_scripts/**/*.mjs\"", + "eslint-lint": "eslint --config eslint.config.mjs \"src/**/*.js\" \"src/renderer/**/*.vue\" \"static/*.js\" \"_scripts/*.js\" \"_scripts/**/*.mjs\" \"tests/**/*.mjs\"", + "eslint-lint-fix": "eslint --config eslint.config.mjs --fix \"src/**/*.js\" \"src/renderer/**/*.vue\" \"static/*.js\" \"_scripts/*.js\" \"_scripts/**/*.mjs\" \"tests/**/*.mjs\"", "lint-json": "eslint --config eslint.config.mjs \"static/**/*.json\"", "lint-style": "stylelint \"src/**/*.{css,scss}\"", "lint-style-fix": "stylelint --fix \"src/**/*.{css,scss}\"", @@ -44,10 +44,14 @@ "pack:main": "webpack --mode=production --config-node-env=production --config _scripts/webpack.main.config.js", "pack:renderer": "webpack --mode=production --config-node-env=production --config _scripts/webpack.renderer.config.js", "pack:preload": "webpack --mode=production --config-node-env=production --config _scripts/webpack.preload.config.js", + "pack:tests": "pnpm run \"/^pack:(main-tests|renderer|preload|botGuardScript)$/\" && node _scripts/injectAllowedPaths.mjs", + "pack:main-tests": "webpack --mode=production --config-node-env=production --env \"IS_TESTS=true\" --config _scripts/webpack.main.config.js", "pack:web": "webpack --mode=production --config-node-env=production --config _scripts/webpack.web.config.js", "pack:botGuardScript": "webpack --config _scripts/webpack.botGuardScript.config.js", "checkforbadtemplates": "node _scripts/findMissingTemplates.mjs", - "ci": "pnpm install --frozen-lockfile" + "ci": "pnpm install --frozen-lockfile", + "test:playwright": "pnpm run pack && pnpm run test:playwright-nopack", + "test:playwright-nopack": "playwright test" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^7.2.0", @@ -74,11 +78,13 @@ "youtubei.js": "^17.0.1" }, "devDependencies": { + "@axe-core/playwright": "^4.11.1", "@babel/core": "^7.29.0", "@babel/preset-env": "^7.29.2", "@double-great/stylelint-a11y": "^3.4.10", "@eslint/js": "^10.0.1", "@intlify/eslint-plugin-vue-i18n": "^4.3.0", + "@playwright/test": "^1.58.2", "@stylistic/eslint-plugin": "^5.10.0", "babel-loader": "^10.1.1", "copy-webpack-plugin": "^14.0.0", @@ -91,6 +97,7 @@ "eslint-plugin-jsdoc": "^62.9.0", "eslint-plugin-jsonc": "^3.1.2", "eslint-plugin-n": "^17.24.0", + "eslint-plugin-playwright": "^2.5.1", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-unicorn": "^64.0.0", "eslint-plugin-vue": "^10.8.0", diff --git a/playwright.config.mjs b/playwright.config.mjs new file mode 100644 index 0000000000000..ccffb96787b50 --- /dev/null +++ b/playwright.config.mjs @@ -0,0 +1,7 @@ +/** @type {import('@playwright/test').PlaywrightTestConfig} */ +export default { + testDir: './tests/playwright', + testMatch: '**/*.spec.mjs', + workers: 1, + fullyParallel: false +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d61fd9136d8d..821b6ff772452 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,6 +75,9 @@ importers: specifier: ^17.0.1 version: 17.0.1 devDependencies: + '@axe-core/playwright': + specifier: ^4.11.1 + version: 4.11.2(playwright-core@1.59.1) '@babel/core': specifier: ^7.29.0 version: 7.29.0 @@ -90,6 +93,9 @@ importers: '@intlify/eslint-plugin-vue-i18n': specifier: ^4.3.0 version: 4.3.0(eslint@10.2.0(jiti@2.4.2))(jsonc-eslint-parser@3.1.0)(vue-eslint-parser@10.4.0(eslint@10.2.0(jiti@2.4.2)))(yaml-eslint-parser@2.0.0) + '@playwright/test': + specifier: ^1.58.2 + version: 1.59.1 '@stylistic/eslint-plugin': specifier: ^5.10.0 version: 5.10.0(eslint@10.2.0(jiti@2.4.2)) @@ -126,6 +132,9 @@ importers: eslint-plugin-n: specifier: ^17.24.0 version: 17.24.0(eslint@10.2.0(jiti@2.4.2))(typescript@6.0.3) + eslint-plugin-playwright: + specifier: ^2.5.1 + version: 2.10.2(eslint@10.2.0(jiti@2.4.2)) eslint-plugin-promise: specifier: ^7.2.1 version: 7.2.1(eslint@10.2.0(jiti@2.4.2)) @@ -214,6 +223,11 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} + '@axe-core/playwright@4.11.2': + resolution: {integrity: sha512-iP6hfNl9G0j/SEUSo8M7D80RbcDo9KRAAfDP4IT5OHB+Wm6zUHIrm8Y51BKI+Oyqduvipf9u1hcRy57zCBKzWQ==} + peerDependencies: + playwright-core: '>= 1.0.0' + '@babel/code-frame@7.29.0': resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} engines: {node: '>=6.9.0'} @@ -1096,30 +1110,35 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-glibc@2.4.1': resolution: {integrity: sha512-BJ7mH985OADVLpbrzCLgrJ3TOpiZggE9FMblfO65PlOCdG++xJpKUJ0Aol74ZUIYfb8WsRlUdgrZxKkz3zXWYA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.4.1': resolution: {integrity: sha512-p4Xb7JGq3MLgAfYhslU2SjoV9G0kI0Xry0kuxeG/41UfpjHGOhv7UoUDAz/jb1u2elbhazy4rRBL8PegPJFBhA==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.4.1': resolution: {integrity: sha512-s9O3fByZ/2pyYDPoLM6zt92yu6P4E39a03zvO0qCHOTjxmt3GHRMLuRZEWhWLASTMSrrnVNWdVI/+pUElJBBBg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.4.1': resolution: {integrity: sha512-L2nZTYR1myLNST0O632g0Dx9LyMNHrn6TOt76sYxWLdff3cB22/GZX2UPtJnaqQPdCRoszoY5rcOj4oMTtp5fQ==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.4.1': resolution: {integrity: sha512-Uq2BPp5GWhrq/lcuItCHoqxjULU1QYEcyjSO5jqqOK8RNFDBQnenMMx4gAl3v8GiWa59E9+uDM7yZ6LxwUIfRg==} @@ -1185,6 +1204,11 @@ packages: resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@playwright/test@1.59.1': + resolution: {integrity: sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==} + engines: {node: '>=18'} + hasBin: true + '@seald-io/binary-search-tree@1.0.3': resolution: {integrity: sha512-qv3jnwoakeax2razYaMsGI/luWdliBLHTdC6jU55hQt1hcFqzauH/HsBollQ7IR4ySTtYhT+xyHoijpA16C+tA==} @@ -1394,41 +1418,49 @@ packages: resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.11.1': resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} cpu: [arm64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} cpu: [riscv64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} cpu: [s390x] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.11.1': resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} cpu: [x64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.11.1': resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} cpu: [x64] os: [linux] + libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.11.1': resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} @@ -1708,6 +1740,10 @@ packages: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} + axe-core@4.11.3: + resolution: {integrity: sha512-zBQouZixDTbo3jMGqHKyePxYxr1e5W8UdTmBQ7sNtaA9M2bE32daxxPLS/jojhKOHxQ7LWwPjfiwf/fhaJWzlg==} + engines: {node: '>=4'} + babel-loader@10.1.1: resolution: {integrity: sha512-JwKSzk2kjIe7mgPK+/lyZ2QAaJcpahNAdM+hgR2HI8D0OJVkdj8Rl6J3kaLYki9pwF7P2iWnD8qVv80Lq1ABtg==} engines: {node: ^18.20.0 || ^20.10.0 || >=22.0.0} @@ -2528,6 +2564,12 @@ packages: peerDependencies: eslint: '>=8.23.0' + eslint-plugin-playwright@2.10.2: + resolution: {integrity: sha512-0N+2OWc3NZbOZ0gK8mp2TK6Qu3UWcJTQ9rqU0UM2yRJXgT758pvpY0lsOLIySfbyFrLqn3TcXjixbmcK90VnuQ==} + engines: {node: '>=16.9.0'} + peerDependencies: + eslint: '>=8.40.0' + eslint-plugin-promise@7.2.1: resolution: {integrity: sha512-SWKjd+EuvWkYaS+uN2csvj0KoP43YTu7+phKQ5v+xw6+A0gutVX2yqCeCkC3uLCJFiPfR2dD8Es5L7yUsmvEaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3904,6 +3946,16 @@ packages: resolution: {integrity: sha512-+KD8hJtqQMYoTuL1bbGOqxb4z+nZkTAwVdNtWwe8Tc2xNbEmdJYIYoc6Qt0uF55e6YW6KuTHw1DjQ18gMhzepw==} engines: {node: '>=16.0.0'} + playwright-core@1.59.1: + resolution: {integrity: sha512-HBV/RJg81z5BiiZ9yPzIiClYV/QMsDCKUyogwH9p3MCP6IYjUFu/MActgYAvK0oWyV9NlwM3GLBjADyWgydVyg==} + engines: {node: '>=18'} + hasBin: true + + playwright@1.59.1: + resolution: {integrity: sha512-C8oWjPR3F81yljW9o5OxcWzfh6avkVwDD2VYdwIGqTkl+OGFISgypqzfu7dOe4QNLL2aqcWBmI3PMtLIK233lw==} + engines: {node: '>=18'} + hasBin: true + plist@3.1.0: resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==} engines: {node: '>=10.4.0'} @@ -4464,7 +4516,6 @@ packages: shaka-player@5.1.1: resolution: {integrity: sha512-z9Pa44Ana5VOtnQHkzTq5R3uI6hP+eXCLsXHpwT2mWfaz1ofRgRwNlDlX0S4aUycEmN4zl11r4bfhqpVNYLBYQ==} - engines: {node: '>=18'} shallow-clone@3.0.1: resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} @@ -5181,6 +5232,11 @@ snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} + '@axe-core/playwright@4.11.2(playwright-core@1.59.1)': + dependencies: + axe-core: 4.11.3 + playwright-core: 1.59.1 + '@babel/code-frame@7.29.0': dependencies: '@babel/helper-validator-identifier': 7.28.5 @@ -6444,6 +6500,10 @@ snapshots: '@pkgr/core@0.2.9': {} + '@playwright/test@1.59.1': + dependencies: + playwright: 1.59.1 + '@seald-io/binary-search-tree@1.0.3': {} '@seald-io/nedb@4.1.2': @@ -7040,6 +7100,8 @@ snapshots: dependencies: possible-typed-array-names: 1.0.0 + axe-core@4.11.3: {} + babel-loader@10.1.1(@babel/core@7.29.0)(webpack@5.106.2): dependencies: '@babel/core': 7.29.0 @@ -7966,6 +8028,11 @@ snapshots: transitivePeerDependencies: - typescript + eslint-plugin-playwright@2.10.2(eslint@10.2.0(jiti@2.4.2)): + dependencies: + eslint: 10.2.0(jiti@2.4.2) + globals: 17.5.0 + eslint-plugin-promise@7.2.1(eslint@10.2.0(jiti@2.4.2)): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.2.0(jiti@2.4.2)) @@ -9374,6 +9441,14 @@ snapshots: pvutils: 1.1.5 tslib: 2.8.1 + playwright-core@1.59.1: {} + + playwright@1.59.1: + dependencies: + playwright-core: 1.59.1 + optionalDependencies: + fsevents: 2.3.2 + plist@3.1.0: dependencies: '@xmldom/xmldom': 0.8.12 diff --git a/src/datastores/index.js b/src/datastores/index.js index df5959eb1ea22..e98e1ef0a5d40 100644 --- a/src/datastores/index.js +++ b/src/datastores/index.js @@ -29,6 +29,7 @@ function createDatastore(name) { return new Datastore({ filename: dbPath(name), autoload: !process.env.IS_ELECTRON_MAIN, + inMemoryOnly: !!process.env.IS_TESTS, // Automatically clean up corrupted data, instead of crashing corruptAlertThreshold: 1 }) diff --git a/src/renderer/components/TopNav/TopNav.vue b/src/renderer/components/TopNav/TopNav.vue index 252a54089eda1..706339d338a6e 100644 --- a/src/renderer/components/TopNav/TopNav.vue +++ b/src/renderer/components/TopNav/TopNav.vue @@ -46,6 +46,8 @@