From 2eb19d46d5a6e14a5f23716c1f98b9a54238e42a Mon Sep 17 00:00:00 2001 From: mikiher Date: Tue, 30 Apr 2024 11:30:00 +0300 Subject: [PATCH] Move test files to a separate directory --- client/cypress.config.js | 3 ++- .../{ => cypress/tests}/components/cards/AuthorCard.cy.js | 8 ++++---- .../tests}/components/cards/LazySeriesCard.cy.js | 4 ++-- .../tests}/components/cards/NarratorCard.cy.js | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) rename client/{ => cypress/tests}/components/cards/AuthorCard.cy.js (95%) rename client/{ => cypress/tests}/components/cards/LazySeriesCard.cy.js (98%) rename client/{ => cypress/tests}/components/cards/NarratorCard.cy.js (97%) diff --git a/client/cypress.config.js b/client/cypress.config.js index f473170c..b48f42a2 100644 --- a/client/cypress.config.js +++ b/client/cypress.config.js @@ -5,6 +5,7 @@ module.exports = defineConfig({ devServer: { framework: "nuxt", bundler: "webpack" - } + }, + specPattern: "cypress/tests/**/*.cy.js" } }) diff --git a/client/components/cards/AuthorCard.cy.js b/client/cypress/tests/components/cards/AuthorCard.cy.js similarity index 95% rename from client/components/cards/AuthorCard.cy.js rename to client/cypress/tests/components/cards/AuthorCard.cy.js index 79213595..971bc69a 100644 --- a/client/components/cards/AuthorCard.cy.js +++ b/client/cypress/tests/components/cards/AuthorCard.cy.js @@ -1,8 +1,8 @@ // Import the necessary dependencies -import AuthorCard from './AuthorCard.vue' -import AuthorImage from '../covers/AuthorImage.vue' -import Tooltip from '../ui/Tooltip.vue' -import LoadingSpinner from '../widgets/LoadingSpinner.vue' +import AuthorCard from '@/components/cards/AuthorCard.vue' +import AuthorImage from '@/components/covers/AuthorImage.vue' +import Tooltip from '@/components/ui/Tooltip.vue' +import LoadingSpinner from '@/components/widgets/LoadingSpinner.vue' describe('AuthorCard', () => { const author = { diff --git a/client/components/cards/LazySeriesCard.cy.js b/client/cypress/tests/components/cards/LazySeriesCard.cy.js similarity index 98% rename from client/components/cards/LazySeriesCard.cy.js rename to client/cypress/tests/components/cards/LazySeriesCard.cy.js index 3052518f..7d11ead9 100644 --- a/client/components/cards/LazySeriesCard.cy.js +++ b/client/cypress/tests/components/cards/LazySeriesCard.cy.js @@ -1,5 +1,5 @@ -import LazySeriesCard from './LazySeriesCard.vue' -import GroupCover from '../covers/GroupCover.vue' +import LazySeriesCard from '@/components/cards/LazySeriesCard.vue' +import GroupCover from '@/components/covers/GroupCover.vue' describe('LazySeriesCard', () => { const series = { diff --git a/client/components/cards/NarratorCard.cy.js b/client/cypress/tests/components/cards/NarratorCard.cy.js similarity index 97% rename from client/components/cards/NarratorCard.cy.js rename to client/cypress/tests/components/cards/NarratorCard.cy.js index a7596891..c51af54c 100644 --- a/client/components/cards/NarratorCard.cy.js +++ b/client/cypress/tests/components/cards/NarratorCard.cy.js @@ -1,4 +1,4 @@ -import NarratorCard from './NarratorCard.vue' +import NarratorCard from '@/components/cards/NarratorCard.vue' describe('', () => { const narrator = {