Skip to content
Closed
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 @@ -129,7 +129,7 @@ private static String viewerShellHtml(String docId, String initialState) {

<footer class="app-footer" role="contentinfo">
<div class="app-footer__inner">
<small>Copyright (c) 2026 by HYOSUNG. All rights reserved.</small>
<small>Clearfolio Viewer · Apache-2.0</small>
</div>
</footer>

Expand Down Expand Up @@ -317,7 +317,7 @@ private static String demoShellHtml() {

<footer class="app-footer" role="contentinfo">
<div class="app-footer__inner">
<small>Copyright (c) 2026 by HYOSUNG. All rights reserved.</small>
<small>Clearfolio Viewer · Apache-2.0</small>
</div>
</footer>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.clearfolio.viewer.controller;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.UUID;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.test.web.reactive.server.WebTestClient;

/**
* Regression tests that keep the distributable Clearfolio UI free of unrelated company branding.
*/
class ViewerUiBrandingContractTest {

private WebTestClient webTestClient;

/**
* Creates a controller-only client for deterministic HTML contract checks.
*/
@BeforeEach
void setUp() {
webTestClient = WebTestClient.bindToController(new ViewerUiController()).build();
}

/**
* Requires the root shell to identify the product without claiming HYOSUNG ownership.
*/
@Test
void rootShellDoesNotClaimHyosungOwnership() {
webTestClient.get()
.uri("/")
.exchange()
.expectStatus().isOk()
.expectBody(String.class)
.value(body -> {
assertThat(body).contains("Clearfolio Viewer");
assertThat(body).doesNotContain("HYOSUNG");
});
}

/**
* Requires document viewer shells to use the same product-owned branding contract.
*/
@Test
void documentViewerDoesNotClaimHyosungOwnership() {
webTestClient.get()
.uri("/viewer/{docId}", UUID.randomUUID())
.exchange()
.expectStatus().isOk()
.expectBody(String.class)
.value(body -> {
assertThat(body).contains("Clearfolio Viewer");
assertThat(body).doesNotContain("HYOSUNG");
});
}
}
Loading