Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed part of logo and favicon url #21

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ default void createThemeAfter(@MappingTarget ThemeDTO target, Theme themeInfo, S
target.setProperties(String.valueOf(themeInfo.getProperties()));
}
if (target.getFaviconUrl() == null) {
target.setFaviconUrl(path + "/themes/" + target.getName() + "/favicon");
target.setFaviconUrl(path.replace("/load", "") + "/themes/" + target.getName() + "/favicon");
}
if (target.getLogoUrl() == null) {
target.setLogoUrl(path + "/themes/" + target.getName() + "/logo");
target.setLogoUrl(path.replace("/load", "") + "/themes/" + target.getName() + "/logo");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ void loadWorkspaceConfigByBaseUrlTest() {
.withBody(JsonBody.json(productResponse)));

Theme themeResponse = new Theme();
themeResponse.name("theme1").cssFile("cssfile").properties(new Object()).logoUrl("someLogoUrl")
.faviconUrl("someFavIconUrl");
themeResponse.name("theme1").cssFile("cssfile").properties(new Object()).faviconUrl("someUrl");
// create mock rest endpoint for get theme by name from theme-svc
mockServerClient.when(request().withPath("/v1/themes/theme1").withMethod(HttpMethod.GET))
.withId("mockTheme")
Expand Down Expand Up @@ -313,7 +312,7 @@ void loadWorkspaceConfigByBaseUrlTest() {
Assertions.assertEquals(productResponse.getProducts().get(0).getMicrofrontends().get(0).getEndpoints().size(),
output.getRoutes().get(0).getEndpoints().size());
Assertions.assertEquals("endpoint1", output.getRoutes().get(0).getEndpoints().get(0).getName());

Assertions.assertEquals("/workspaceConfig/themes/theme1/logo", output.getTheme().getLogoUrl());
mockServerClient.clear("mockWS");
mockServerClient.clear("mockPS");
mockServerClient.clear("mockTheme");
Expand Down
Loading