Skip to content

Commit 56f257b

Browse files
authored
feat: Custom Resource Definition Schema based Intellisense for YAML viewer and editor (#364)
1 parent 7b1800b commit 56f257b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4374
-2660
lines changed

cypress.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,25 @@ import react from '@vitejs/plugin-react';
66

77
const viteConfig = defineViteConfig({
88
plugins: [react()],
9+
define: {
10+
'process.env': {},
11+
global: 'globalThis',
12+
},
13+
resolve: {
14+
alias: {
15+
path: 'path-browserify',
16+
},
17+
},
18+
optimizeDeps: {
19+
include: ['path-browserify'],
20+
esbuildOptions: {
21+
define: {
22+
global: 'globalThis',
23+
},
24+
},
25+
},
926
});
27+
1028
export default defineConfig({
1129
includeShadowDom: true,
1230
viewportWidth: 1920,

cypress/support/component.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// You can read more here:
1313
// https://on.cypress.io/configuration
1414
// ***********************************************************
15+
1516
import '@ui5/webcomponents-react/dist/Assets.js';
1617
import { ThemeProvider } from '@ui5/webcomponents-react';
1718

@@ -23,6 +24,11 @@ import './commands';
2324
import { FrontendConfigContext } from '../../src/context/FrontendConfigContext';
2425
import { mockedFrontendConfig } from '../../src/utils/testing';
2526
import { ToastProvider } from '../../src/context/ToastContext.tsx';
27+
import { configureMonaco } from '../../src/lib/monaco';
28+
29+
// Initialize Monaco Editor for Cypress tests
30+
configureMonaco();
31+
2632
// Augment the Cypress namespace to include type definitions for
2733
// your custom command.
2834
// Alternatively, can be defined in cypress/support/component.d.ts
@@ -40,9 +46,7 @@ Cypress.Commands.add('mount', (component, options) => {
4046
return mount(
4147
<ThemeProvider>
4248
<ToastProvider>
43-
<FrontendConfigContext value={mockedFrontendConfig}>
44-
{component}
45-
</FrontendConfigContext>
49+
<FrontendConfigContext value={mockedFrontendConfig}>{component}</FrontendConfigContext>
4650
</ToastProvider>
4751
</ThemeProvider>,
4852
options,

0 commit comments

Comments
 (0)