Browse Source

Task/remove Cypress setup (#5995)

* Remove Cypress setup

* Update changelog
pull/5998/head
Sven Günther 3 weeks ago
committed by GitHub
parent
commit
9092669dd8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 20
      apps/client-e2e/.eslintrc.json
  3. 12
      apps/client-e2e/cypress.json
  4. 22
      apps/client-e2e/project.json
  5. 4
      apps/client-e2e/src/fixtures/example.json
  6. 13
      apps/client-e2e/src/integration/app.spec.ts
  7. 22
      apps/client-e2e/src/plugins/index.js
  8. 1
      apps/client-e2e/src/support/app.po.ts
  9. 31
      apps/client-e2e/src/support/commands.ts
  10. 16
      apps/client-e2e/src/support/index.ts
  11. 10
      apps/client-e2e/tsconfig.e2e.json
  12. 10
      apps/client-e2e/tsconfig.json
  13. 13
      apps/ui-e2e/cypress.json
  14. 33
      apps/ui-e2e/eslint.config.cjs
  15. 28
      apps/ui-e2e/project.json
  16. 4
      apps/ui-e2e/src/fixtures/example.json
  17. 6
      apps/ui-e2e/src/integration/value/value.component.spec.ts
  18. 22
      apps/ui-e2e/src/plugins/index.js
  19. 33
      apps/ui-e2e/src/support/commands.ts
  20. 16
      apps/ui-e2e/src/support/index.ts
  21. 10
      apps/ui-e2e/tsconfig.json
  22. 402
      package-lock.json
  23. 5
      package.json

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Restricted the asset profile data gathering on Sundays to only process outdated asset profiles - Restricted the asset profile data gathering on Sundays to only process outdated asset profiles
- Removed the _Cypress_ testing setup
- Eliminated `uuid` in favor of using `randomUUID` from `node:crypto` - Eliminated `uuid` in favor of using `randomUUID` from `node:crypto`
- Upgraded `color` from version `5.0.0` to `5.0.3` - Upgraded `color` from version `5.0.0` to `5.0.3`

20
apps/client-e2e/.eslintrc.json

@ -1,20 +0,0 @@
{
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"parserOptions": {
"project": ["apps/client-e2e/tsconfig.*?.json"]
},
"rules": {}
},
{
"files": ["src/plugins/index.js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"no-undef": "off"
}
}
]
}

12
apps/client-e2e/cypress.json

@ -1,12 +0,0 @@
{
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"pluginsFile": "./src/plugins/index",
"supportFile": "./src/support/index.ts",
"video": true,
"videosFolder": "../../dist/cypress/apps/client-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/client-e2e/screenshots",
"chromeWebSecurity": false
}

22
apps/client-e2e/project.json

@ -1,22 +0,0 @@
{
"name": "client-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/client-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["client"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/client-e2e/cypress.json",
"devServerTarget": "client:serve"
},
"configurations": {
"production": {
"devServerTarget": "client:serve:production"
}
}
}
}
}

4
apps/client-e2e/src/fixtures/example.json

@ -1,4 +0,0 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io"
}

13
apps/client-e2e/src/integration/app.spec.ts

@ -1,13 +0,0 @@
import { getGreeting } from '../support/app.po';
describe('client', () => {
beforeEach(() => cy.visit('/'));
it('should display welcome message', () => {
// Custom command example, see `../support/commands.ts` file
cy.login('my-email@something.com', 'myPassword');
// Function helper example, see `../support/app.po.ts` file
getGreeting().contains('Welcome to client!');
});
});

22
apps/client-e2e/src/plugins/index.js

@ -1,22 +0,0 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// Preprocess Typescript file using Nx helper
on('file:preprocessor', preprocessTypescript(config));
};

1
apps/client-e2e/src/support/app.po.ts

@ -1 +0,0 @@
export const getGreeting = () => cy.get('h1');

31
apps/client-e2e/src/support/commands.ts

@ -1,31 +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
// ***********************************************
declare namespace Cypress {
interface Chainable<Subject> {
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) => { ... })

16
apps/client-e2e/src/support/index.ts

@ -1,16 +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';

10
apps/client-e2e/tsconfig.e2e.json

@ -1,10 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node"]
},
"include": ["src/**/*.ts", "src/**/*.js"]
}

10
apps/client-e2e/tsconfig.json

@ -1,10 +0,0 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.e2e.json"
}
]
}

13
apps/ui-e2e/cypress.json

@ -1,13 +0,0 @@
{
"fileServerFolder": ".",
"fixturesFolder": "./src/fixtures",
"integrationFolder": "./src/integration",
"modifyObstructiveCode": false,
"supportFile": "./src/support/index.ts",
"pluginsFile": "./src/plugins/index",
"video": true,
"videosFolder": "../../dist/cypress/apps/ui-e2e/videos",
"screenshotsFolder": "../../dist/cypress/apps/ui-e2e/screenshots",
"chromeWebSecurity": false,
"baseUrl": "http://localhost:4400"
}

33
apps/ui-e2e/eslint.config.cjs

@ -1,33 +0,0 @@
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const baseConfig = require('../../eslint.config.cjs');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended
});
module.exports = [
{
ignores: ['**/dist']
},
...baseConfig,
...compat.extends('plugin:cypress/recommended'),
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
languageOptions: {
parserOptions: {
project: ['apps/ui-e2e/tsconfig.json']
}
}
},
{
files: ['src/plugins/index.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-undef': 'off'
}
}
];

28
apps/ui-e2e/project.json

@ -1,28 +0,0 @@
{
"name": "ui-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/ui-e2e/src",
"projectType": "application",
"tags": [],
"implicitDependencies": ["ui"],
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/ui-e2e/cypress.json",
"devServerTarget": "ui:storybook"
},
"configurations": {
"ci": {
"devServerTarget": "ui:storybook:ci"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"lintFilePatterns": ["apps/ui-e2e/**/*.{js,ts}"]
}
}
}
}

4
apps/ui-e2e/src/fixtures/example.json

@ -1,4 +0,0 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io"
}

6
apps/ui-e2e/src/integration/value/value.component.spec.ts

@ -1,6 +0,0 @@
describe('ui', () => {
beforeEach(() => cy.visit('/iframe.html?id=valuecomponent--loading'));
it('should render the component', () => {
cy.get('gf-value').should('exist');
});
});

22
apps/ui-e2e/src/plugins/index.js

@ -1,22 +0,0 @@
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
const { preprocessTypescript } = require('@nx/cypress/plugins/preprocessor');
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
// Preprocess Typescript file using Nx helper
on('file:preprocessor', preprocessTypescript(config));
};

33
apps/ui-e2e/src/support/commands.ts

@ -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<Subject> {
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) => { ... })

16
apps/ui-e2e/src/support/index.ts

@ -1,16 +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';

10
apps/ui-e2e/tsconfig.json

@ -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"]
}

402
package-lock.json

File diff suppressed because it is too large

5
package.json

@ -9,7 +9,6 @@
"affected:apps": "nx affected:apps", "affected:apps": "nx affected:apps",
"affected:build": "nx affected:build", "affected:build": "nx affected:build",
"affected:dep-graph": "nx affected:dep-graph", "affected:dep-graph": "nx affected:dep-graph",
"affected:e2e": "nx affected:e2e",
"affected:libs": "nx affected:libs", "affected:libs": "nx affected:libs",
"affected:lint": "nx affected:lint", "affected:lint": "nx affected:lint",
"affected:test": "nx affected:test", "affected:test": "nx affected:test",
@ -27,7 +26,6 @@
"database:setup": "npm run database:push && npm run database:seed", "database:setup": "npm run database:push && npm run database:seed",
"database:validate-schema": "prisma validate", "database:validate-schema": "prisma validate",
"dep-graph": "nx dep-graph", "dep-graph": "nx dep-graph",
"e2e": "ng e2e",
"extract-locales": "nx run client:extract-i18n --output-path ./apps/client/src/locales", "extract-locales": "nx run client:extract-i18n --output-path ./apps/client/src/locales",
"format": "nx format:write", "format": "nx format:write",
"format:check": "nx format:check", "format:check": "nx format:check",
@ -155,7 +153,6 @@
"@nestjs/schematics": "11.0.9", "@nestjs/schematics": "11.0.9",
"@nestjs/testing": "11.1.8", "@nestjs/testing": "11.1.8",
"@nx/angular": "21.5.1", "@nx/angular": "21.5.1",
"@nx/cypress": "21.5.1",
"@nx/eslint-plugin": "21.5.1", "@nx/eslint-plugin": "21.5.1",
"@nx/jest": "21.5.1", "@nx/jest": "21.5.1",
"@nx/js": "21.5.1", "@nx/js": "21.5.1",
@ -178,10 +175,8 @@
"@types/passport-google-oauth20": "2.0.16", "@types/passport-google-oauth20": "2.0.16",
"@typescript-eslint/eslint-plugin": "8.43.0", "@typescript-eslint/eslint-plugin": "8.43.0",
"@typescript-eslint/parser": "8.43.0", "@typescript-eslint/parser": "8.43.0",
"cypress": "6.2.1",
"eslint": "9.35.0", "eslint": "9.35.0",
"eslint-config-prettier": "10.1.8", "eslint-config-prettier": "10.1.8",
"eslint-plugin-cypress": "4.2.0",
"eslint-plugin-import": "2.32.0", "eslint-plugin-import": "2.32.0",
"eslint-plugin-storybook": "9.1.5", "eslint-plugin-storybook": "9.1.5",
"husky": "9.1.7", "husky": "9.1.7",

Loading…
Cancel
Save