Skip to content

Commit 36da3dc

Browse files
committed
fix
1 parent af43e35 commit 36da3dc

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

cypress.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ 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
});
1027

1128
export default defineConfig({

src/components/Wizards/CreateManagedControlPlane/CreateManagedControlPlaneWizardContainer.cy.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,20 @@ describe('CreateManagedControlPlaneWizardContainer', () => {
279279

280280
beforeEach(() => {
281281
createMutationPayload = null;
282+
updateMutationPayload = null;
283+
284+
// Suppress Monaco Editor disposal errors in tests
285+
cy.on('uncaught:exception', (err) => {
286+
// Ignore Monaco Editor disposal errors
287+
if (err.message.includes('TextModel got disposed') || err.message.includes('DiffEditorWidget')) {
288+
return false;
289+
}
290+
// Ignore module is not defined errors from path-browserify
291+
if (err.message.includes('module is not defined')) {
292+
return false;
293+
}
294+
return true;
295+
});
282296
});
283297

284298
it('creates an empty MCP', () => {

0 commit comments

Comments
 (0)