UPD: make selenium tests headless by default.
This commit is contained in:
@@ -201,6 +201,7 @@ class UrlsTestCase(SimpleTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class SeleniumTestCase(StaticLiveServerTestCase):
|
class SeleniumTestCase(StaticLiveServerTestCase):
|
||||||
|
headless = True
|
||||||
window_width = 1024
|
window_width = 1024
|
||||||
window_height = 768
|
window_height = 768
|
||||||
|
|
||||||
@@ -213,6 +214,8 @@ class SeleniumTestCase(StaticLiveServerTestCase):
|
|||||||
@property
|
@property
|
||||||
def selenium(self):
|
def selenium(self):
|
||||||
if self._driver is None:
|
if self._driver is None:
|
||||||
|
if self.headless:
|
||||||
|
self._driver_options.add_argument('--headless')
|
||||||
self._driver = webdriver.Firefox(options=self._driver_options)
|
self._driver = webdriver.Firefox(options=self._driver_options)
|
||||||
if self.quit_selenium is None:
|
if self.quit_selenium is None:
|
||||||
self.quit_selenium = True
|
self.quit_selenium = True
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ TEST_EVENT_DATA_M = {
|
|||||||
|
|
||||||
@tag('screenshots', 'browser')
|
@tag('screenshots', 'browser')
|
||||||
class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
class TestCase(SeleniumAuthMixin, RoleMixin, ScreenshotTestCase):
|
||||||
|
headless = False
|
||||||
screenshot_prefix = 'dav_events-'
|
screenshot_prefix = 'dav_events-'
|
||||||
|
|
||||||
def create_event(self, event_data, auth=False, screenshots=True):
|
def create_event(self, event_data, auth=False, screenshots=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user