Skip to content

Commit

Permalink
'cypress'
Browse files Browse the repository at this point in the history
  • Loading branch information
dudiharush committed Sep 30, 2020
1 parent 10f0fc0 commit 7ad5d2d
Show file tree
Hide file tree
Showing 13 changed files with 1,276 additions and 1,016 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'cypress'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
"plugin:cypress/recommended"
],
parserOptions: {
project: './tsconfig.json',
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js
8 changes: 2 additions & 6 deletions cypress/integration/spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
// enables intelligent code completion for Cypress commands
// https://on.cypress.io/intelligent-code-completion
/// <reference types="Cypress" />

context('Example Cypress TodoMVC test', () => {
describe('Example Cypress TodoMVC test', () => {
beforeEach(() => {
cy.visit('/')
})
Expand All @@ -15,7 +11,7 @@ context('Example Cypress TodoMVC test', () => {
})

it('tries cypress test', function() {
cy.queryByText('Webpack + TypeScript + React = ❤️').should('exist')
cy.findAllByText('Webpack + TypeScript + React = ❤️').should('exist')
})
})
})
26 changes: 0 additions & 26 deletions cypress/plugins/cy-ts-preprocessor.js

This file was deleted.

6 changes: 2 additions & 4 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const cypressTypeScriptPreprocessor = require('./cy-ts-preprocessor')
module.exports = (on, config) => {

module.exports = on => {
on('file:preprocessor', cypressTypeScriptPreprocessor)
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@testing-library/cypress/add-commands';
2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import './commands'
import './commands';
21 changes: 11 additions & 10 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// {
// "compilerOptions": {
// "strict": true,
// "baseUrl": "../node_modules",
// "target": "es5",
// "lib": ["es5", "dom"],
// "types": ["cypress"]
// },
// "include": ["**/*.ts"]
// }
{
"compilerOptions": {
"strict": true,
"noEmit": true,
"baseUrl": "..\\node_modules",
"target": "es5",
"lib": ["esnext", "dom"],
"types": ["cypress", "@testing-library/cypress"]
},
"include": ["**/*.ts", "support/commands.js"]
}
2 changes: 1 addition & 1 deletion dev.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['react'],
parserOptions: {
project: './tsconfig.json',
project: ['./tsconfig.json', 'cypress/tsconfig.json'],
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
Expand Down
Loading

0 comments on commit 7ad5d2d

Please sign in to comment.