mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 08:42:08 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
10
apps/client-e2e/.eslintrc.json
Normal file
10
apps/client-e2e/.eslintrc.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": ["plugin:cypress/recommended", "../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
8
apps/client-e2e/cypress.config.ts
Normal file
8
apps/client-e2e/cypress.config.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { nxE2EPreset } from "@nx/cypress/plugins/cypress-preset";
|
||||
import { defineConfig } from "cypress";
|
||||
|
||||
export default defineConfig({
|
||||
e2e: nxE2EPreset(__dirname, {
|
||||
bundler: "vite",
|
||||
}),
|
||||
});
|
||||
33
apps/client-e2e/project.json
Normal file
33
apps/client-e2e/project.json
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "client-e2e",
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "apps/client-e2e/src",
|
||||
"projectType": "application",
|
||||
"targets": {
|
||||
"e2e": {
|
||||
"executor": "@nx/cypress:cypress",
|
||||
"options": {
|
||||
"cypressConfig": "apps/client-e2e/cypress.config.ts",
|
||||
"devServerTarget": "client:serve:development",
|
||||
"testingType": "e2e"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "client:serve:production"
|
||||
},
|
||||
"ci": {
|
||||
"devServerTarget": "client:serve-static"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nx/eslint:lint",
|
||||
"outputs": ["{options.outputFile}"],
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/client-e2e/**/*.{js,ts}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"tags": ["frontend"],
|
||||
"implicitDependencies": ["client"]
|
||||
}
|
||||
13
apps/client-e2e/src/e2e/app.cy.ts
Normal file
13
apps/client-e2e/src/e2e/app.cy.ts
Normal file
@ -0,0 +1,13 @@
|
||||
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 client");
|
||||
});
|
||||
});
|
||||
4
apps/client-e2e/src/fixtures/example.json
Normal file
4
apps/client-e2e/src/fixtures/example.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io"
|
||||
}
|
||||
1
apps/client-e2e/src/support/app.po.ts
Normal file
1
apps/client-e2e/src/support/app.po.ts
Normal file
@ -0,0 +1 @@
|
||||
export const getGreeting = () => cy.get("h1");
|
||||
33
apps/client-e2e/src/support/commands.ts
Normal file
33
apps/client-e2e/src/support/commands.ts
Normal file
@ -0,0 +1,33 @@
|
||||
// ***********************************************
|
||||
// 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) => { ... })
|
||||
17
apps/client-e2e/src/support/e2e.ts
Normal file
17
apps/client-e2e/src/support/e2e.ts
Normal file
@ -0,0 +1,17 @@
|
||||
// ***********************************************************
|
||||
// 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.json
Normal file
10
apps/client-e2e/tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": false,
|
||||
"outDir": "../../dist/out-tsc",
|
||||
"allowJs": true,
|
||||
"types": ["cypress", "node"]
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
|
||||
}
|
||||
Reference in New Issue
Block a user