Skip to content

Commit

Permalink
configure code cov
Browse files Browse the repository at this point in the history
  • Loading branch information
jadmsaadaot committed Jul 23, 2024
1 parent 7e40490 commit 4518318
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 80 deletions.
8 changes: 8 additions & 0 deletions submit-web/cypress.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ module.exports = defineConfig({
framework: "react",
bundler: "vite",
},
setupNodeEvents(on, config) {
require('@cypress/code-coverage/task')(on, config)
// include any other plugin code...

// It's IMPORTANT to return the config object
// with any changed environment variables
return config
},
},
});
1 change: 1 addition & 0 deletions submit-web/cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import './commands'
// require('./commands')

import { mount } from 'cypress/react18'
import '@cypress/code-coverage/support'

// Augment the Cypress namespace to include type definitions for
// your custom command.
Expand Down
9 changes: 9 additions & 0 deletions submit-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions submit-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"devDependencies": {
"@cypress/code-coverage": "^3.12.44",
"@tanstack/eslint-plugin-query": "^5.43.1",
"@types/cypress__code-coverage": "^3.10.2",
"@types/node": "^20.14.9",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
Expand Down
82 changes: 2 additions & 80 deletions submit-web/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ import { Route as rootRoute } from './routes/__root'
import { Route as OidcCallbackImport } from './routes/oidc-callback'
import { Route as AuthenticatedImport } from './routes/_authenticated'
import { Route as IndexImport } from './routes/index'
import { Route as EaoPlansIndexImport } from './routes/eao-plans/index'
import { Route as EaoPlansPlanIdImport } from './routes/eao-plans/$planId'
import { Route as AuthenticatedProfileImport } from './routes/_authenticated/profile'
import { Route as AuthenticatedUsersIndexImport } from './routes/_authenticated/users/index'

// Create Virtual Routes

Expand Down Expand Up @@ -53,26 +49,6 @@ const IndexRoute = IndexImport.update({
getParentRoute: () => rootRoute,
} as any)

const EaoPlansIndexRoute = EaoPlansIndexImport.update({
path: '/eao-plans/',
getParentRoute: () => rootRoute,
} as any)

const EaoPlansPlanIdRoute = EaoPlansPlanIdImport.update({
path: '/eao-plans/$planId',
getParentRoute: () => rootRoute,
} as any)

const AuthenticatedProfileRoute = AuthenticatedProfileImport.update({
path: '/profile',
getParentRoute: () => AuthenticatedRoute,
} as any)

const AuthenticatedUsersIndexRoute = AuthenticatedUsersIndexImport.update({
path: '/users/',
getParentRoute: () => AuthenticatedRoute,
} as any)

// Populate the FileRoutesByPath interface

declare module '@tanstack/react-router' {
Expand Down Expand Up @@ -112,50 +88,16 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof NewpageLazyImport
parentRoute: typeof rootRoute
}
'/_authenticated/profile': {
id: '/_authenticated/profile'
path: '/profile'
fullPath: '/profile'
preLoaderRoute: typeof AuthenticatedProfileImport
parentRoute: typeof AuthenticatedImport
}
'/eao-plans/$planId': {
id: '/eao-plans/$planId'
path: '/eao-plans/$planId'
fullPath: '/eao-plans/$planId'
preLoaderRoute: typeof EaoPlansPlanIdImport
parentRoute: typeof rootRoute
}
'/eao-plans/': {
id: '/eao-plans/'
path: '/eao-plans'
fullPath: '/eao-plans'
preLoaderRoute: typeof EaoPlansIndexImport
parentRoute: typeof rootRoute
}
'/_authenticated/users/': {
id: '/_authenticated/users/'
path: '/users'
fullPath: '/users'
preLoaderRoute: typeof AuthenticatedUsersIndexImport
parentRoute: typeof AuthenticatedImport
}
}
}

// Create and export the route tree

export const routeTree = rootRoute.addChildren({
IndexRoute,
AuthenticatedRoute: AuthenticatedRoute.addChildren({
AuthenticatedProfileRoute,
AuthenticatedUsersIndexRoute,
}),
OidcCallbackRoute,
AboutpageLazyRoute,
NewpageLazyRoute,
EaoPlansPlanIdRoute,
EaoPlansIndexRoute,
})

/* prettier-ignore-end */
Expand All @@ -170,20 +112,14 @@ export const routeTree = rootRoute.addChildren({
"/_authenticated",
"/oidc-callback",
"/aboutpage",
"/newpage",
"/eao-plans/$planId",
"/eao-plans/"
"/newpage"
]
},
"/": {
"filePath": "index.tsx"
},
"/_authenticated": {
"filePath": "_authenticated.tsx",
"children": [
"/_authenticated/profile",
"/_authenticated/users/"
]
"filePath": "_authenticated.tsx"
},
"/oidc-callback": {
"filePath": "oidc-callback.tsx"
Expand All @@ -193,20 +129,6 @@ export const routeTree = rootRoute.addChildren({
},
"/newpage": {
"filePath": "newpage.lazy.tsx"
},
"/_authenticated/profile": {
"filePath": "_authenticated/profile.tsx",
"parent": "/_authenticated"
},
"/eao-plans/$planId": {
"filePath": "eao-plans/$planId.tsx"
},
"/eao-plans/": {
"filePath": "eao-plans/index.tsx"
},
"/_authenticated/users/": {
"filePath": "_authenticated/users/index.tsx",
"parent": "/_authenticated"
}
}
}
Expand Down

0 comments on commit 4518318

Please sign in to comment.