Merge pull request #18296 from edx/colelrogers/remove-GDPR-flag

Removed GDPR flags and usages WIP
This commit is contained in:
Cole Rogers
2018-06-04 11:56:13 -04:00
committed by GitHub
9 changed files with 37 additions and 49 deletions

View File

@@ -188,8 +188,7 @@ class CombinedLoginAndRegisterPage(PageObject):
).fulfill()
def register(
self, email="", password="", username="", full_name="", country="", favorite_movie="",
terms_of_service=False
self, email="", password="", username="", full_name="", country="", favorite_movie=""
):
"""Fills in and submits the registration form.
@@ -204,11 +203,10 @@ class CombinedLoginAndRegisterPage(PageObject):
username (unicode): The user's username.
full_name (unicode): The user's full name.
country (unicode): Two-character country code.
terms_of_service (boolean): If True, agree to the terms of service and honor code.
"""
# Fill in the form
self.wait_for_element_visibility('#register-honor_code', 'Honor code field is shown')
self.wait_for_element_visibility('#toggle_optional_fields', 'Support education research field is shown')
if email:
self.q(css="#register-email").fill(email)
if full_name:
@@ -221,10 +219,6 @@ class CombinedLoginAndRegisterPage(PageObject):
self.q(css="#register-country").results[0].send_keys(country)
if favorite_movie:
self.q(css="#register-favorite_movie").fill(favorite_movie)
if terms_of_service:
self.q(css="label[for='register-honor_code']").click()
self.q(css="#register-honor_code").click()
EmptyPromise(lambda: self.q(css='#register-honor_code:checked'), 'Honor code field is checked').fulfill()
# Submit it
self.q(css=".register-button").click()

View File

@@ -310,8 +310,7 @@ class RegisterFromCombinedPageTest(UniqueCourseTest):
username=username,
full_name="Test User",
country="US",
favorite_movie="Mad Max: Fury Road",
terms_of_service=True
favorite_movie="Mad Max: Fury Road"
)
# Expect that we reach the dashboard and we're auto-enrolled in the course
@@ -332,14 +331,11 @@ class RegisterFromCombinedPageTest(UniqueCourseTest):
email=email,
password="password",
username="",
full_name="Test User",
terms_of_service=False
full_name="Test User"
)
# Verify that the expected errors are displayed.
errors = self.register_page.wait_for_errors()
self.assertIn(u'Please enter your Public Username.', errors)
self.assertIn(u'You must agree to the édX Terms of Service and Honor Code',
errors)
self.assertIn(u'Select your country or region of residence.', errors)
self.assertIn(u'Please tell us your favorite movie.', errors)
@@ -372,8 +368,8 @@ class RegisterFromCombinedPageTest(UniqueCourseTest):
self.assertEqual(self.register_page.full_name_value, "William Adama")
self.assertIn("Galactica1", self.register_page.username_value)
# Set country, accept the terms, and submit the form:
self.register_page.register(country="US", favorite_movie="Battlestar Galactica", terms_of_service=True)
# Set country and submit the form:
self.register_page.register(country="US", favorite_movie="Battlestar Galactica")
# Expect that we reach the dashboard and we're auto-enrolled in the course
course_names = self.dashboard_page.wait_for_page().available_courses

View File

@@ -162,7 +162,6 @@ class AutoEnrollmentWithCSVTest(BaseInstructorDashboardTest):
password="123456",
username=username,
full_name="Test User",
terms_of_service=True,
country="US",
favorite_movie="Harry Potter",
)