File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed
Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 1313// https://on.cypress.io/configuration
1414// ***********************************************************
1515
16- // Set environment variable for Cypress tests
17- if ( window . Cypress ) {
18- ( window as any ) . VITE_CYPRESS_TEST = 'true' ;
19- }
20-
2116import '@ui5/webcomponents-react/dist/Assets.js' ;
2217import { ThemeProvider } from '@ui5/webcomponents-react' ;
2318
@@ -29,6 +24,11 @@ import './commands';
2924import { FrontendConfigContext } from '../../src/context/FrontendConfigContext' ;
3025import { mockedFrontendConfig } from '../../src/utils/testing' ;
3126import { ToastProvider } from '../../src/context/ToastContext.tsx' ;
27+ import { configureMonaco } from '../../src/lib/monaco' ;
28+
29+ // Initialize Monaco Editor for Cypress tests
30+ configureMonaco ( ) ;
31+
3232// Augment the Cypress namespace to include type definitions for
3333// your custom command.
3434// Alternatively, can be defined in cypress/support/component.d.ts
Original file line number Diff line number Diff line change @@ -41,9 +41,6 @@ export const YamlEditor = (props: YamlEditorProps) => {
4141 const [ applyAttempted , setApplyAttempted ] = useState ( false ) ;
4242
4343 useEffect ( ( ) => {
44- // This check is to prevent schema configuration load during Cypress tests but Monaco still is being loaded
45- if ( window . VITE_CYPRESS_TEST ) return ;
46-
4744 const { dispose } = configureMonacoYaml ( monaco , {
4845 isKubernetes : true ,
4946 enableSchemaRequest : true ,
Original file line number Diff line number Diff line change 11/// <reference types="vite/client" />
2-
3- declare global {
4- interface Window {
5- VITE_CYPRESS_TEST ?: string ;
6- }
7- }
8-
9- export { } ;
You can’t perform that action at this time.
0 commit comments