Skip to content

Commit

Permalink
Fix depreciated keycode (#309)
Browse files Browse the repository at this point in the history
- use event.key instead of drepreciated event.keyCode & event.which
- add new `constants/keys` constant to avoid typos

Also made classnames/classNames import name consistant across the codebase.
  • Loading branch information
warpdesign authored Nov 21, 2022
1 parent d89807b commit 06a5e78
Show file tree
Hide file tree
Showing 18 changed files with 370 additions and 331 deletions.
42 changes: 39 additions & 3 deletions e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
import { defineConfig } from 'cypress';
import { defineConfig } from 'cypress'
import webpackPreprocessor from '@cypress/webpack-preprocessor'
import { ResolveOptions } from 'webpack'
import { resolve } from 'path'

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
// FIXME: this doesn't work: the exported default config doesn't
// seem to be the one used internally by Cypress.
// So if we use this one, this breaks TypeScript support as the
// default config doesn't include it:
// {
// mode: 'development',
// module: {
// rules: [
// {
// test: /\.jsx?$/,
// exclude: [/node_modules/],
// use: [
// {
// loader: 'babel-loader',
// options: {
// presets: ['@babel/preset-env'],
// },
// },
// ],
// },
// ],
// },
// }
// const options = webpackPreprocessor.defaultOptions.webpackOptions
//
// options.resolve = {
// alias: {
// $src: resolve(__dirname, '../src'),
// },
// } as ResolveOptions
//
// See: https://github.com/cypress-io/cypress/discussions/24751
//
// on('file:preprocessor', webpackPreprocessor(webpackPreprocessor.defaultOptions))
},
specPattern: 'cypress/e2e/**/*.spec.{js,jsx,ts,tsx}',
},
});
})
Loading

0 comments on commit 06a5e78

Please sign in to comment.