add tests

This commit is contained in:
Waylon Walker 2020-07-26 03:14:01 +00:00
parent be5b06bd3f
commit a12e213871
3 changed files with 81 additions and 0 deletions

23
tests/conftest.py Normal file
View file

@ -0,0 +1,23 @@
import time
import pytest
from src.testproject.sdk.drivers import webdriver
def get_driver(wait_time=0):
"creates a webdriver and loads the homepage"
driver = webdriver.Chrome()
driver.get("https://waylonwalker.com/")
time.sleep(wait_time) # wait for the GitHub api to load on the page
return driver
@pytest.fixture
def driver():
driver = get_driver()
yield driver
driver.quit()
@pytest.fixture
def slow_driver():
driver = get_driver(10)
yield driver
driver.quit()