Project / testcases /test_delete_person.py
RajaThor's picture
Rename test_delete_person.py to testcases/test_delete_person.py
5b51358 verified
raw
history blame contribute delete
597 Bytes
import streamlit.testing as stt
def test_delete_person():
with stt.install_test_input():
stt.test_runner.start("app.py")
# Select the "Delete Person" option
stt.test_input("Select Option", "Delete Person")
# Enter the name of the person to delete
stt.test_input("Enter Name", "John Doe")
# Click the "Delete Person" button
stt.test_input("Delete Person")
# Verify the deletion message
stt.test_output("John Doe deleted from the database!")
# Clean up
stt.test_runner.cleanup()
test_delete_person()