feat(web): single-language content authoring (LabelEditor + localized_text at default lang)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -45,7 +45,7 @@ test("selecting a vocabulary shows its terms and adds one", async () => {
|
||||
);
|
||||
renderApp(tree(), { route: "/vocabularies/v-material" });
|
||||
expect(await screen.findByText("Bronze")).toBeInTheDocument();
|
||||
await userEvent.type(screen.getByLabelText(/label \(en\)/i), "Stone");
|
||||
await userEvent.type(screen.getByLabelText(/^label$/i), "Stone");
|
||||
await userEvent.click(screen.getByRole("button", { name: /add term/i }));
|
||||
await waitFor(() =>
|
||||
expect((termBody as { labels: { label: string }[] })?.labels[0].label).toBe("Stone"),
|
||||
|
||||
@@ -34,7 +34,7 @@ export function VocabularyTerms() {
|
||||
const onAdd = (event: FormEvent) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (!labels.some((l) => l.lang === "en" && l.label)) {
|
||||
if (!labels.some((l) => l.label)) {
|
||||
setError(true);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user