mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-19 14:32:16 +00:00
Disable firefox tests for now
That was way more errors than I expected
This commit is contained in:
2
.github/workflows/django.yml
vendored
2
.github/workflows/django.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
browser: ['chrome', 'firefox']
|
browser: ['chrome']
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
BROWSER: ${{ matrix.browser }}
|
BROWSER: ${{ matrix.browser }}
|
||||||
|
|||||||
@@ -19,11 +19,15 @@ def create_datetime(year, month, day, hour, min):
|
|||||||
return tz.localize(datetime(year, month, day, hour, min)).astimezone(pytz.utc)
|
return tz.localize(datetime(year, month, day, hour, min)).astimezone(pytz.utc)
|
||||||
|
|
||||||
|
|
||||||
def create_browser(browser):
|
def create_browser():
|
||||||
|
browser = env('BROWSER', default="chrome")
|
||||||
if browser == "firefox":
|
if browser == "firefox":
|
||||||
options = webdriver.FirefoxOptions()
|
options = webdriver.FirefoxOptions()
|
||||||
options.headless = True
|
options.headless = True
|
||||||
driver = webdriver.Firefox(options=options)
|
driver = webdriver.Firefox(options=options)
|
||||||
|
driver.set_window_position(0, 0)
|
||||||
|
# Firefox is pissy about out of bounds otherwise
|
||||||
|
driver.set_window_size(3840, 2160)
|
||||||
else:
|
else:
|
||||||
options = webdriver.ChromeOptions()
|
options = webdriver.ChromeOptions()
|
||||||
options.add_argument("--window-size=1920,1080")
|
options.add_argument("--window-size=1920,1080")
|
||||||
@@ -37,7 +41,7 @@ def create_browser(browser):
|
|||||||
class BaseTest(LiveServerTestCase):
|
class BaseTest(LiveServerTestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
self.driver = create_browser(env('BROWSER', default="chrome"))
|
self.driver = create_browser()
|
||||||
self.wait = WebDriverWait(self.driver, 15)
|
self.wait = WebDriverWait(self.driver, 15)
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class BootstrapSelectElement(Region):
|
|||||||
self.open()
|
self.open()
|
||||||
search_box.clear()
|
search_box.clear()
|
||||||
search_box.send_keys(query)
|
search_box.send_keys(query)
|
||||||
self.wait.until(expected_conditions.invisibility_of_element_located(*self._status_locator))
|
self.wait.until(expected_conditions.invisibility_of_element_located(self._status_locator))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def options(self):
|
def options(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user