From 9769f57fc621baa38f117487a135367e890e8c67 Mon Sep 17 00:00:00 2001 From: Noha Alon Date: Mon, 12 Sep 2022 21:00:46 +0300 Subject: [PATCH] Removes timeout from streamlit e2e test (#14667) * Removes timeout from streamlit e2e test We have a timeout on the app view which waits for the button but it causes a refresh on the page which causes playwright to miss the button on each refresh. we can remove the timeout altogether since we have a time limit on the test itself in the CI setup Co-authored-by: thomas chaton Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tests/tests_app_examples/test_template_streamlit_ui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests_app_examples/test_template_streamlit_ui.py b/tests/tests_app_examples/test_template_streamlit_ui.py index e2c3330529..30d6c38070 100644 --- a/tests/tests_app_examples/test_template_streamlit_ui.py +++ b/tests/tests_app_examples/test_template_streamlit_ui.py @@ -19,7 +19,7 @@ def test_template_streamlit_ui_example_cloud() -> None: def click_button(*_, **__): button = view_page.frame_locator("iframe").locator('button:has-text("Should print to the terminal ?")') - button.wait_for(timeout=5 * 1000) + if button.all_text_contents() == ["Should print to the terminal ?"]: button.click() return True