inventory
This commit is contained in:
@@ -10,6 +10,7 @@ const wornSword: InventoryItem = {
|
||||
item: {
|
||||
key: 'worn-short-sword',
|
||||
name: 'Abgenutztes Kurzschwert',
|
||||
description: 'Beschreibung des Gegenstands.',
|
||||
rarity: 'COMMON',
|
||||
equipmentSlot: 'WEAPON',
|
||||
requiredLevel: 1,
|
||||
@@ -28,6 +29,7 @@ const banditBlade: InventoryItem = {
|
||||
item: {
|
||||
key: 'bandit-blade',
|
||||
name: 'Räuberklinge',
|
||||
description: 'Beschreibung des Gegenstands.',
|
||||
rarity: 'COMMON',
|
||||
equipmentSlot: 'WEAPON',
|
||||
requiredLevel: 1,
|
||||
@@ -70,6 +72,19 @@ describe('InventoryDetailPanelComponent', () => {
|
||||
expect(element.querySelector('[data-detail-equip]')).toBeNull();
|
||||
});
|
||||
|
||||
it('shows the item flavour text from the server', async () => {
|
||||
const fixture = await setup({
|
||||
item: {
|
||||
...banditBlade,
|
||||
item: { ...banditBlade.item, description: 'Eine grob gezahnte Klinge.' },
|
||||
},
|
||||
});
|
||||
|
||||
expect((fixture.nativeElement as HTMLElement).textContent).toContain(
|
||||
'Eine grob gezahnte Klinge.',
|
||||
);
|
||||
});
|
||||
|
||||
it('shows the stat comparison against the equipped item in the same slot', async () => {
|
||||
const fixture = await setup({ item: banditBlade, equippedItemInSlot: wornSword });
|
||||
const text = (fixture.nativeElement as HTMLElement).querySelector('[data-detail-stats]')?.textContent ?? '';
|
||||
|
||||
Reference in New Issue
Block a user