54e78b6274
test_upload: This will create a file and make sure it uploads by verifying a file uploads and is assigned a URL. test_download: This will create a file, upload it and then download it making sure it is the same filename that was uploaded. We can expand this later to maybe check the sizes and such. test_progress: This will create a file and make sure the progress bar shows up after it begins uploading. These are python tests and use Pipenv to manage dependencies as well as tox as the virtualenv manager, and finally pytest as the test runner.
18 lines
519 B
Python
18 lines
519 B
Python
from pypom import Page
|
|
from selenium.webdriver.common.by import By
|
|
|
|
|
|
class Base(Page):
|
|
|
|
_url = '{base_url}'
|
|
_send_logo_locator = (By.CLASS_NAME, 'logo')
|
|
|
|
def __init__(self, selenium, base_url, locale='en-US', **kwargs):
|
|
super(Base, self).__init__(
|
|
selenium, base_url, locale=locale, timeout=10, **kwargs)
|
|
|
|
def wait_for_page_to_load(self):
|
|
self.wait.until(
|
|
lambda _: self.find_element(
|
|
*self._send_logo_locator).is_displayed())
|
|
return self
|