Release 1.4.0

This commit is contained in:
2022-08-13 10:20:06 +02:00
parent 9bb72f0207
commit 5452306c72
162 changed files with 10015 additions and 4419 deletions

View File

@@ -67,10 +67,31 @@ describe('src/main/containers/DashboardContainer', () => {
// Then
expect(dashboard.exists()).toBe(true);
expect(dashboard.prop('readOnly')).toBe(false);
expect(dashboard.prop('layout')).toEqual(expectedLayout);
});
it('configures and render a ServiceContainer for services', () => {
it('configures and renders the dashboard as read-only', () => {
// Given
fakeSettings.READ_ONLY = true;
const component = mount(
<DashboardsContext.Provider value={fakeDashboardsContext}>
<DashboardContainer.ControlledDashboardContainer
settings={fakeSettings}
/>
</DashboardsContext.Provider>
);
// When
const dashboard = component.find(Dashboard).at(0);
// Then
expect(dashboard.exists()).toBe(true);
expect(dashboard.prop('readOnly')).toBe(true);
});
it('configures and renders a ServiceContainer for services', () => {
// Given
const component = mount(
<DashboardsContext.Provider value={fakeDashboardsContext}>
@@ -93,6 +114,27 @@ describe('src/main/containers/DashboardContainer', () => {
expect(serviceContainer.prop('kind')).toEqual(
fakeDashboardsContext.dashboards[0].services[0].kind
);
expect(serviceContainer.prop('readOnly')).toBe(false);
});
it('configures and renders ServiceContainers as read-oniy', () => {
// Given
fakeSettings.READ_ONLY = true;
const component = mount(
<DashboardsContext.Provider value={fakeDashboardsContext}>
<DashboardContainer.ControlledDashboardContainer
settings={fakeSettings}
/>
</DashboardsContext.Provider>
);
// When
const serviceContainers = component.find(ServiceContainer);
const serviceContainer = serviceContainers.at(0);
// Then
expect(serviceContainer.prop('readOnly')).toBe(true);
});
it('configures and renders a DashboardItem for services', () => {