From dc673a07e194611b95283b9e8cb7a8692c24a311 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Mon, 10 Aug 2026 21:09:09 +0900 Subject: [PATCH 1/2] test(viewer): add RED product branding contract --- .../ViewerUiBrandingContractTest.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/test/java/com/clearfolio/viewer/controller/ViewerUiBrandingContractTest.java diff --git a/src/test/java/com/clearfolio/viewer/controller/ViewerUiBrandingContractTest.java b/src/test/java/com/clearfolio/viewer/controller/ViewerUiBrandingContractTest.java new file mode 100644 index 000000000..fe21660ad --- /dev/null +++ b/src/test/java/com/clearfolio/viewer/controller/ViewerUiBrandingContractTest.java @@ -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"); + }); + } +} From f6bdd4b8850cbcab99ce4f33bd8950304acf136e Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Mon, 10 Aug 2026 21:12:50 +0900 Subject: [PATCH 2/2] fix(viewer): remove unrelated ownership branding --- .../com/clearfolio/viewer/controller/ViewerUiController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/clearfolio/viewer/controller/ViewerUiController.java b/src/main/java/com/clearfolio/viewer/controller/ViewerUiController.java index 3e5ee0710..b1ea72146 100644 --- a/src/main/java/com/clearfolio/viewer/controller/ViewerUiController.java +++ b/src/main/java/com/clearfolio/viewer/controller/ViewerUiController.java @@ -129,7 +129,7 @@ private static String viewerShellHtml(String docId, String initialState) {
@@ -317,7 +317,7 @@ private static String demoShellHtml() {