11from unittest import expectedFailure
22
3- from django .contrib .staticfiles .testing import StaticLiveServerTestCase
3+ from channels .testing import ChannelsLiveServerTestCase
4+ from django .test import tag
45from django .urls import reverse
56from selenium .common .exceptions import JavascriptException , NoSuchElementException
67from selenium .webdriver import ActionChains
1112from .utils import SeleniumTestMixin
1213
1314
14- class TestMenu (SeleniumTestMixin , StaticLiveServerTestCase ):
15+ @tag ("selenium_tests" )
16+ class TestMenu (SeleniumTestMixin , ChannelsLiveServerTestCase ):
1517 def tearDown (self ):
1618 super ().tearDown ()
1719 # Clear local storage
@@ -360,7 +362,8 @@ def test_menu_on_narrow_screen(self):
360362 self .web_driver .set_window_size (1366 , 768 )
361363
362364
363- class TestBasicFilter (SeleniumTestMixin , StaticLiveServerTestCase , CreateMixin ):
365+ @tag ("selenium_tests" )
366+ class TestBasicFilter (SeleniumTestMixin , ChannelsLiveServerTestCase , CreateMixin ):
364367 shelf_model = Shelf
365368 book_model = Book
366369
@@ -505,7 +508,8 @@ def test_book_filter(self):
505508 self .assertEqual (paginator .get_attribute ("innerText" ), "1 book" )
506509
507510
508- class TestInputFilters (SeleniumTestMixin , CreateMixin , StaticLiveServerTestCase ):
511+ @tag ("selenium_tests" )
512+ class TestInputFilters (SeleniumTestMixin , CreateMixin , ChannelsLiveServerTestCase ):
509513 shelf_model = Shelf
510514
511515 def test_input_filters (self ):
@@ -595,7 +599,8 @@ def test_input_filters(self):
595599 self .find_element (By .XPATH , user_xpath )
596600
597601
598- class TestDashboardCharts (SeleniumTestMixin , CreateMixin , StaticLiveServerTestCase ):
602+ @tag ("selenium_tests" )
603+ class TestDashboardCharts (SeleniumTestMixin , CreateMixin , ChannelsLiveServerTestCase ):
599604 def setUp (self ):
600605 super ().setUp ()
601606 self .web_driver .set_window_size (1600 , 768 )
@@ -613,7 +618,10 @@ def test_pie_chart_zero_annotation(self):
613618 self .assertEqual (annotation_text .text , "0" )
614619
615620
616- class TestAutocompleteFilter (SeleniumTestMixin , CreateMixin , StaticLiveServerTestCase ):
621+ @tag ("selenium_tests" )
622+ class TestAutocompleteFilter (
623+ SeleniumTestMixin , CreateMixin , ChannelsLiveServerTestCase
624+ ):
617625 shelf_model = Shelf
618626 book_model = Book
619627
@@ -710,7 +718,8 @@ def test_autocomplete_owner_filter(self):
710718 )
711719
712720
713- class TestFirefoxSeleniumHelpers (SeleniumTestMixin , StaticLiveServerTestCase ):
721+ @tag ("selenium_tests" )
722+ class TestFirefoxSeleniumHelpers (SeleniumTestMixin , ChannelsLiveServerTestCase ):
714723 def setUp (self ):
715724 super ().setUp ()
716725 self .login ()
@@ -748,7 +757,8 @@ def test_find_elements(self):
748757 self .assertTrue (len (divs ) > 1 )
749758
750759
751- class TestChromeSeleniumHelpers (SeleniumTestMixin , StaticLiveServerTestCase ):
760+ @tag ("selenium_tests" )
761+ class TestChromeSeleniumHelpers (SeleniumTestMixin , ChannelsLiveServerTestCase ):
752762 browser = "chrome"
753763
754764 def test_get_browser_logs (self ):
@@ -757,7 +767,8 @@ def test_get_browser_logs(self):
757767 self .assertEqual (len (self .get_browser_logs ()), 1 )
758768
759769
760- class TestSeleniumMixinRetryMechanism (SeleniumTestMixin , StaticLiveServerTestCase ):
770+ @tag ("selenium_tests" )
771+ class TestSeleniumMixinRetryMechanism (SeleniumTestMixin , ChannelsLiveServerTestCase ):
761772 retry_delay = 0
762773
763774 @classmethod
0 commit comments