Skip to content

Commit fd86660

Browse files
authored
Add validations for create project/workspace dialogs (#11)
1 parent fcaf193 commit fd86660

21 files changed

+1127
-475
lines changed

bun.lock

Lines changed: 107 additions & 190 deletions
Large diffs are not rendered by default.

cypress/support/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import '@ui5/webcomponents-cypress-commands';
2-
import "./../../i18n.js";
2+
import "../../i18n";

cypress/support/component.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { ThemeProvider } from '@ui5/webcomponents-react';
2020
import { mount } from 'cypress/react';
2121
// Import commands.js using ES2015 syntax:
2222
import './commands';
23+
import { FrontendConfigProvider, Landscape } from "../../src/context/FrontendConfigContext";
2324

2425
// Augment the Cypress namespace to include type definitions for
2526
// your custom command.
@@ -34,7 +35,13 @@ declare global {
3435
}
3536
}
3637

38+
39+
3740
Cypress.Commands.add('mount', (component, options) => {
38-
return mount(<ThemeProvider>{component} </ThemeProvider>, options);
41+
return mount(<ThemeProvider><FrontendConfigProvider config={{
42+
"backendUrl": "http://localhost:3000",
43+
"landscape": "DEV" as Landscape,
44+
"documentationBaseUrl": "http://localhost:3000"
45+
}}>{component} </FrontendConfigProvider></ThemeProvider>, options);
3946
});
4047

i18n.js renamed to i18n.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import i18n, { loadResources } from 'i18next';
1+
import i18n from 'i18next';
22
import { initReactI18next } from 'react-i18next';
33

44
import translationEN from './public/locales/en.json'

0 commit comments

Comments
 (0)