PR-342468: trying to fix cypress pipeline.

This commit is contained in:
2025-07-16 17:40:48 +00:00
parent 665252faa4
commit baa85f7916
6 changed files with 14 additions and 23 deletions

View File

@ -1,3 +1,4 @@
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
@ -19,12 +20,10 @@ import './commands'
// Alternatively you can use CommonJS syntax:
// require('./commands')
import { mount } from 'cypress/react18'
import { mount } from 'cypress/react'
// Augment the Cypress namespace to include type definitions for
// your custom command.
// Alternatively, can be defined in cypress/support/component.d.ts
// with a <reference path="./component" /> at the top of your spec.
declare global {
namespace Cypress {
interface Chainable {
@ -33,8 +32,7 @@ declare global {
}
}
// @ts-ignore
Cypress.Commands.add('mount', mount)
// Example use:
// cy.mount(<MyComponent />)
// cy.mount(<MyComponent />)

8
package-lock.json generated
View File

@ -29,7 +29,6 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/cypress": "^0.1.6",
"@types/jest": "^30.0.0",
"@types/node": "^24.0.14",
"@types/react": "^19.1.8",
@ -5035,13 +5034,6 @@
"@types/node": "*"
}
},
"node_modules/@types/cypress": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@types/cypress/-/cypress-0.1.6.tgz",
"integrity": "sha512-FYKQLvCsRYxZ3fp+XsoCiJZ1aK3x17RmaZjHI4Ou43khFkXPycrQaXo9b1J07PNlEfWnRtUc9loxHXzKjSsbYg==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/deep-eql": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",

View File

@ -13,7 +13,7 @@
"test:watch": "jest --watch",
"storybook": "storybook dev -p 3000",
"build-storybook": "storybook build",
"check-updates": "npx npm-check-updates -u --reject @types/cypress && npm i --legacy-peer-deps",
"check-updates": "npx npm-check-updates -u && npm i --legacy-peer-deps",
"cy:open": "npx cypress open",
"cy:run": "npx cypress run --headless --component"
},
@ -52,7 +52,6 @@
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/cypress": "^0.1.6",
"@types/jest": "^30.0.0",
"@types/node": "^24.0.14",
"@types/react": "^19.1.8",

View File

@ -9,7 +9,7 @@ type TCardProps = {
/**
* Is this the child component of the card. (The content)
*/
children?: JSX.Element,
children?: React.ReactNode,
};
const Card: FC<TCardProps> = ({ title, children}) => {
@ -22,4 +22,4 @@ const Card: FC<TCardProps> = ({ title, children}) => {
);
};
export { Card, TCardProps }
export { Card, TCardProps }

View File

@ -25,8 +25,7 @@
"types": [
"react",
"react-dom",
"node",
"cypress"
"node"
],
"sourceMap": true,
"baseUrl": ".",
@ -45,6 +44,9 @@
"node_modules",
"dist",
"PRNameGenerator.ts",
"cypress.config.ts"
"**/*.test.tsx",
"**/*.test.ts",
"**/*.cy.tsx",
"**/*.cy.ts"
]
}
}

View File

@ -46,7 +46,7 @@ export default {
rules: [
{
test: /\.(ts|tsx)$/,
exclude: /node_modules/,
exclude: [/node_modules/, /\.test\.(ts|tsx)$/, /\.cy\.(ts|tsx)$/],
use: 'ts-loader',
},
{
@ -88,4 +88,4 @@ export default {
new TerserPlugin(),
],
},
}
}