New user search & dialog (#2270)

* From scrims

* wip

* wip

* wip

* wip

* WIP

* wip

* wip

* wip

* wip

* wip

* import ordering
This commit is contained in:
Kalle
2025-05-12 22:53:35 +03:00
committed by GitHub
parent f3e4ea2115
commit 4d730e5d8b
69 changed files with 1093 additions and 1027 deletions

View File

@@ -1,4 +1,4 @@
import { sql } from "kysely";
import { type ColumnType, sql } from "kysely";
import type { Tables } from "~/db/tables";
export const COMMON_USER_FIELDS = [
@@ -32,3 +32,6 @@ export function unJsonify<T>(value: T) {
return `\\${value}`;
}
export type JSONColumnTypeNullable<SelectType extends object | null> =
ColumnType<SelectType | null, string | null, string | null>;

View File

@@ -24,12 +24,15 @@ export async function selectUser({
userName: string;
labelName: string;
}) {
const combobox = page.getByLabel(labelName);
await expect(combobox).not.toBeDisabled();
const comboboxButton = page.getByLabel(labelName);
const searchInput = page.getByTestId("user-search-input");
const option = page.getByTestId("user-search-item").first();
await combobox.clear();
await combobox.fill(userName);
await expect(page.getByTestId("combobox-option-0")).toBeVisible();
await expect(comboboxButton).not.toBeDisabled();
await comboboxButton.click();
await searchInput.fill(userName);
await expect(option).toBeVisible();
await page.keyboard.press("Enter");
}