19 lines
555 B
Python
19 lines
555 B
Python
import os
|
|
import pytest
|
|
from selenium import webdriver
|
|
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
|
|
|
|
SELENIUM_GRID_URL = os.getenv('SELENIUM_GRID_URL')
|
|
|
|
@pytest.mark.e2e
|
|
def test_ping_endpoint():
|
|
if not SELENIUM_GRID_URL:
|
|
pytest.skip("No Selenium Grid URL set")
|
|
|
|
driver = webdriver.Remote(
|
|
command_executor=SELENIUM_GRID_URL,
|
|
desired_capabilities=DesiredCapabilities.CHROME
|
|
)
|
|
driver.get("http://host.docker.internal:8080/")
|
|
assert "Pong" in driver.page_source
|
|
driver.quit() |