From 552a36cc026eb24f3d5b100a3244ffa994ba817b Mon Sep 17 00:00:00 2001 From: tomast1337 Date: Fri, 26 Sep 2025 08:33:52 -0300 Subject: [PATCH 01/38] chore: remove @stylistic/eslint-plugin from devDependencies and update ESLint configuration for improved rule management --- bun.lock | 38 +++++++++++++ eslint.config.js | 143 +++++++++++++++++++++++++---------------------- 2 files changed, 114 insertions(+), 67 deletions(-) diff --git a/bun.lock b/bun.lock index c57e0d8b..12b893f4 100644 --- a/bun.lock +++ b/bun.lock @@ -4203,6 +4203,34 @@ "terser-webpack-plugin/schema-utils/ajv-keywords": ["ajv-keywords@5.1.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3" }, "peerDependencies": { "ajv": "^8.8.2" } }, "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw=="], + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="], + + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/typescript-estree": "8.44.1", "@typescript-eslint/utils": "8.44.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-KdEerZqHWXsRNKjF9NYswNISnFzXfXNDfPxoTh7tqohU/PRIbwTmsjGK6V9/RTYWau7NZvfo52lgVk+sJh0K3g=="], + + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="], + + "typescript-eslint/@typescript-eslint/parser/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="], + + "typescript-eslint/@typescript-eslint/parser/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + + "typescript-eslint/@typescript-eslint/parser/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.44.1", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.44.1", "@typescript-eslint/types": "^8.44.1", "debug": "^4.3.4" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-ycSa60eGg8GWAkVsKV4E6Nz33h+HjTXbsDT4FILyL8Obk5/mx4tbvCNsLf9zret3ipSumAOG89UcCs/KRaKYrA=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.44.1", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-B5OyACouEjuIvof3o86lRMvyDsFwZm+4fBOqFHccIctYgBjqR3qT39FBYGN87khcgf0ExpdCBeGKpKRhSFTjKQ=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="], + + "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "@typescript-eslint/visitor-keys": "8.44.1" } }, "sha512-NdhWHgmynpSvyhchGLXh+w12OMT308Gm25JoRIyTZqEbApiBiQHD/8xgb6LqCWCFcxFtWwaVdFsLPQI3jvhywg=="], + + "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + "unified-engine/@types/node/undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="], "unified-engine/concat-stream/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="], @@ -4339,6 +4367,16 @@ "terser-webpack-plugin/schema-utils/ajv/json-schema-traverse": ["json-schema-traverse@1.0.0", "", {}, "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="], + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/scope-manager/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/type-utils/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + + "typescript-eslint/@typescript-eslint/eslint-plugin/@typescript-eslint/visitor-keys/@typescript-eslint/types": ["@typescript-eslint/types@8.44.1", "", {}, "sha512-Lk7uj7y9uQUOEguiDIDLYLJOrYHQa7oBiURYVFqIpGxclAFQ78f6VUOM8lI2XEuNOKNB7XuvM2+2cMXAoq4ALQ=="], + + "typescript-eslint/@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="], + + "typescript-eslint/@typescript-eslint/utils/@typescript-eslint/scope-manager/@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.44.1", "", { "dependencies": { "@typescript-eslint/types": "8.44.1", "eslint-visitor-keys": "^4.2.1" } }, "sha512-576+u0QD+Jp3tZzvfRfxon0EA2lzcDt3lhUbsC6Lgzy9x2VR4E+JUiNyGHi5T8vk0TV+fpJ5GLG1JsJuWCaKhw=="], + "vfile-reporter/string-width/strip-ansi/ansi-regex": ["ansi-regex@6.1.0", "", {}, "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA=="], "web-resource-inliner/htmlparser2/domutils/dom-serializer": ["dom-serializer@1.4.1", "", { "dependencies": { "domelementtype": "^2.0.1", "domhandler": "^4.2.0", "entities": "^2.0.0" } }, "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag=="], diff --git a/eslint.config.js b/eslint.config.js index 5c33c8c8..9dd8f689 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,15 +1,12 @@ import js from '@eslint/js'; -import tseslint from '@typescript-eslint/eslint-plugin'; import tsparser from '@typescript-eslint/parser'; -import prettierConfig from 'eslint-config-prettier'; -import prettierPlugin from 'eslint-plugin-prettier'; +import tseslint from '@typescript-eslint/eslint-plugin'; import globals from 'globals'; +import importPlugin from 'eslint-plugin-import'; +import react from 'eslint-plugin-react'; -export default [ - // Base JavaScript configuration - js.configs.recommended, - - // Global ignore patterns +export default tseslint.config( + // Global ignores (no changes here) { ignores: [ '**/node_modules/**', @@ -26,86 +23,98 @@ export default [ ], }, - // Universal TypeScript configuration for the entire monorepo + // Base recommended configurations + js.configs.recommended, + ...tseslint.configs.recommended, + + // Main configuration object { files: ['**/*.ts', '**/*.tsx'], languageOptions: { parser: tsparser, - parserOptions: { - ecmaVersion: 2021, - sourceType: 'module', - // Don't use project-based parsing to avoid config issues - ecmaFeatures: { - jsx: true, - }, - }, - globals: { - // Universal globals that work everywhere - ...globals.node, - ...globals.browser, - ...globals.es2021, - console: 'readonly', - process: 'readonly', - Buffer: 'readonly', - __dirname: 'readonly', - __filename: 'readonly', - global: 'readonly', - React: 'readonly', - JSX: 'readonly', - }, + globals: { ...globals.node, ...globals.es2021, ...globals.bun }, }, plugins: { - '@typescript-eslint': tseslint, - prettier: prettierPlugin, + import: importPlugin, + }, + settings: { + 'import/resolver': { + typescript: { + project: [ + 'apps/*/tsconfig.json', + 'packages/*/tsconfig.json', + './tsconfig.json', + ], + }, + node: true, + }, + 'import/core-modules': ['bun:test', 'bun:sqlite', 'bun'], }, rules: { - // Turn off rules that conflict with TypeScript - 'no-undef': 'off', // TypeScript handles this - 'no-unused-vars': 'off', // Use TypeScript version instead - 'no-redeclare': 'off', // TypeScript handles this better - - // Turn off rules that don't exist or cause issues - 'react-hooks/exhaustive-deps': 'off', - '@next/next/no-sync-scripts': 'off', - 'no-shadow-restricted-names': 'off', + ...importPlugin.configs.recommended.rules, + ...importPlugin.configs.typescript.rules, - // TypeScript specific rules - simplified and lenient + // Core and TypeScript rules + 'no-console': 'warn', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-require-imports': 'warn', + '@typescript-eslint/ban-ts-comment': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { - argsIgnorePattern: '^_', + vars: 'all', varsIgnorePattern: '^_', - caughtErrorsIgnorePattern: '^_', - ignoreRestSiblings: true, + args: 'after-used', + argsIgnorePattern: '^_', }, ], - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-inferrable-types': 'off', - - // Prettier integration - 'prettier/prettier': [ + 'lines-between-class-members': [ 'warn', + 'always', + { exceptAfterSingleLine: true }, + ], + + // Import rules + 'import/order': [ + 'error', { - endOfLine: 'auto', - trailingComma: 'all', + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + 'object', + 'unknown', + ], + pathGroups: [{ pattern: '@/**', group: 'internal' }], + pathGroupsExcludedImportTypes: ['builtin'], + 'newlines-between': 'always', + alphabetize: { order: 'asc', caseInsensitive: true }, }, ], + 'import/newline-after-import': 'error', + 'import/no-duplicates': 'error', + }, + }, - // Relaxed rules for monorepo compatibility - 'no-console': 'off', - 'prefer-const': 'warn', - 'no-constant-condition': 'warn', - 'no-constant-binary-expression': 'warn', + // React specific configuration + { + files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'], + plugins: { + react, + }, + rules: { + ...react.configs.recommended.rules, + 'react/react-in-jsx-scope': 'off', + 'react/no-unknown-property': [ + 'error', + { ignore: ['custom-prop', 'cmdk-input-wrapper', 'cmdk-group-heading'] }, + ], }, settings: { - react: { - version: 'detect', - }, + react: { version: 'detect' }, }, }, - - // Prettier config (must be last to override conflicting rules) - prettierConfig, -]; +); From ccc1e503d6184ac3ebb0272560a598bd0379f60c Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sun, 28 Sep 2025 16:07:04 -0300 Subject: [PATCH 02/38] build: fix typo in `start` script for frontend --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7ea84091..cbb1822d 100644 --- a/package.json +++ b/package.json @@ -52,10 +52,10 @@ "start:apps": "bun run --filter './apps/*' start", "start:server": "bun run --filter '@nbw/backend start", - "start:web": "bun run --filter '@nbs/frontend' start", + "start:web": "bun run --filter '@nbw/frontend' start", "dev:server": "bun run --filter '@nbw/backend' start:dev", - "dev:web": "bun run --filter '@nbs/frontend' dev", + "dev:web": "bun run --filter '@nbw/frontend' dev", "dev:apps": "bun run --filter './apps/*' dev", "dev": "(cd apps/backend && bun run start:dev) & (cd apps/frontend && bun run dev)", From e4ab68d15fc0e4297edaa7a5a1260abd80e87525 Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sun, 28 Sep 2025 16:08:00 -0300 Subject: [PATCH 03/38] chore: add missing `outDir` property to `tsconfig.base.json` --- tsconfig.base.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.base.json b/tsconfig.base.json index 418d6802..2415664e 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "outDir": "./dist", // Base strict settings "strict": true, "skipLibCheck": true, From cb734925ffff5c9640c25fd8a4f1997af1444552 Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sun, 28 Sep 2025 16:09:43 -0300 Subject: [PATCH 04/38] chore: remove workbench color customizations from VS Code settings file --- .vscode/settings.json | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 640488af..5741f0d0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,24 +9,4 @@ "editor.codeActionsOnSave": { "source.fixAll": "explicit" }, - "workbench.colorCustomizations": { - "activityBar.activeBackground": "#fac977", - "activityBar.background": "#fac977", - "activityBar.foreground": "#15202b", - "activityBar.inactiveForeground": "#15202b99", - "activityBarBadge.background": "#069a62", - "activityBarBadge.foreground": "#e7e7e7", - "commandCenter.border": "#15202b99", - "sash.hoverBorder": "#fac977", - "statusBar.background": "#f8b646", - "statusBar.foreground": "#15202b", - "statusBarItem.hoverBackground": "#f6a315", - "statusBarItem.remoteBackground": "#f8b646", - "statusBarItem.remoteForeground": "#15202b", - "titleBar.activeBackground": "#f8b646", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveBackground": "#f8b64699", - "titleBar.inactiveForeground": "#15202b99" - }, - "peacock.color": "#f8b646" } \ No newline at end of file From a238ce7dc8877bc826f255ece6c1fd4d6a3cbc62 Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sun, 28 Sep 2025 16:10:49 -0300 Subject: [PATCH 05/38] chore: enforce `eslint.useFlatConfig` in VS Code settings --- .vscode/settings.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 5741f0d0..bd62d179 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,11 @@ { + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, "eslint.validate": [ "typescript" ], "eslint.run": "onType", + "eslint.useFlatConfig": true, "eslint.format.enable": true, "mdx.server.enable": true, "editor.codeActionsOnSave": { From 7d2db0ff9146c69e8a21ef791c0903fd5fd8018b Mon Sep 17 00:00:00 2001 From: Bentroen <29354120+Bentroen@users.noreply.github.com> Date: Sun, 28 Sep 2025 16:52:32 -0300 Subject: [PATCH 06/38] chore: remove unused `tests` package It's preferable we re-add this package when E2E tests are actually implemented. --- tests/cypress.config.js | 9 - .../cypress/e2e/1-getting-started/todo.cy.js | 143 -------- .../e2e/2-advanced-examples/actions.cy.js | 321 ------------------ .../e2e/2-advanced-examples/aliasing.cy.js | 39 --- .../e2e/2-advanced-examples/assertions.cy.js | 176 ---------- .../e2e/2-advanced-examples/connectors.cy.js | 98 ------ .../e2e/2-advanced-examples/cookies.cy.js | 118 ------- .../e2e/2-advanced-examples/cypress_api.cy.js | 185 ---------- .../e2e/2-advanced-examples/files.cy.js | 85 ----- .../e2e/2-advanced-examples/location.cy.js | 32 -- .../e2e/2-advanced-examples/misc.cy.js | 90 ----- .../e2e/2-advanced-examples/navigation.cy.js | 55 --- .../network_requests.cy.js | 163 --------- .../e2e/2-advanced-examples/querying.cy.js | 114 ------- .../spies_stubs_clocks.cy.js | 204 ----------- .../e2e/2-advanced-examples/storage.cy.js | 117 ------- .../e2e/2-advanced-examples/traversal.cy.js | 121 ------- .../e2e/2-advanced-examples/utilities.cy.js | 107 ------ .../e2e/2-advanced-examples/viewport.cy.js | 58 ---- .../e2e/2-advanced-examples/waiting.cy.js | 30 -- .../e2e/2-advanced-examples/window.cy.js | 22 -- tests/cypress/fixtures/example.json | 5 - tests/cypress/support/commands.js | 25 -- tests/cypress/support/e2e.js | 20 -- tests/package.json | 14 - 25 files changed, 2351 deletions(-) delete mode 100644 tests/cypress.config.js delete mode 100644 tests/cypress/e2e/1-getting-started/todo.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/actions.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/aliasing.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/assertions.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/connectors.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/cookies.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/cypress_api.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/files.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/location.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/misc.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/navigation.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/network_requests.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/querying.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/spies_stubs_clocks.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/storage.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/traversal.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/utilities.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/viewport.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/waiting.cy.js delete mode 100644 tests/cypress/e2e/2-advanced-examples/window.cy.js delete mode 100644 tests/cypress/fixtures/example.json delete mode 100644 tests/cypress/support/commands.js delete mode 100644 tests/cypress/support/e2e.js delete mode 100644 tests/package.json diff --git a/tests/cypress.config.js b/tests/cypress.config.js deleted file mode 100644 index 97f47c41..00000000 --- a/tests/cypress.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const { defineConfig } = require("cypress"); - -module.exports = defineConfig({ - e2e: { - setupNodeEvents(on, config) { - // implement node event listeners here - }, - }, -}); diff --git a/tests/cypress/e2e/1-getting-started/todo.cy.js b/tests/cypress/e2e/1-getting-started/todo.cy.js deleted file mode 100644 index 4768ff92..00000000 --- a/tests/cypress/e2e/1-getting-started/todo.cy.js +++ /dev/null @@ -1,143 +0,0 @@ -/// - -// Welcome to Cypress! -// -// This spec file contains a variety of sample tests -// for a todo list app that are designed to demonstrate -// the power of writing tests in Cypress. -// -// To learn more about how Cypress works and -// what makes it such an awesome testing tool, -// please read our getting started guide: -// https://on.cypress.io/introduction-to-cypress - -describe('example to-do app', () => { - beforeEach(() => { - // Cypress starts out with a blank slate for each test - // so we must tell it to visit our website with the `cy.visit()` command. - // Since we want to visit the same URL at the start of all our tests, - // we include it in our beforeEach function so that it runs before each test - cy.visit('https://example.cypress.io/todo') - }) - - it('displays two todo items by default', () => { - // We use the `cy.get()` command to get all elements that match the selector. - // Then, we use `should` to assert that there are two matched items, - // which are the two default items. - cy.get('.todo-list li').should('have.length', 2) - - // We can go even further and check that the default todos each contain - // the correct text. We use the `first` and `last` functions - // to get just the first and last matched elements individually, - // and then perform an assertion with `should`. - cy.get('.todo-list li').first().should('have.text', 'Pay electric bill') - cy.get('.todo-list li').last().should('have.text', 'Walk the dog') - }) - - it('can add new todo items', () => { - // We'll store our item text in a variable so we can reuse it - const newItem = 'Feed the cat' - - // Let's get the input element and use the `type` command to - // input our new list item. After typing the content of our item, - // we need to type the enter key as well in order to submit the input. - // This input has a data-test attribute so we'll use that to select the - // element in accordance with best practices: - // https://on.cypress.io/selecting-elements - cy.get('[data-test=new-todo]').type(`${newItem}{enter}`) - - // Now that we've typed our new item, let's check that it actually was added to the list. - // Since it's the newest item, it should exist as the last element in the list. - // In addition, with the two default items, we should have a total of 3 elements in the list. - // Since assertions yield the element that was asserted on, - // we can chain both of these assertions together into a single statement. - cy.get('.todo-list li') - .should('have.length', 3) - .last() - .should('have.text', newItem) - }) - - it('can check off an item as completed', () => { - // In addition to using the `get` command to get an element by selector, - // we can also use the `contains` command to get an element by its contents. - // However, this will yield the