f086_Zusatz-Edit-der-Namen #34
@@ -1,15 +1,12 @@
|
|||||||
import { fireEvent, render, screen } from '@testing-library/svelte';
|
import { fireEvent, render, screen } from '@testing-library/svelte';
|
||||||
import { describe, expect, it, test, vi } from "vitest";
|
import { describe, expect, it, test, vi } from 'vitest';
|
||||||
import NameItemEditor from '$lib/components/NameItemEditor.svelte';
|
import NameItemEditor from '$lib/components/NameItemEditor.svelte';
|
||||||
import { baseData } from './fixtures';
|
import { baseData } from './fixtures';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const testCrimesListIndex = 0;
|
const testCrimesListIndex = 0;
|
||||||
const testItem = baseData.crimesList[testCrimesListIndex];
|
const testItem = baseData.crimesList[testCrimesListIndex];
|
||||||
const testCurrentName = testItem.name;
|
const testCurrentName = testItem.name;
|
||||||
const testLocalName = 'Fall-C'
|
const testLocalName = 'Fall-C';
|
||||||
|
|
||||||
|
|
||||||
describe('NameItemEditor - Funktionalität', () => {
|
describe('NameItemEditor - Funktionalität', () => {
|
||||||
const onSave = vi.fn();
|
const onSave = vi.fn();
|
||||||
@@ -18,9 +15,10 @@ describe('NameItemEditor - Funktionalität', () => {
|
|||||||
list: baseData.crimesList,
|
list: baseData.crimesList,
|
||||||
currentName: testCurrentName,
|
currentName: testCurrentName,
|
||||||
onSave,
|
onSave,
|
||||||
onDelete}
|
onDelete
|
||||||
|
};
|
||||||
|
|
||||||
test.todo('FocusIn nach Klick auf edit')
|
test.todo('FocusIn nach Klick auf edit');
|
||||||
|
|
||||||
it('zeigt initial Edit/Delete Buttons und aktuellen Namen', () => {
|
it('zeigt initial Edit/Delete Buttons und aktuellen Namen', () => {
|
||||||
render(NameItemEditor, { props: baseProps });
|
render(NameItemEditor, { props: baseProps });
|
||||||
|
|||||||
Reference in New Issue
Block a user