1
0
forked from baron/baron-sso

adminfront/devfront code-check 수정

This commit is contained in:
2026-06-10 15:42:01 +09:00
parent e9af231fb0
commit 52046e4a66
7 changed files with 78 additions and 58 deletions

View File

@@ -167,6 +167,20 @@ async function renderPage() {
return container;
}
async function waitForTextContent(container: HTMLElement, text: string) {
for (let attempt = 0; attempt < 20; attempt += 1) {
if (container.textContent?.includes(text)) {
return;
}
await act(async () => {
await new Promise((resolve) => setTimeout(resolve, 0));
});
}
throw new Error(`Expected container text to include: ${text}`);
}
describe("ClientsPage", () => {
it("expands the list and applies search filters", async () => {
fetchClientsMock.mockResolvedValue({
@@ -300,7 +314,7 @@ describe("ClientsPage", () => {
fetchDeveloperRequestStatusMock.mockResolvedValue({ status: "none" });
const container = await renderPage();
expect(container.textContent).toContain("개발자 등록 신청하기");
await waitForTextContent(container, "개발자 등록 신청하기");
const requestButton = Array.from(container.querySelectorAll("button")).find(
(button) => button.textContent === "개발자 등록 신청하기",