From 85f50f38756c627d06ed15f464f469c74c9deedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?= Date: Fri, 31 Mar 2023 16:36:43 +0900 Subject: [PATCH] build(#10336): use `toHaveTextContent` --- packages/frontend/src/components/global/MkAd.stories.impl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/global/MkAd.stories.impl.ts b/packages/frontend/src/components/global/MkAd.stories.impl.ts index 767f8c691b..436744b4f6 100644 --- a/packages/frontend/src/components/global/MkAd.stories.impl.ts +++ b/packages/frontend/src/components/global/MkAd.stories.impl.ts @@ -44,10 +44,10 @@ const common = { const back = buttons[args.__hasReduce ? 1 : 0]; if (reduce) { await expect(reduce).toBeInTheDocument(); - await expect(reduce.textContent).toBe(i18n.ts._ad.reduceFrequencyOfThisAd); + await expect(reduce).toHaveTextContent(i18n.ts._ad.reduceFrequencyOfThisAd); } await expect(back).toBeInTheDocument(); - await expect(back.textContent).toBe(i18n.ts._ad.back); + await expect(back).toHaveTextContent(i18n.ts._ad.back); await userEvent.click(back); if (reduce) { await expect(reduce).not.toBeInTheDocument();