| 388 | // The alert lives in the RecipientInput wrapper, a sibling of the |
| 389 | // `.recipients-input` element, so we walk up to the parent first. |
| 390 | const queryAlerts = () => page.evaluate(() => { |
| 391 | const wrapper = document.querySelectorAll('.recipients-input')[0].parentElement; |
| 392 | return { |
| 393 | danger: Boolean(wrapper.querySelector('.alert-danger')), |
| 394 | info: Boolean(wrapper.querySelector('.alert-info')) |
| 395 | }; |
| 396 | }); |
| 397 | // While pending: neither alert visible. |
| 398 | const whilePending = await queryAlerts(); |
| 399 | expect(whilePending.danger).toBe(false); |