forked from baron/baron-sso
orgfront picker 기반 테넌트 선택 테스트 추가
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user