@@ -43,25 +84,34 @@ export default class ServicesNavigationBar extends Component {
Product APIs
- {services.map((tile) =>
- tile.services.map((service) => (
-
-
-
- ))
- )}
{!hasTiles && hasSearchCriteria && (
No services found matching search criteria
)}
+ {hasTiles && (
+
+ {allServices.map((service, serviceIndex) => (
+ this.handleTabClick(service.serviceId)}
+ key={service.serviceId}
+ className="tabs"
+ component={RouterLink}
+ to={`${match.url}/${service.serviceId}`}
+ value={serviceIndex}
+ label={}
+ wrapped
+ />
+ ))}
+
+ )}
);
}
diff --git a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.jsx b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.jsx
deleted file mode 100644
index 748d74ce2f..0000000000
--- a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.jsx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * This program and the accompanying materials are made available under the terms of the
- * Eclipse Public License v2.0 which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-v20.html
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Copyright Contributors to the Zowe Project.
- */
-import { Tab, Tabs } from '@material-ui/core';
-import { Link as RouterLink } from 'react-router-dom';
-
-function SideBarLinks({ storeCurrentTileId, originalTiles, text, match, services }) {
- const handleTabClick = (value) => {
- const correctTile = originalTiles.find((tile) => tile.services.some((service) => service.serviceId === value));
- if (correctTile) {
- storeCurrentTileId(correctTile.id);
- }
- };
- return (
-
- handleTabClick(services)}
- value={text}
- className="tabs"
- component={RouterLink}
- to={`${match.url}/${services}`}
- label={text}
- wrapped
- />
-
- );
-}
-export default SideBarLinks;
diff --git a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.test.jsx b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.test.jsx
deleted file mode 100644
index d6e94f48ef..0000000000
--- a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/SideBarLinks.test.jsx
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * This program and the accompanying materials are made available under the terms of the
- * Eclipse Public License v2.0 which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-v20.html
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Copyright Contributors to the Zowe Project.
- */
-
-import { shallow } from 'enzyme';
-import { Tab } from '@material-ui/core';
-import { Link as RouterLink } from 'react-router-dom';
-import SideBarLinks from './SideBarLinks';
-
-const tile = {
- version: '1.0.0',
- id: 'apicatalog',
- title: 'API Mediation Layer for z/OS internal API services',
- status: 'UP',
- description: 'lkajsdlkjaldskj',
- services: [
- {
- serviceId: 'apicatalog',
- title: 'API Catalog',
- description:
- 'API ML Microservice to locate and display API documentation for API ML discovered microservices',
- status: 'UP',
- secured: false,
- },
- {
- serviceId: 'gateway',
- title: 'API Gateway',
- description:
- 'API ML Microservice to locate and display API documentation for API ML discovered microservices',
- status: 'UP',
- secured: false,
- },
- ],
- totalServices: 1,
- activeServices: 1,
- lastUpdatedTimestamp: '2018-08-22T08:32:03.110+0000',
- createdTimestamp: '2018-08-22T08:31:22.948+0000',
-};
-
-describe('>>> SideBarLinks component tests', () => {
- it('should call storeCurrentTileId function when a tab is clicked', () => {
- const storeCurrentTileIdMock = jest.fn();
- const matchMock = { url: '/example' };
- const servicesMock = 'apicatalog';
- const wrapper = shallow(
-
- );
-
- wrapper.find(Tab).simulate('click');
-
- expect(storeCurrentTileIdMock).toHaveBeenCalledWith('apicatalog');
- });
-
- it('should render a Tab component with the correct props', () => {
- const storeCurrentTileIdMock = jest.fn();
- const matchMock = { url: '/example' };
- const servicesMock = 'service1';
- const wrapper = shallow(
-
- );
-
- expect(wrapper.find(Tab)).toHaveLength(1);
-
- expect(wrapper.find(Tab).props()).toMatchObject({
- onClick: expect.any(Function),
- value: 'Tab Text',
- className: 'tabs',
- component: RouterLink,
- to: '/example/service1',
- label: 'Tab Text',
- wrapped: true,
- });
- });
-});
diff --git a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/_serviceNavigationBar.scss b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/_serviceNavigationBar.scss
index 6b660b14bf..bb20c768f6 100644
--- a/api-catalog-ui/frontend/src/components/ServicesNavigationBar/_serviceNavigationBar.scss
+++ b/api-catalog-ui/frontend/src/components/ServicesNavigationBar/_serviceNavigationBar.scss
@@ -2,65 +2,37 @@ $color_1: #50b7f5;
$background-color_1: #EFEFEF;
$color_2: #CC092F;
-.MuiTab-root {
- font-weight: normal; // Set the default font weight
- transition: font-weight 0.3s; // Add transition for smooth effect
-
- &:hover {
- color: inherit; /* Use the default color on hover */
- background-color: transparent; /* Remove background color on hover */
- font-weight: bold; // Set font weight to bold on hover
- }
-}
-.MuiTab-root .MuiTab-wrapper:hover {
- color: inherit; /* Use the default color on hover */
- text-decoration: none; /* Remove underline on hover */
-}
-
-.nav-tabs {
- background: var(--white-ffffff, #FFF);
- box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.25);
- .tabs {
- text-transform: none;
- font-size: 16px;
- color: black;
- &:hover {
- color: black;
- }
- }
- width: auto;
- border: 3px solid #F7F9FA;
- overflow-y: auto;
- display: flex;
- color: black;
- align-items: cover;
- cursor: pointer;
- &:hover {
- border-color: $color_2;
- transition: color 100ms ease-out;
- }
-}
-
#search2 {
+ margin-top: 10px;
height: 47px;
background: #FFFFFF;
border: 1px solid #C9C8C5;
- margin-right: 15px;
+ margin-right: 13px;
margin-bottom: 9px;
+
+ .MuiInput-root {
+ width: 100%;
+ }
>div {
>div {
>input {
- margin-left: 13px;
- margin-top: 6px;
+ padding-left: 16px;
+ padding-right: 40px;
+ padding-top: 14px;
}
>div {
>#search-icon {
margin-top: 7px;
}
+ margin-right: 0;
+ search-input {
+ right: 5px;
+ }
}
}
}
}
+
#serviceIdTabs {
margin-bottom: 10px;
font-weight: bold;
@@ -71,4 +43,63 @@ $color_2: #CC092F;
color: $color_2;
}
+.MuiTab-wrapper {
+ width: 100%;
+ text-align: initial;
+ flex-direction: column;
+}
+span.MuiTab-wrapper {
+ display: inline-block;
+}
+
+.MuiTabs-root {
+ margin-left: 39px;
+}
+
+.MuiTabs-scroller.MuiTabs-scrollable > div > a {
+ background: var(--white-ffffff, #FFF);
+ max-width: 353px;
+ margin-bottom: 5px;
+ text-transform: none;
+ font-size: 16px;
+}
+
+.MuiTabs-root.custom-tabs.MuiTabs-vertical {
+ margin-left: auto;
+}
+
+svg.MuiSvgIcon-root.clear-text-search {
+ margin-left: 120px;
+ margin-bottom: 3px;
+}
+
+
+.tabs {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ background: var(--white-ffffff, #FFF);
+ box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.25);
+}
+
+.MuiTab-wrapped {
+ height: 60px;
+}
+
+.custom-tabs .MuiTabs-indicator {
+ display: none;
+}
+
+.custom-tabs .tabs:hover {
+ border: 4px solid $color_2;
+}
+
+.custom-tabs .tabs.Mui-selected {
+ border: 4px solid $color_2;
+}
+
+.MuiTabs-flexContainerVertical {
+ margin-bottom: 7px;
+}
diff --git a/api-catalog-ui/frontend/src/components/Swagger/Swagger.css b/api-catalog-ui/frontend/src/components/Swagger/Swagger.css
index bac857abc1..5f2fdb5cf3 100644
--- a/api-catalog-ui/frontend/src/components/Swagger/Swagger.css
+++ b/api-catalog-ui/frontend/src/components/Swagger/Swagger.css
@@ -1753,3 +1753,7 @@ button.opblock-summary-control {
svg.svg-assets {
display: none;
}
+
+#no-doc_message {
+ color: #de1b1b;
+}
diff --git a/api-catalog-ui/frontend/src/components/Swagger/SwaggerUI.jsx b/api-catalog-ui/frontend/src/components/Swagger/SwaggerUI.jsx
index 6b72201705..72e0705e20 100644
--- a/api-catalog-ui/frontend/src/components/Swagger/SwaggerUI.jsx
+++ b/api-catalog-ui/frontend/src/components/Swagger/SwaggerUI.jsx
@@ -96,7 +96,7 @@ export default class SwaggerUI extends Component {
setSwaggerState = () => {
const { selectedService, selectedVersion } = this.props;
let codeSnippets = null;
- if (selectedService.apis.length !== 0) {
+ if (selectedService && 'apis' in selectedService && selectedService.apis && selectedService.apis.length !== 0) {
if (
selectedService.apis[selectedVersion] !== null &&
selectedService.apis[selectedVersion] !== undefined &&
@@ -180,7 +180,7 @@ export default class SwaggerUI extends Component {
{error && (
-
+
API documentation could not be retrieved. There may be something wrong in your Swagger
definition. Please review the values of 'schemes', 'host' and 'basePath'.
diff --git a/api-catalog-ui/frontend/src/components/Swagger/_swagger.scss b/api-catalog-ui/frontend/src/components/Swagger/_swagger.scss
index f5756d57f4..09dd7ec05f 100644
--- a/api-catalog-ui/frontend/src/components/Swagger/_swagger.scss
+++ b/api-catalog-ui/frontend/src/components/Swagger/_swagger.scss
@@ -36,6 +36,7 @@ body {
.opblock-summary-method {
background: var( --success10 );
+ width: 50px;
}
}
&[aria-label*='get'],
@@ -45,6 +46,7 @@ body {
.opblock-summary-method {
background: var( --info10 );
+ width: 50px;
}
}
&[aria-label*='delete'],
@@ -54,6 +56,7 @@ body {
.opblock-summary-method {
background: var( --critical10 );
+ width: 50px;
}
}
&[aria-label*='put'],
@@ -63,6 +66,7 @@ body {
.opblock-summary-method {
background: var( --warn10 );
+ width: 50px;
}
}
@@ -129,7 +133,7 @@ body {
justify-content: space-between;
> * {
-
+
&:first-child {
flex: 100%;
}
@@ -174,4 +178,9 @@ body {
}
}
}//end opblock-body
-}
\ No newline at end of file
+}
+
+#no-doc_message {
+ margin-left: -41px;
+ color: #de1b1b;
+}
diff --git a/api-catalog-ui/frontend/src/components/Tile/Tile.jsx b/api-catalog-ui/frontend/src/components/Tile/Tile.jsx
index 1ea176843e..a4593ae075 100644
--- a/api-catalog-ui/frontend/src/components/Tile/Tile.jsx
+++ b/api-catalog-ui/frontend/src/components/Tile/Tile.jsx
@@ -56,6 +56,7 @@ export default class Tile extends Component {
const tileRoute = `/service/${service.serviceId}`;
storeCurrentTileId(tile.id);
history.push(tileRoute);
+ localStorage.setItem('serviceId', service.serviceId);
};
render() {
diff --git a/api-catalog-ui/frontend/src/components/Tile/_tile.scss b/api-catalog-ui/frontend/src/components/Tile/_tile.scss
index 5f933eb63a..fe25a40ffe 100644
--- a/api-catalog-ui/frontend/src/components/Tile/_tile.scss
+++ b/api-catalog-ui/frontend/src/components/Tile/_tile.scss
@@ -59,11 +59,6 @@ body {
}
}
- #media-icons {
- position: absolute;
- right: 186px;
- }
-
#videos {
margin-right: 120px;
width: 30px;
@@ -74,6 +69,10 @@ body {
height: 20px;
}
+ .MuiCardContent-root.tile {
+ display: flex;
+ }
+
@media only screen and (max-width: 1500px) {
#media-icons {
position: relative;
@@ -117,3 +116,30 @@ body {
margin-right: 5px;
}
}
+
+/* CSS styles for the container holding all the tiles */
+.grid-container {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-start;
+}
+
+/* CSS styles for each individual tile */
+.grid-item {
+ flex: 0 0 calc(25% - 16px);
+ margin: 8px;
+ position: relative; /* Add relative positioning to the tile */
+}
+
+/* CSS styles for media-icons group within each tile */
+#media-icons {
+ margin-right: -102px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ position: absolute; /* Use absolute positioning for the icons container */
+ right: 0; /* Align the icons container to the right side of the tile */
+ top: 50%; /* Vertically center the icons container */
+ transform: translateY(-50%); /* Correct the vertical alignment */
+}
+
diff --git a/api-catalog-ui/frontend/src/components/Wizard/DialogDropdown.jsx b/api-catalog-ui/frontend/src/components/Wizard/DialogDropdown.jsx
index 548aa7b150..3c315dce9f 100644
--- a/api-catalog-ui/frontend/src/components/Wizard/DialogDropdown.jsx
+++ b/api-catalog-ui/frontend/src/components/Wizard/DialogDropdown.jsx
@@ -11,7 +11,6 @@
import { Component } from 'react';
import { Button, Menu, MenuItem } from '@material-ui/core';
import KeyboardArrowDownIcon from '@material-ui/icons/KeyboardArrowDown';
-import './wizard.css';
import { isAPIPortal } from '../../utils/utilFunctions';
export default class DialogDropdown extends Component {
diff --git a/api-catalog-ui/frontend/src/components/Wizard/WizardDialog.jsx b/api-catalog-ui/frontend/src/components/Wizard/WizardDialog.jsx
index 2606fcfc34..7c934b8ecb 100644
--- a/api-catalog-ui/frontend/src/components/Wizard/WizardDialog.jsx
+++ b/api-catalog-ui/frontend/src/components/Wizard/WizardDialog.jsx
@@ -11,7 +11,6 @@ import yaml from 'js-yaml';
import * as YAML from 'yaml';
import { Component } from 'react';
import { Dialog, DialogContent, DialogContentText, DialogTitle, DialogActions, IconButton } from '@material-ui/core';
-import './wizard.css';
import WizardNavigationContainer from './WizardComponents/WizardNavigationContainer';
export default class WizardDialog extends Component {
diff --git a/api-catalog-ui/frontend/src/components/Wizard/wizard.css b/api-catalog-ui/frontend/src/components/Wizard/wizard.css
index 58871e192f..9b54fb426e 100644
--- a/api-catalog-ui/frontend/src/components/Wizard/wizard.css
+++ b/api-catalog-ui/frontend/src/components/Wizard/wizard.css
@@ -22,6 +22,7 @@
#wizard-navigation {
min-height: 20em;
+ margin-left: auto;
}
#wizard-navigation > div {
@@ -153,7 +154,7 @@ label.MuiFormLabel-root.MuiInputLabel-root.MuiInputLabel-formControl.MuiInputLab
display: none;
}
-#yaml-upload {
+#yaml-upload {
display: flex;
justify-content: center;
align-items: center;
diff --git a/api-catalog-ui/frontend/src/index.css b/api-catalog-ui/frontend/src/index.css
index f54eb631f9..a6a38ebeed 100644
--- a/api-catalog-ui/frontend/src/index.css
+++ b/api-catalog-ui/frontend/src/index.css
@@ -10,8 +10,10 @@
@import "../src/components/DetailPage/ReactRouterTabs.css";
@import "../src/components/Swagger/Swagger.css";
@import "../src/components/ServiceTab/ServiceTab.css";
+@import "../src/components/ServiceVersionDiff/ServiceVersionDiff.css";
@import "../src/components/PageNotFound/PageNotFound.css";
@import "../src/components/ServicesNavigationBar/ServicesNavigationBar.css";
+@import "../src/components/Wizard/wizard.css";
body {
margin: 0;
padding: 0;
diff --git a/api-catalog-ui/frontend/src/selectors/selectors.jsx b/api-catalog-ui/frontend/src/selectors/selectors.jsx
index 63bccc2b12..41a166bb58 100644
--- a/api-catalog-ui/frontend/src/selectors/selectors.jsx
+++ b/api-catalog-ui/frontend/src/selectors/selectors.jsx
@@ -21,11 +21,7 @@ function filterService(searchCriteria, service) {
if (!service.title) {
return false;
}
- let matchDoc = false;
- if (service.apiDoc) {
- matchDoc = service.apiDoc.toLowerCase().includes(searchCriteria.toLowerCase());
- }
- return service.title.toLowerCase().includes(searchCriteria.toLowerCase()) || matchDoc;
+ return service.title.toLowerCase().includes(searchCriteria.toLowerCase());
}
function compareResult(searchCriteria, tile, filteredServices) {
diff --git a/api-catalog-ui/frontend/src/utils/utilFunctions.js b/api-catalog-ui/frontend/src/utils/utilFunctions.js
index dc51a77ee9..30066c981e 100644
--- a/api-catalog-ui/frontend/src/utils/utilFunctions.js
+++ b/api-catalog-ui/frontend/src/utils/utilFunctions.js
@@ -30,6 +30,17 @@ export default function countAdditionalContents(service) {
return { useCasesCounter, tutorialsCounter, videosCounter };
}
+function setButtonsColor(wizardButton, uiConfig, refreshButton) {
+ const color =
+ uiConfig.headerColor === 'white' || uiConfig.headerColor === '#FFFFFF' ? 'black' : uiConfig.headerColor;
+ if (wizardButton) {
+ wizardButton.style.setProperty('color', color);
+ }
+ if (refreshButton) {
+ refreshButton.style.setProperty('color', color);
+ }
+}
+
function setMultipleElements(uiConfig) {
if (uiConfig.headerColor) {
const divider = document.getElementById('separator2');
@@ -37,6 +48,8 @@ function setMultipleElements(uiConfig) {
const title1 = document.getElementById('title');
const swaggerLabel = document.getElementById('swagger-label');
const header = document.getElementsByClassName('header');
+ const wizardButton = document.querySelector('#onboard-wizard-button > span.MuiButton-label');
+ const refreshButton = document.querySelector('#refresh-api-button > span.MuiIconButton-label');
if (header && header.length > 0) {
header[0].style.setProperty('background-color', uiConfig.headerColor);
}
@@ -52,6 +65,7 @@ function setMultipleElements(uiConfig) {
if (logoutButton) {
logoutButton.style.setProperty('color', uiConfig.headerColor);
}
+ setButtonsColor(wizardButton, uiConfig, refreshButton);
}
}
@@ -79,6 +93,33 @@ function fetchImagePath() {
});
}
+function handleWhiteHeader(uiConfig) {
+ const goBackButton = document.querySelector('#go-back-button');
+ const swaggerLabel = document.getElementById('swagger-label');
+ const title = document.getElementById('title');
+ const productTitle = document.getElementById('product-title');
+ if (uiConfig.headerColor === 'white' || uiConfig.headerColor === '#FFFFFF') {
+ if (uiConfig.docLink) {
+ const docText = document.querySelector('#internal-link');
+ if (docText) {
+ docText.style.color = 'black';
+ }
+ }
+ if (goBackButton) {
+ goBackButton.style.color = 'black';
+ }
+ if (swaggerLabel) {
+ swaggerLabel.style.color = 'black';
+ }
+ if (title) {
+ title.style.color = 'black';
+ }
+ if (productTitle) {
+ productTitle.style.color = 'black';
+ }
+ }
+}
+
/**
* Custom the UI look to match the setup from the service metadata
* @param uiConfig the configuration to customize the UI
@@ -96,6 +137,8 @@ export const customUIStyle = async (uiConfig) => {
const img = await fetchImagePath();
link.href = img;
logo.src = img;
+ logo.style.height = 'auto';
+ logo.style.width = 'auto';
}
if (uiConfig.backgroundColor) {
@@ -131,6 +174,7 @@ export const customUIStyle = async (uiConfig) => {
description.style.color = uiConfig.textColor;
}
}
+ handleWhiteHeader(uiConfig);
};
export const isAPIPortal = () => process.env.REACT_APP_API_PORTAL === 'true';
diff --git a/api-catalog-ui/frontend/src/utils/utilFunctions.test.js b/api-catalog-ui/frontend/src/utils/utilFunctions.test.js
index 11d7768e9f..74a57c8317 100644
--- a/api-catalog-ui/frontend/src/utils/utilFunctions.test.js
+++ b/api-catalog-ui/frontend/src/utils/utilFunctions.test.js
@@ -30,6 +30,15 @@ describe('>>> Util Functions tests', () => {
+
+
+
+
+
+
+
+
+
`;
});
@@ -68,12 +77,16 @@ describe('>>> Util Functions tests', () => {
const detailPage = document.getElementsByClassName('content')[0];
const description = document.getElementById('description');
const link = document.querySelector("link[rel~='icon']");
+ const wizardButton = document.querySelector('#onboard-wizard-button > span.MuiButton-label');
+ const refreshButton = document.querySelector('#refresh-api-button > span.MuiIconButton-label');
expect(logo.src).toContain('img-url');
expect(link.href).toContain('img-url');
expect(header.style.getPropertyValue('background-color')).toBe('red');
expect(divider.style.getPropertyValue('background-color')).toBe('red');
expect(title.style.getPropertyValue('color')).toBe('red');
expect(swaggerLabel.style.getPropertyValue('color')).toBe('red');
+ expect(wizardButton.style.getPropertyValue('color')).toBe('red');
+ expect(refreshButton.style.getPropertyValue('color')).toBe('red');
expect(logoutButton.style.getPropertyValue('color')).toBe('red');
expect(homepage.style.backgroundColor).toBe('blue');
expect(homepage.style.backgroundImage).toBe('none');
@@ -85,4 +98,50 @@ describe('>>> Util Functions tests', () => {
jest.restoreAllMocks();
global.fetch.mockRestore();
});
+
+ it('should handle elements in case of white header', async () => {
+ const uiConfig = {
+ logo: '/path/img.png',
+ headerColor: 'white',
+ backgroundColor: 'blue',
+ fontFamily: 'Arial',
+ textColor: 'black',
+ docLink: 'doc|doc.com',
+ };
+
+ global.URL.createObjectURL = jest.fn().mockReturnValue('img-url');
+ global.fetch = mockFetch();
+ await customUIStyle(uiConfig);
+ const header = document.getElementsByClassName('header')[0];
+ const title = document.getElementById('title');
+ const productTitle = document.getElementById('product-title');
+ const docLink = document.getElementById('internal-link');
+ const swaggerLabel = document.getElementById('swagger-label');
+ const wizardButton = document.querySelector('#onboard-wizard-button > span.MuiButton-label');
+ const refreshButton = document.querySelector('#refresh-api-button > span.MuiIconButton-label');
+ const link = document.querySelector("link[rel~='icon']");
+ const tileLabel = document.querySelector('p#tileLabel');
+ expect(link.href).toContain('img-url');
+ expect(header.style.getPropertyValue('background-color')).toBe('white');
+ expect(title.style.getPropertyValue('color')).toBe('black');
+ expect(productTitle.style.getPropertyValue('color')).toBe('black');
+ expect(docLink.style.getPropertyValue('color')).toBe('black');
+ expect(swaggerLabel.style.getPropertyValue('color')).toBe('black');
+ expect(wizardButton.style.getPropertyValue('color')).toBe('black');
+ expect(refreshButton.style.getPropertyValue('color')).toBe('black');
+ expect(tileLabel.style.getPropertyValue('font-family')).toBe('Arial');
+ expect(document.documentElement.style.backgroundColor).toBe('blue');
+ // Clean up the mocks
+ jest.restoreAllMocks();
+ global.fetch.mockRestore();
+ });
+
+ it('should return network error when fetching image', async () => {
+ const uiConfig = {
+ logo: '/wrong-path/img.png',
+ };
+
+ global.fetch = () => Promise.resolve({ ok: false, status: 404 });
+ await expect(customUIStyle(uiConfig)).rejects.toThrow('Network response was not ok');
+ });
});
diff --git a/api-catalog-ui/frontend/src/webflow.css b/api-catalog-ui/frontend/src/webflow.css
index e4d6ce4d98..9c51b7dd11 100644
--- a/api-catalog-ui/frontend/src/webflow.css
+++ b/api-catalog-ui/frontend/src/webflow.css
@@ -227,7 +227,7 @@ td, th {
}
html {
- height: 100%
+ height: 100%;
}
body {
@@ -2997,7 +2997,7 @@ html.w-mod-js *[data-ix="doc-load-hidden"] {
@media only screen and (max-width: 600px) {
.header {
- width: 600px;
+ width: max-content;
}
}