1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-02 08:48:32 +09:00

build(#10336): use toHaveTextContent

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-03-31 16:36:43 +09:00
parent 558d73b21a
commit 85f50f3875
No known key found for this signature in database
GPG Key ID: 3E87B98A3F6BAB99

View File

@ -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();