77from selenium .webdriver .support import expected_conditions
88from selenium .webdriver .support .wait import WebDriverWait
99
10- from tests .utils import get_eel_server , get_console_logs
10+ from tests .utils import get_paling_server , get_console_logs
1111
1212
1313def test_01_hello_world (driver ):
14- with get_eel_server ('examples/01 - hello_world/hello.py' , 'hello.html' ) as eel_url :
15- driver .get (eel_url )
14+ with get_paling_server ('examples/01 - hello_world/hello.py' , 'hello.html' ) as paling_url :
15+ driver .get (paling_url )
1616 assert driver .title == "Hello, World!"
1717
1818 console_logs = get_console_logs (driver , minimum_logs = 2 )
@@ -21,8 +21,8 @@ def test_01_hello_world(driver):
2121
2222
2323def test_02_callbacks (driver ):
24- with get_eel_server ('examples/02 - callbacks/callbacks.py' , 'callbacks.html' ) as eel_url :
25- driver .get (eel_url )
24+ with get_paling_server ('examples/02 - callbacks/callbacks.py' , 'callbacks.html' ) as paling_url :
25+ driver .get (paling_url )
2626 assert driver .title == "Callbacks Demo"
2727
2828 console_logs = get_console_logs (driver , minimum_logs = 1 )
@@ -31,8 +31,8 @@ def test_02_callbacks(driver):
3131
3232
3333def test_03_callbacks (driver ):
34- with get_eel_server ('examples/03 - sync_callbacks/sync_callbacks.py' , 'sync_callbacks.html' ) as eel_url :
35- driver .get (eel_url )
34+ with get_paling_server ('examples/03 - sync_callbacks/sync_callbacks.py' , 'sync_callbacks.html' ) as paling_url :
35+ driver .get (paling_url )
3636 assert driver .title == "Synchronous callbacks"
3737
3838 console_logs = get_console_logs (driver , minimum_logs = 1 )
@@ -41,9 +41,9 @@ def test_03_callbacks(driver):
4141
4242
4343def test_04_file_access (driver : webdriver .Remote ):
44- with get_eel_server ('examples/04 - file_access/file_access.py' , 'file_access.html' ) as eel_url :
45- driver .get (eel_url )
46- assert driver .title == "Eel Demo"
44+ with get_paling_server ('examples/04 - file_access/file_access.py' , 'file_access.html' ) as paling_url :
45+ driver .get (paling_url )
46+ assert driver .title == "Paling Demo"
4747
4848 with TemporaryDirectory () as temp_dir , NamedTemporaryFile (dir = temp_dir ) as temp_file :
4949 driver .find_element_by_id ('input-box' ).clear ()
@@ -55,23 +55,23 @@ def test_04_file_access(driver: webdriver.Remote):
5555
5656
5757def test_06_jinja_templates (driver : webdriver .Remote ):
58- with get_eel_server ('examples/06 - jinja_templates/hello.py' , 'templates/hello.html' ) as eel_url :
59- driver .get (eel_url )
58+ with get_paling_server ('examples/06 - jinja_templates/hello.py' , 'templates/hello.html' ) as paling_url :
59+ driver .get (paling_url )
6060 assert driver .title == "Hello, World!"
6161
6262 driver .find_element_by_css_selector ('a' ).click ()
6363 WebDriverWait (driver , 2.0 ).until (expected_conditions .presence_of_element_located ((By .XPATH , '//h1[text()="This is page 2"]' )))
6464
6565
6666def test_10_custom_app (driver : webdriver .Remote ):
67- # test default eel routes are working
68- with get_eel_server ('examples/10 - custom_app_routes/custom_app.py' , 'index.html' ) as eel_url :
69- driver .get (eel_url )
67+ # test default paling routes are working
68+ with get_paling_server ('examples/10 - custom_app_routes/custom_app.py' , 'index.html' ) as paling_url :
69+ driver .get (paling_url )
7070 # we really need to test if the page 404s, but selenium has no support for status codes
7171 # so we just test if we can get our page title
7272 assert driver .title == 'Hello, World!'
7373
7474 # test custom routes are working
75- with get_eel_server ('examples/10 - custom_app_routes/custom_app.py' , 'custom' ) as eel_url :
76- driver .get (eel_url )
75+ with get_paling_server ('examples/10 - custom_app_routes/custom_app.py' , 'custom' ) as paling_url :
76+ driver .get (paling_url )
7777 assert 'Hello, World!' in driver .page_source
0 commit comments