diff --git a/.github/actions/pnpm-install/action.yml b/.github/actions/pnpm-install/action.yml index fa18384a880..db110e7a22d 100644 --- a/.github/actions/pnpm-install/action.yml +++ b/.github/actions/pnpm-install/action.yml @@ -4,18 +4,12 @@ description: Restore node_modules and cache, then run pnpm install runs: using: composite steps: - - uses: actions/cache@v4 - with: - path: | - node_modules - **/node_modules - /home/runner/.cache/pnpm - /home/runner/.cache/Cypress - /home/runner/.pnpm-store - key: pnpm-${{ runner.os }}-${{ hashFiles('./pnpm-lock.yaml') }} + - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version-file: .nvmrc - - uses: pnpm/action-setup@v4 + cache: 'pnpm' + node-version-file: '.nvmrc' + - run: pnpm --version + shell: bash - run: pnpm i --frozen-lockfile shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02caa559414..f00c0a5f41c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/pnpm-install - - run: pnpm run test + - run: pnpm run test --project unit working-directory: ./packages/vuetify test-e2e: @@ -78,20 +78,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/pnpm-install - - run: pnpm cy:run --record --parallel --ci-build-id $GITHUB_RUN_ID - if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' }} + - run: pnpm run test --project browser working-directory: ./packages/vuetify - env: - CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} - - run: pnpm cy:run - if: ${{ !startswith(github.ref, 'refs/tags/v') && github.repository_owner != 'vuetifyjs' }} - working-directory: ./packages/vuetify - - uses: actions/upload-artifact@v3 - if: failure() - with: - name: cypress-screenshots - path: ./packages/vuetify/cypress/screenshots/ - if-no-files-found: ignore deploy: needs: [lint, test-unit, test-e2e, build-vuetify] diff --git a/.gitignore b/.gitignore index e556fb4f513..f433d067efa 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,8 @@ coverage/ cypress/screenshots cypress/videos +# vitest +__screenshots__/ + .vercel .now diff --git a/eslint-local-rules.js b/eslint-local-rules.js index ca3301bfd2b..8bbba50c890 100644 --- a/eslint-local-rules.js +++ b/eslint-local-rules.js @@ -6,7 +6,6 @@ module.exports = { 'jsx-condition-key': require('./scripts/rules/jsx-condition-key'), 'jsx-curly-spacing': require('./scripts/rules/jsx-curly-spacing'), 'vitest-global-imports': require('./scripts/rules/vitest-global-imports'), - 'cypress-types-reference': require('./scripts/rules/cypress-types-reference'), 'sort-imports': require('./scripts/rules/sort-imports'), 'no-nullish-coalescing-in-condition': require('./scripts/rules/no-nullish-coalescing-in-condition'), } diff --git a/package.json b/package.json index 5ba44417d02..037d29e737f 100755 --- a/package.json +++ b/package.json @@ -85,12 +85,15 @@ "vue-tsc": "^2.0.29", "yargs": "^17.7.2" }, - "packageManager": "pnpm@9.6.0", + "packageManager": "pnpm@9.10.0", "pnpm": { "patchedDependencies": { - "@mdi/js@7.4.47": "patches/@mdi__js@7.4.47.patch" + "@mdi/js@7.4.47": "patches/@mdi__js@7.4.47.patch", + "@testing-library/vue": "patches/@testing-library__vue.patch" }, "overrides": { + "@testing-library/dom": "npm:@vuetify/testing-library-dom@1.0.2", + "@types/node": "22.5.4", "tough-cookie": "5.0.0-rc.4" } } diff --git a/packages/docs/package.json b/packages/docs/package.json index 576eed5dea9..7ef5614fb64 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -81,7 +81,7 @@ "unplugin-auto-import": "0.17.5", "unplugin-fonts": "1.0.3", "unplugin-vue-components": "^0.27.4", - "vite": "^5.4.0", + "vite": "^5.4.3", "vite-plugin-md": "^0.21.5", "vite-plugin-pages": "^0.32.1", "vite-plugin-pwa": "^0.17.4", diff --git a/packages/vuetify/.eslintignore b/packages/vuetify/.eslintignore index e0a4dbe295d..bb42ae50b64 100644 --- a/packages/vuetify/.eslintignore +++ b/packages/vuetify/.eslintignore @@ -9,3 +9,5 @@ /lib-temp/ /dist/ /cypress/ +*.spec.cy.ts +*.spec.cy.tsx diff --git a/packages/vuetify/.eslintrc.js b/packages/vuetify/.eslintrc.js index f2a2419c247..78f656db0c4 100644 --- a/packages/vuetify/.eslintrc.js +++ b/packages/vuetify/.eslintrc.js @@ -44,46 +44,20 @@ module.exports = { }, }, { - files: '**/*.spec.{ts,tsx}', - env: { - 'jest/globals': true, - }, - plugins: ['jest'], - extends: ['plugin:jest/recommended'], + files: '**/*.spec.?(browser.){ts,tsx}', + plugins: ['vitest'], + extends: ['plugin:vitest/recommended'], rules: { 'local-rules/vitest-global-imports': 'error', 'no-restricted-imports': 'off', - 'jest/no-disabled-tests': 'off', - 'jest/no-large-snapshots': 'warn', - 'jest/prefer-spy-on': 'warn', - 'jest/prefer-to-be': 'warn', - 'jest/prefer-to-contain': 'warn', - 'jest/prefer-to-have-length': 'warn', - 'jest/no-standalone-expect': 'off', - 'jest/no-conditional-expect': 'off', - 'jest/no-identical-title': 'off', - }, - }, - { - files: '**/*.spec.cy.{ts,tsx}', - env: { - 'cypress/globals': true, - }, - plugins: ['cypress'], - extends: ['plugin:cypress/recommended'], - rules: { - 'local-rules/cypress-types-reference': 'error', - - 'no-restricted-imports': 'off', - - 'no-unused-expressions': 'off', - 'cypress/no-assigning-return-values': 'error', - 'cypress/no-unnecessary-waiting': 'warn', - 'cypress/assertion-before-screenshot': 'warn', - 'cypress/no-async-tests': 'error', - 'cypress/unsafe-to-chain-command': 'off', + 'vitest/no-commented-out-tests': 'off', + 'vitest/no-large-snapshots': 'warn', + 'vitest/prefer-spy-on': 'warn', + 'vitest/prefer-to-be': 'warn', + 'vitest/prefer-to-contain': 'warn', + 'vitest/prefer-to-have-length': 'warn', }, }, ], diff --git a/packages/vuetify/cypress.config.ts b/packages/vuetify/cypress.config.ts deleted file mode 100644 index 7d17f380bca..00000000000 --- a/packages/vuetify/cypress.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { defineConfig } from 'cypress' - -export default defineConfig({ - projectId: '5w5r1i', - component: { - devServer: { - framework: 'vue', - bundler: 'vite', - }, - specPattern: './src/**/*.spec.cy.{js,jsx,ts,tsx}', - supportFile: './cypress/support/index.ts', - video: false, - }, - viewportWidth: 1280, - viewportHeight: 825, -}) diff --git a/packages/vuetify/cypress/fixtures/example.json b/packages/vuetify/cypress/fixtures/example.json deleted file mode 100644 index 02e4254378e..00000000000 --- a/packages/vuetify/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/packages/vuetify/cypress/fixtures/text.txt b/packages/vuetify/cypress/fixtures/text.txt deleted file mode 100644 index 5b9c8aaf391..00000000000 --- a/packages/vuetify/cypress/fixtures/text.txt +++ /dev/null @@ -1 +0,0 @@ -This is just a simple text file. diff --git a/packages/vuetify/cypress/support/component-index.html b/packages/vuetify/cypress/support/component-index.html deleted file mode 100644 index 959c8bce4aa..00000000000 --- a/packages/vuetify/cypress/support/component-index.html +++ /dev/null @@ -1,13 +0,0 @@ - - -
- - - - - - - - - - diff --git a/packages/vuetify/cypress/support/index.ts b/packages/vuetify/cypress/support/index.ts deleted file mode 100644 index c4970b35c36..00000000000 --- a/packages/vuetify/cypress/support/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import '@percy/cypress' -import 'cypress-file-upload' -import 'cy-mobile-commands' -import 'cypress-real-events/support' -import '@mdi/font/css/materialdesignicons.css' -import './mount' -import './selector' diff --git a/packages/vuetify/cypress/support/mount.ts b/packages/vuetify/cypress/support/mount.ts deleted file mode 100644 index bd328bc9ad6..00000000000 --- a/packages/vuetify/cypress/support/mount.ts +++ /dev/null @@ -1,74 +0,0 @@ -///