build(#10336): use `toHaveTextContent`
This commit is contained in:
parent
558d73b21a
commit
85f50f3875
|
@ -44,10 +44,10 @@ const common = {
|
||||||
const back = buttons[args.__hasReduce ? 1 : 0];
|
const back = buttons[args.__hasReduce ? 1 : 0];
|
||||||
if (reduce) {
|
if (reduce) {
|
||||||
await expect(reduce).toBeInTheDocument();
|
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).toBeInTheDocument();
|
||||||
await expect(back.textContent).toBe(i18n.ts._ad.back);
|
await expect(back).toHaveTextContent(i18n.ts._ad.back);
|
||||||
await userEvent.click(back);
|
await userEvent.click(back);
|
||||||
if (reduce) {
|
if (reduce) {
|
||||||
await expect(reduce).not.toBeInTheDocument();
|
await expect(reduce).not.toBeInTheDocument();
|
||||||
|
|
Loading…
Reference in New Issue