From 1ace4bc8278b8ebf1b53cf3bb50ed3a6edc1eb1b Mon Sep 17 00:00:00 2001 From: Artem-Darius Atlas Date: Mon, 24 Jul 2023 13:50:11 +0300 Subject: [PATCH] refactor: remove unuseful ui-e2e tests --- apps/ui-e2e/.eslintrc.json | 10 -------- apps/ui-e2e/cypress.config.ts | 6 ----- apps/ui-e2e/project.json | 30 ------------------------ apps/ui-e2e/src/e2e/ui/ui.cy.ts | 7 ------ apps/ui-e2e/src/fixtures/example.json | 4 ---- apps/ui-e2e/src/support/commands.ts | 33 --------------------------- apps/ui-e2e/src/support/e2e.ts | 17 -------------- apps/ui-e2e/tsconfig.json | 10 -------- 8 files changed, 117 deletions(-) delete mode 100644 apps/ui-e2e/.eslintrc.json delete mode 100644 apps/ui-e2e/cypress.config.ts delete mode 100644 apps/ui-e2e/project.json delete mode 100644 apps/ui-e2e/src/e2e/ui/ui.cy.ts delete mode 100644 apps/ui-e2e/src/fixtures/example.json delete mode 100644 apps/ui-e2e/src/support/commands.ts delete mode 100644 apps/ui-e2e/src/support/e2e.ts delete mode 100644 apps/ui-e2e/tsconfig.json diff --git a/apps/ui-e2e/.eslintrc.json b/apps/ui-e2e/.eslintrc.json deleted file mode 100644 index 696cb8b..0000000 --- a/apps/ui-e2e/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["plugin:cypress/recommended", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/apps/ui-e2e/cypress.config.ts b/apps/ui-e2e/cypress.config.ts deleted file mode 100644 index bc83e7c..0000000 --- a/apps/ui-e2e/cypress.config.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { defineConfig } from 'cypress'; -import { nxE2EStorybookPreset } from '@nx/storybook/presets/cypress'; - -export default defineConfig({ - e2e: nxE2EStorybookPreset(__dirname), -}); diff --git a/apps/ui-e2e/project.json b/apps/ui-e2e/project.json deleted file mode 100644 index 7d354d0..0000000 --- a/apps/ui-e2e/project.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "ui-e2e", - "$schema": "../../node_modules/nx/schemas/project-schema.json", - "sourceRoot": "apps/ui-e2e/src", - "projectType": "application", - "targets": { - "e2e": { - "executor": "@nx/cypress:cypress", - "options": { - "cypressConfig": "apps/ui-e2e/cypress.config.ts", - "devServerTarget": "ui:storybook", - "testingType": "e2e" - }, - "configurations": { - "ci": { - "devServerTarget": "ui:static-storybook:ci" - } - } - }, - "lint": { - "executor": "@nx/linter:eslint", - "outputs": ["{options.outputFile}"], - "options": { - "lintFilePatterns": ["apps/ui-e2e/**/*.{js,ts}"] - } - } - }, - "tags": [], - "implicitDependencies": ["ui"] -} diff --git a/apps/ui-e2e/src/e2e/ui/ui.cy.ts b/apps/ui-e2e/src/e2e/ui/ui.cy.ts deleted file mode 100644 index 1180a5c..0000000 --- a/apps/ui-e2e/src/e2e/ui/ui.cy.ts +++ /dev/null @@ -1,7 +0,0 @@ -describe('ui: Ui component', () => { - beforeEach(() => cy.visit('/iframe.html?id=ui--primary')); - - it('should render the component', () => { - cy.get('h1').should('contain', 'Welcome to Ui!'); - }); -}); diff --git a/apps/ui-e2e/src/fixtures/example.json b/apps/ui-e2e/src/fixtures/example.json deleted file mode 100644 index 294cbed..0000000 --- a/apps/ui-e2e/src/fixtures/example.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io" -} diff --git a/apps/ui-e2e/src/support/commands.ts b/apps/ui-e2e/src/support/commands.ts deleted file mode 100644 index 310f1fa..0000000 --- a/apps/ui-e2e/src/support/commands.ts +++ /dev/null @@ -1,33 +0,0 @@ -// *********************************************** -// This example commands.js shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** - -// eslint-disable-next-line @typescript-eslint/no-namespace -declare namespace Cypress { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - interface Chainable { - login(email: string, password: string): void; - } -} -// -// -- This is a parent command -- -Cypress.Commands.add('login', (email, password) => { - console.log('Custom command example: Login', email, password); -}); -// -// -- This is a child command -- -// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) diff --git a/apps/ui-e2e/src/support/e2e.ts b/apps/ui-e2e/src/support/e2e.ts deleted file mode 100644 index 3d469a6..0000000 --- a/apps/ui-e2e/src/support/e2e.ts +++ /dev/null @@ -1,17 +0,0 @@ -// *********************************************************** -// This example support/index.js is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands'; diff --git a/apps/ui-e2e/tsconfig.json b/apps/ui-e2e/tsconfig.json deleted file mode 100644 index cc509a7..0000000 --- a/apps/ui-e2e/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "sourceMap": false, - "outDir": "../../dist/out-tsc", - "allowJs": true, - "types": ["cypress", "node"] - }, - "include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"] -}