Skip to content

Commit

Permalink
fix: removed part of logo and favicon url (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordenReuter authored May 8, 2024
1 parent 1032e63 commit 7ecd4c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 7ecd4c9

Please sign in to comment.