@@ -0,0 +1,3232 @@
+from django.test import LiveServerTestCase, override_settings, tag, Client%0Afrom django.contrib.staticfiles.testing import StaticLiveServerTestCase%0Afrom django.contrib.auth.models import User%0A%0Afrom selenium import webdriver%0Afrom selenium.webdriver.support import expected_conditions%0Afrom selenium.webdriver.common.desired_capabilities import DesiredCapabilities%0Afrom selenium.webdriver.support.ui import WebDriverWait%0Afrom selenium.webdriver.common.by import By%0A%0Afrom studygroups.models import Course%0Afrom studygroups.models import StudyGroup%0Afrom custom_registration.models import create_user, confirm_user_email%0A#from e2e.tests.selenium.page_objects import LearningCircleCreationPage%0A#from e2e.tests.selenium.locators import LearningCircleCreationPageLocators%0A#from e2e.tests.selenium.locators import RegistrationModalLocators%0A%0Aimport socket%0A%0A@override_settings(ALLOWED_HOSTS=%5B'*'%5D)%0Aclass LearningCircleManage(StaticLiveServerTestCase):%0A    fixtures = %5B'test_courses.json', 'test_studygroups.json'%5D%0A    host = '0.0.0.0'%0A%0A    @classmethod%0A    def setUpClass(cls):%0A        super().setUpClass()%0A        cls.host = socket.gethostbyname(socket.gethostname())%0A        chrome_options = webdriver.ChromeOptions()%0A        chrome_options.add_argument('--disable-web-security')%0A        #chrome_options.add_argument('--headless')%0A        chrome_options.add_argument('--no-sandbox')%0A        chrome_options.add_argument('--disable-gpu')%0A        #chrome_options.add_argument('--auto-open-devtools-for-tabs')%0A        #chrome_options.add_argument('--start-maximized')%0A        capabilities = DesiredCapabilities.CHROME%0A        capabilities%5B'loggingPrefs'%5D = %7B 'browser':'ALL' %7D%0A        cls.driver = webdriver.Remote(%0A          command_executor='http://selenium:4444/wd/hub',%0A          desired_capabilities=capabilities,%0A          options=chrome_options%0A        )%0A        timeout = 10%0A        #cls.driver.implicitly_wait(timeout)%0A        cls.wait = WebDriverWait(cls.driver, timeout)%0A%0A%0A    @classmethod%0A    def tearDownClass(cls):%0A        cls.driver.quit()%0A        super().tearDownClass()%0A%0A%0A    def setUp(self):%0A        self.facilitator = create_user('hi@example.net', 'bowie', 'wowie', 'password')%0A        sg = StudyGroup.objects.get(pk=1)%0A        sg.facilitator = self.facilitator%0A        sg.save()%0A        self.study_group = sg%0A%0A        client = Client()%0A        client.login(username=self.facilitator.username, password='password')%0A        cookie = client.cookies%5B'sessionid'%5D%0A        self.driver.get(self.live_server_url)%0A        self.driver.add_cookie(%7B'name': 'sessionid', 'value': cookie.value, 'secure': False, 'path': '/'%7D)%0A        self.driver.refresh()%0A%0A%0A    def test_page(self):%0A        self.driver.get(f'%7Bself.live_server_url%7D/en/studygroup/%7Bself.study_group.pk%7D/')%0A        self.assertTrue(expected_conditions.title_is('P2PU Learning Circles'))%0A        self.assertTrue(%0A            expected_conditions.text_to_be_present_in_element(%0A                (By.CSS_SELECTOR, 'h1'),%0A                self.study_group.name%0A            )%0A        )%0A        # Make sure react build is loaded%0A%0A%0A    def test_meeting_feedback(self):%0A        pass%0A%0A%0A    def test_learning_circle_rating(self):%0A        pass%0A%0A%0A    def test_course_rating(self):%0A        pass%0A

Add boilerplate + simple test for learning circle management page