Skip to content

Commit

Permalink
adding cypress intellisense support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sophia-15 committed Jun 6, 2024
1 parent 826975e commit f87b4b1
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cypress/e2e/ManagingOrder.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('HomePage', () => {
console.log("error", e.message);
return false;
});

cy.CreateClient("Sophia Gallindo")
cy.CreateSolicitation()
cy.visit('/')
Expand Down
3 changes: 3 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/// <reference types="cypress" />
/// <reference types="../support" />

Cypress.Commands.add('DeleteAndCreateAdm', () => {
cy.exec('python test_initiate.py', { failOnNonZeroExit: false })
});
Expand Down
17 changes: 17 additions & 0 deletions cypress/support/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/// <reference types="cypress" />

declare namespace Cypress {
interface Chainable<Subject> {
DeleteAndCreateAdm(): Chainable<any>;
CreateClient(name?: string, email?: string): Chainable<any>;
CreateClient(name?: string, email?: string): Chainable<any>;
CreateOrder(): Chainable<any>;
CreateEmployee(name?: string, email?: string): Chainable<any>;
CreateSolicitation(): Chainable<any>;
ClientLogout(): Chainable<any>;
GoToClient(email: string, password: string): Chainable<any>;
CreateAdmin(): Chainable<any>;
ChangeToAdmin(): Chainable<any>;
GoToEmployee(email: string, firstLogin: boolean): Chainable<any>;
}
}
13 changes: 13 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"lib": ["es2015", "dom"],
"allowJs": true,
"noEmit": true,
"types": [
"cypress"
]
},
"include": [
"cypress/**/*.js"
]
}

0 comments on commit f87b4b1

Please sign in to comment.