Add some code help to cypress folder
This commit is contained in:
parent
e4839df4db
commit
f3bf5b6b89
|
|
@ -0,0 +1,5 @@
|
||||||
|
module.exports = {
|
||||||
|
"extends": [
|
||||||
|
"plugin:cypress/recommended"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
// Intellisense for custom Commands: https://github.com/cypress-io/cypress-example-todomvc#cypress-intellisense
|
||||||
|
declare namespace Cypress {
|
||||||
|
interface Chainable<Subject> {
|
||||||
|
/**
|
||||||
|
* Login via API call to the GraphQL endpoint, without calling the frontend. Faster than the other login.
|
||||||
|
* @param username
|
||||||
|
* @param password
|
||||||
|
* @example
|
||||||
|
* cy.apolloLogin('nico.zickgraf', 'test')
|
||||||
|
*/
|
||||||
|
apolloLogin(username: string, password: string): Chainable<any>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects an element based on the `data-cy=xxx` attribute
|
||||||
|
* @param selector - The value of the data-cy attribute to select
|
||||||
|
* @example
|
||||||
|
* cy.dataCy('my-new-button')
|
||||||
|
*/
|
||||||
|
dataCy(selector: string): Chainable<any>
|
||||||
|
|
||||||
|
selectClass(schoolClass: string): void
|
||||||
|
|
||||||
|
login(username:string, password:string, visitLogin?: boolean): void
|
||||||
|
fakeLogin(username:string, password:string): void
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"types": [
|
||||||
|
"cypress"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"**/*.*"
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue