mirror of https://github.com/ghostfolio/ghostfolio
committed by
GitHub
23 changed files with 339 additions and 395 deletions
@ -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" |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
} |
|
||||
@ -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 |
|
||||
} |
|
||||
@ -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" |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,4 +0,0 @@ |
|||||
{ |
|
||||
"name": "Using fixtures to represent data", |
|
||||
"email": "hello@cypress.io" |
|
||||
} |
|
||||
@ -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!'); |
|
||||
}); |
|
||||
}); |
|
||||
@ -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 +0,0 @@ |
|||||
export const getGreeting = () => cy.get('h1'); |
|
||||
@ -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) => { ... })
|
|
||||
@ -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'; |
|
||||
@ -1,10 +0,0 @@ |
|||||
{ |
|
||||
"extends": "./tsconfig.json", |
|
||||
"compilerOptions": { |
|
||||
"sourceMap": false, |
|
||||
"outDir": "../../dist/out-tsc", |
|
||||
"allowJs": true, |
|
||||
"types": ["cypress", "node"] |
|
||||
}, |
|
||||
"include": ["src/**/*.ts", "src/**/*.js"] |
|
||||
} |
|
||||
@ -1,10 +0,0 @@ |
|||||
{ |
|
||||
"extends": "../../tsconfig.base.json", |
|
||||
"files": [], |
|
||||
"include": [], |
|
||||
"references": [ |
|
||||
{ |
|
||||
"path": "./tsconfig.e2e.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" |
|
||||
} |
|
||||
@ -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' |
|
||||
} |
|
||||
} |
|
||||
]; |
|
||||
@ -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}"] |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -1,4 +0,0 @@ |
|||||
{ |
|
||||
"name": "Using fixtures to represent data", |
|
||||
"email": "hello@cypress.io" |
|
||||
} |
|
||||
@ -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'); |
|
||||
}); |
|
||||
}); |
|
||||
@ -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,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) => { ... })
|
|
||||
@ -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'; |
|
||||
@ -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"] |
|
||||
} |
|
||||
File diff suppressed because it is too large
Loading…
Reference in new issue