From d721a64e337bd83cea360e2250117e6c7c93d0e2 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sat, 27 Jun 2026 19:06:28 +0900 Subject: [PATCH] #306 --- .../pages/materials/MaterialListPage.test.tsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/frontend/src/pages/materials/MaterialListPage.test.tsx b/frontend/src/pages/materials/MaterialListPage.test.tsx index 0c4c26e..cd80f73 100644 --- a/frontend/src/pages/materials/MaterialListPage.test.tsx +++ b/frontend/src/pages/materials/MaterialListPage.test.tsx @@ -33,15 +33,11 @@ describe ('MaterialListPage', () => { } }, ) }) - expect (await screen.findByText ('素材はありません.')).toBeInTheDocument () + expect (await screen.findByText ('素材はありません。')).toBeInTheDocument () expect (screen.getByRole ('link', { name: '新規素材を追加' })).toHaveAttribute ( 'href', '/materials/new', ) - expect (screen.getByRole ('link', { name: '履歴' })).toHaveAttribute ( - 'href', - '/materials/changes', - ) }) it ('shows materials in the default card view', async () => { @@ -159,16 +155,9 @@ describe ('MaterialListPage', () => { (_, element) => element?.textContent === '伊地知ニジカ 配下の素材を表示中', )).toBeInTheDocument () - const addLinks = screen.getAllByRole ('link', { name: 'このタグに素材を追加' }) - expect (addLinks[0]).toHaveAttribute ( + expect (screen.getByRole ('link', { name: '泣き' })).toHaveAttribute ( 'href', - '/materials/new?tag=%E4%BC%8A%E5%9C%B0%E7%9F%A5%E3%83%8B%E3%82%B8%E3%82%AB' - + '&return_to=%2Fmaterials%3Ftag_id%3D20%26include_descendants%3D1%26group_by%3Dparent_tag', - ) - expect (addLinks[1]).toHaveAttribute ( - 'href', - '/materials/new?tag=%E6%B3%A3%E3%81%8D' - + '&return_to=%2Fmaterials%3Ftag_id%3D20%26include_descendants%3D1%26group_by%3Dparent_tag', + '/materials?tag_id=30&include_descendants=1&group_by=parent_tag&material_filter=present', ) expect (screen.getByRole ('link', { name: 'タグ選択を解除' })).toHaveAttribute ( 'href',