mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-19 19:21:33 +10:00
refactor(v4.0.0-alpha): beginning of a new era
This commit is contained in:
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";
|
||||
Reference in New Issue
Block a user