Expect markdown with the given message to be displayed in the app. Parameters ---------- locator : Locator The locator to search for the exception element. expected_markdown : str or Pattern[str] The expected message to be displayed in the exception.
(
locator: Locator | Page,
expected_message: str | re.Pattern[str],
)
| 758 | |
| 759 | |
| 760 | def expect_markdown( |
| 761 | locator: Locator | Page, |
| 762 | expected_message: str | re.Pattern[str], |
| 763 | ) -> None: |
| 764 | """Expect markdown with the given message to be displayed in the app. |
| 765 | |
| 766 | Parameters |
| 767 | ---------- |
| 768 | locator : Locator |
| 769 | The locator to search for the exception element. |
| 770 | |
| 771 | expected_markdown : str or Pattern[str] |
| 772 | The expected message to be displayed in the exception. |
| 773 | """ |
| 774 | markdown_el = ( |
| 775 | locator.get_by_test_id("stMarkdown") |
| 776 | .get_by_test_id("stMarkdownContainer") |
| 777 | .filter(has_text=expected_message) |
| 778 | ) |
| 779 | expect(markdown_el).to_be_visible() |
| 780 | |
| 781 | |
| 782 | def expect_text( |
searching dependent graphs…