1
0
forked from baron/baron-sso

orgfront picker 기반 테넌트 선택 테스트 추가

This commit is contained in:
2026-06-15 11:52:53 +09:00
parent c07fcb2e94
commit 7e6c9459a9
3 changed files with 70 additions and 10 deletions

View File

@@ -65,6 +65,15 @@ test.describe("DevFront client tenant access settings", () => {
],
consents: [] as Consent[],
auditLogsByCursor: undefined,
myTenants: [
{
id: existingTenantId,
name: "Alpha Tenant",
slug: "alpha",
description: "Existing allowed tenant",
type: "organization",
},
],
tenants: [
{
id: existingTenantId,
@@ -99,10 +108,27 @@ test.describe("DevFront client tenant access settings", () => {
)
.toBe(existingTenantId);
await page
.getByPlaceholder(/테넌트 이름 또는 슬러그로 검색|tenant name or slug/i)
.fill("beta");
await page.getByRole("button", { name: /Beta Tenant/i }).click();
await page.getByRole("button", { name: /테넌트 선택기 열기/i }).click();
await page.evaluate(
(selection) => {
window.postMessage(
{
type: "orgfront:picker:confirm",
payload: {
selections: [
{
type: "tenant",
id: selection.id,
name: selection.name,
},
],
},
},
"*",
);
},
{ id: addedTenantId, name: "Beta Tenant" },
);
await expect(
page.getByTestId(`allowed-tenant-${addedTenantId}`),
).toContainText(addedTenantId);