1
0
forked from baron/baron-sso

code-check 오류 수정

This commit is contained in:
2026-06-05 20:37:23 +09:00
parent 87a45f0e76
commit 01cd7a0ad3
5 changed files with 25 additions and 19 deletions

View File

@@ -127,7 +127,7 @@ describe("UserListPage search rendering", () => {
renderUserListPage(); renderUserListPage();
await screen.findByText("User 0"); await screen.findByText("User 0");
const searchInput = screen.getByPlaceholderText("이름 또는 이메일 검색..."); const searchInput = screen.getByPlaceholderText("이름 또는 이메일 검색");
const renderCountBeforeTyping = selectRenderCounter.count; const renderCountBeforeTyping = selectRenderCounter.count;
fireEvent.change(searchInput, { target: { value: "u" } }); fireEvent.change(searchInput, { target: { value: "u" } });
@@ -179,7 +179,7 @@ describe("UserListPage search rendering", () => {
renderUserListPage(); renderUserListPage();
await screen.findByText("User 0"); await screen.findByText("User 0");
const searchInput = screen.getByPlaceholderText("이름 또는 이메일 검색..."); const searchInput = screen.getByPlaceholderText("이름 또는 이메일 검색");
const startedAt = performance.now(); const startedAt = performance.now();
fireEvent.change(searchInput, { target: { value: "user 19" } }); fireEvent.change(searchInput, { target: { value: "user 19" } });

View File

@@ -107,7 +107,9 @@ test.describe("Tenants Management", () => {
await expect(page.locator("table")).toContainText("Tenant A", { await expect(page.locator("table")).toContainText("Tenant A", {
timeout: 10000, timeout: 10000,
}); });
await expect(page.locator("table")).toContainText(internalTenantId); await expect(
page.getByTestId(`tenant-internal-id-${internalTenantId}`),
).toHaveText("c5839444-2de0-4a37-99b0-...");
await expect(page.locator("table")).toContainText("COMPANY"); await expect(page.locator("table")).toContainText("COMPANY");
await expect(page.locator("table")).not.toContainText("일반 기업"); await expect(page.locator("table")).not.toContainText("일반 기업");
@@ -291,8 +293,8 @@ test.describe("Tenants Management", () => {
await page.getByPlaceholder(/UUID|슬러그|slug/i).fill(""); await page.getByPlaceholder(/UUID|슬러그|slug/i).fill("");
await page.keyboard.press("Enter"); await page.keyboard.press("Enter");
await page await page
.locator("tbody tr") .getByTestId("tenant-internal-id-company-1")
.filter({ hasText: "Acme" }) .locator("xpath=ancestor::tr")
.getByRole("checkbox") .getByRole("checkbox")
.click(); .click();

View File

@@ -1,7 +1,9 @@
import { ChevronDown, ChevronUp, Copy } from "lucide-react"; import { ChevronDown, ChevronUp, Copy } from "lucide-react";
import * as React from "react"; import * as React from "react";
import { getCommonBadgeClasses } from "../../../ui/badge"; import {
import type { CommonBadgeVariant } from "../../../ui/badge"; getCommonBadgeClasses,
type CommonBadgeVariant,
} from "../../../ui/badge";
import { getCommonButtonClasses } from "../../../ui/button"; import { getCommonButtonClasses } from "../../../ui/button";
import { import {
commonStickyTableHeaderClass, commonStickyTableHeaderClass,

View File

@@ -120,7 +120,7 @@ describe("devfront AppLayout", () => {
const container = await renderLayout(); const container = await renderLayout();
const collapseButton = container.querySelector( const collapseButton = container.querySelector(
'button[aria-label="Collapse sidebar"]', 'button[aria-label="사이드바 접기"]',
) as HTMLButtonElement; ) as HTMLButtonElement;
await act(async () => { await act(async () => {
collapseButton.click(); collapseButton.click();
@@ -130,7 +130,7 @@ describe("devfront AppLayout", () => {
"true", "true",
); );
expect( expect(
container.querySelector('button[aria-label="Expand sidebar"]'), container.querySelector('button[aria-label="사이드바 펼치기"]'),
).not.toBeNull(); ).not.toBeNull();
}); });

View File

@@ -128,8 +128,9 @@ run_with_retry() {
return "$exit_code" return "$exit_code"
} }
playwright_install_cmd=(npx playwright install) playwright_cli="$repo_root/node_modules/.pnpm/@playwright+test@1.60.0/node_modules/@playwright/test/cli.js"
playwright_install_desc="npx playwright install" playwright_install_cmd=(node "$playwright_cli" install)
playwright_install_desc="node $playwright_cli install"
playwright_project_args=() playwright_project_args=()
has_webkit_host_dependencies() { has_webkit_host_dependencies() {
@@ -179,21 +180,21 @@ has_webkit_host_dependencies() {
} }
if [ "$(id -u)" -eq 0 ]; then if [ "$(id -u)" -eq 0 ]; then
playwright_install_cmd=(npx playwright install --with-deps) playwright_install_cmd=(node "$playwright_cli" install --with-deps)
playwright_install_desc="npx playwright install --with-deps" playwright_install_desc="node $playwright_cli install --with-deps"
elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then elif command -v sudo >/dev/null 2>&1 && sudo -n true >/dev/null 2>&1; then
playwright_install_cmd=(npx playwright install --with-deps) playwright_install_cmd=(node "$playwright_cli" install --with-deps)
playwright_install_desc="npx playwright install --with-deps" playwright_install_desc="node $playwright_cli install --with-deps"
elif ! has_webkit_host_dependencies; then elif ! has_webkit_host_dependencies; then
playwright_install_cmd=(npx playwright install chromium firefox) playwright_install_cmd=(node "$playwright_cli" install chromium firefox)
playwright_install_desc="npx playwright install chromium firefox" playwright_install_desc="node $playwright_cli install chromium firefox"
playwright_project_args=(--project=chromium --project=firefox) playwright_project_args=(--project=chromium --project=firefox)
{ {
echo "# Adminfront WebKit Skipped" echo "# Adminfront WebKit Skipped"
echo echo
echo "- Reason: WebKit host dependencies are not installed and this user cannot run passwordless sudo." echo "- Reason: WebKit host dependencies are not installed and this user cannot run passwordless sudo."
echo "- Action: Running Chromium and Firefox projects only." echo "- Action: Running Chromium and Firefox projects only."
echo "- To enable WebKit locally: run \`cd adminfront && npx playwright install-deps webkit\` with sudo privileges." echo "- To enable WebKit locally: run \`cd adminfront && node $playwright_cli install-deps webkit\` with sudo privileges."
} > reports/adminfront-webkit-skipped.md } > reports/adminfront-webkit-skipped.md
fi fi
@@ -295,10 +296,11 @@ if ! is_port_available "$port"; then
port="$fallback_port" port="$fallback_port"
fi fi
echo "==> adminfront using PORT=$port" echo "==> adminfront using PORT=$port"
playwright_test_cli="$tmp_dir/adminfront/node_modules/.pnpm/@playwright+test@1.60.0/node_modules/@playwright/test/cli.js"
( (
cd "$tmp_dir/adminfront" cd "$tmp_dir/adminfront"
CI=true PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \ CI=true PORT="$port" PLAYWRIGHT_WORKERS="${PLAYWRIGHT_WORKERS:-1}" \
pnpm exec playwright test --max-failures=1 "${playwright_project_args[@]}" node "$playwright_test_cli" test --max-failures=1 "${playwright_project_args[@]}"
) 2>&1 | tee reports/adminfront-test.log ) 2>&1 | tee reports/adminfront-test.log
test_exit_code=${PIPESTATUS[0]} test_exit_code=${PIPESTATUS[0]}
set -e set -e