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 // This example support/component.ts is processed and
// loaded automatically before your test files. // loaded automatically before your test files.
@ -19,12 +20,10 @@ import './commands'
// Alternatively you can use CommonJS syntax: // Alternatively you can use CommonJS syntax:
// require('./commands') // require('./commands')
import { mount } from 'cypress/react18' import { mount } from 'cypress/react'
// Augment the Cypress namespace to include type definitions for // Augment the Cypress namespace to include type definitions for
// your custom command. // 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 { declare global {
namespace Cypress { namespace Cypress {
interface Chainable { interface Chainable {
@ -33,7 +32,6 @@ declare global {
} }
} }
// @ts-ignore
Cypress.Commands.add('mount', mount) Cypress.Commands.add('mount', mount)
// Example use: // Example use:

8
package-lock.json generated
View File

@ -29,7 +29,6 @@
"@testing-library/jest-dom": "^6.6.3", "@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0", "@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1", "@testing-library/user-event": "^14.6.1",
"@types/cypress": "^0.1.6",
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.0.14", "@types/node": "^24.0.14",
"@types/react": "^19.1.8", "@types/react": "^19.1.8",
@ -5035,13 +5034,6 @@
"@types/node": "*" "@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": { "node_modules/@types/deep-eql": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",

View File

@ -13,7 +13,7 @@
"test:watch": "jest --watch", "test:watch": "jest --watch",
"storybook": "storybook dev -p 3000", "storybook": "storybook dev -p 3000",
"build-storybook": "storybook build", "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:open": "npx cypress open",
"cy:run": "npx cypress run --headless --component" "cy:run": "npx cypress run --headless --component"
}, },
@ -52,7 +52,6 @@
"@testing-library/jest-dom": "^6.6.3", "@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0", "@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1", "@testing-library/user-event": "^14.6.1",
"@types/cypress": "^0.1.6",
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.0.14", "@types/node": "^24.0.14",
"@types/react": "^19.1.8", "@types/react": "^19.1.8",

View File

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

View File

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

View File

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