forked from baron/baron-sso
fix: resolve ambiguous '추가' button in E2E tests (#917)
This commit is contained in:
@@ -662,6 +662,7 @@ function UserCreatePage() {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="absolute right-1 top-1 h-8 text-xs font-bold"
|
className="absolute right-1 top-1 h-8 text-xs font-bold"
|
||||||
|
data-testid="add-sub-email-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const value = newSubEmail.trim().replace(/,/g, "");
|
const value = newSubEmail.trim().replace(/,/g, "");
|
||||||
if (
|
if (
|
||||||
@@ -678,8 +679,7 @@ function UserCreatePage() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("ui.common.add", "추가")}
|
{t("ui.common.add", "추가")}
|
||||||
</Button>
|
</Button> </div>
|
||||||
</div>
|
|
||||||
<p className="text-[10px] text-muted-foreground mt-1">
|
<p className="text-[10px] text-muted-foreground mt-1">
|
||||||
* 여러 개 입력 가능. 입력 후 엔터를 눌러 추가하세요.
|
* 여러 개 입력 가능. 입력 후 엔터를 눌러 추가하세요.
|
||||||
</p>
|
</p>
|
||||||
@@ -877,6 +877,7 @@ function UserCreatePage() {
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={addAppointment}
|
onClick={addAppointment}
|
||||||
|
data-testid="add-appointment-btn"
|
||||||
>
|
>
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
<Plus className="mr-2 h-4 w-4" />
|
||||||
{t("ui.common.add", "추가")}
|
{t("ui.common.add", "추가")}
|
||||||
|
|||||||
@@ -1176,6 +1176,7 @@ function UserDetailPage() {
|
|||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="absolute right-1 top-1 h-9 text-xs font-bold"
|
className="absolute right-1 top-1 h-9 text-xs font-bold"
|
||||||
|
data-testid="add-sub-email-btn"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const value = newSubEmail.trim().replace(/,/g, "");
|
const value = newSubEmail.trim().replace(/,/g, "");
|
||||||
if (
|
if (
|
||||||
@@ -1329,6 +1330,7 @@ function UserDetailPage() {
|
|||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
onClick={addAppointment}
|
onClick={addAppointment}
|
||||||
|
data-testid="add-appointment-btn"
|
||||||
>
|
>
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
<Plus className="mr-2 h-4 w-4" />
|
||||||
{t("ui.common.add", "추가")}
|
{t("ui.common.add", "추가")}
|
||||||
|
|||||||
@@ -721,7 +721,7 @@ test.describe("User Management", () => {
|
|||||||
await expect(page.locator("input#department")).toHaveCount(0);
|
await expect(page.locator("input#department")).toHaveCount(0);
|
||||||
|
|
||||||
await expect(page.getByText(/대표 소속/i)).toHaveCount(0);
|
await expect(page.getByText(/대표 소속/i)).toHaveCount(0);
|
||||||
await page.getByRole("button", { name: /^추가$/i }).click();
|
await page.getByTestId("add-appointment-btn").click();
|
||||||
await expect(page.getByTestId("appointment-row-0")).toBeVisible();
|
await expect(page.getByTestId("appointment-row-0")).toBeVisible();
|
||||||
await expect(
|
await expect(
|
||||||
page.getByTestId("appointment-tenant-owner-line-0"),
|
page.getByTestId("appointment-tenant-owner-line-0"),
|
||||||
|
|||||||
Reference in New Issue
Block a user