MCPcopy
hub / github.com/getsentry/sentry / renderGlobalModal

Function renderGlobalModal

tests/js/sentry-test/reactTestingLibrary.tsx:420–434  ·  view source on GitHub ↗
(options?: RenderOptions)

Source from the content-addressed store, hash-verified

418const fireEvent = rtl.fireEvent;
419
420function renderGlobalModal(options?: RenderOptions) {
421 const result = render(<GlobalModal />, options);
422
423 /**
424 * Helper that waits for the modal to be removed from the DOM. You may need to
425 * wait for the modal to be removed to avoid any act warnings.
426 */
427 function waitForModalToHide() {
428 return rtl.waitFor(() => {
429 expect(rtl.screen.queryByRole('dialog')).not.toBeInTheDocument();
430 });
431 }
432
433 return {...result, waitForModalToHide};
434}
435
436/**
437 * Helper that waits for the drawer to be hidden from the DOM. You may need to

Calls 1

renderFunction · 0.70

Tested by 10

loadModalFunction · 0.72
openAndLoadModalFunction · 0.72
openGiftBudgetModalFunction · 0.72
openModalFunction · 0.72
openDeleteModalFunction · 0.72
loadModalFunction · 0.72
renderModalFunction · 0.72
renderAndOpenFunction · 0.72
renderComponentFunction · 0.72