Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social platform URL update #33500

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lms/djangoapps/branding/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_get_footer(self):
business_url = 'https://business.edx.org/?utm_campaign=edX.org+Referral&utm_source=edX.org&utm_medium=Footer'
facebook_url = 'http://www.facebook.com/EdxOnline'
linkedin_url = 'http://www.linkedin.com/company/edx'
twitter_url = 'https://twitter.com/edXOnline'
twitter_url = 'https://x.com/edXOnline'
reddit_url = 'http://www.reddit.com/r/edx'
expected_footer = {
'copyright': '\xa9 \xe9dX. All rights reserved except where noted. '
Expand Down
6 changes: 3 additions & 3 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3450,7 +3450,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
# to URLs defined in configuration.
SOCIAL_MEDIA_FOOTER_ACE_URLS = {
'reddit': 'http://www.reddit.com/r/edx',
'twitter': 'https://twitter.com/edXOnline',
'twitter': 'https://x.com/edXOnline',
'linkedin': 'http://www.linkedin.com/company/edx',
'facebook': 'http://www.facebook.com/EdxOnline',
}
Expand Down Expand Up @@ -4190,8 +4190,8 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring
},
'twitter': {
'display_name': 'Twitter',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like this value should also be renamed to "X", doesn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dyudyunov @Inferato I think so, yep.. and there's a couple more references that could be fixed here too:

And maybe more? Mentions made in js/fixtures or js/spec can be ignored I think (e.g. 1, 2), since they're only used in testing.

'url_stub': 'twitter.com/',
'example': 'https://www.twitter.com/username'
'url_stub': 'x.com/',
'example': 'https://www.x.com/username'
},
'linkedin': {
'display_name': 'LinkedIn',
Expand Down
4 changes: 2 additions & 2 deletions openedx/core/djangoapps/schedules/tests/test_resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def test_schedule_context(self):
google_store_url = 'https://play.google.com/store/apps/details?id=org.edx.mobile'
facebook_url = 'http://www.facebook.com/EdxOnline'
linkedin_url = 'http://www.linkedin.com/company/edx'
twitter_url = 'https://twitter.com/edXOnline'
twitter_url = 'https://x.com/edXOnline'
reddit_url = 'http://www.reddit.com/r/edx'
facebook_logo_url = 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png'
linkedin_logo_url = 'http://email-media.s3.amazonaws.com/edX/2021/social_3_linkedin.png'
Expand Down Expand Up @@ -283,7 +283,7 @@ def test_schedule_context(self):
google_store_url = 'https://play.google.com/store/apps/details?id=org.edx.mobile'
facebook_url = 'http://www.facebook.com/EdxOnline'
linkedin_url = 'http://www.linkedin.com/company/edx'
twitter_url = 'https://twitter.com/edXOnline'
twitter_url = 'https://x.com/edXOnline'
reddit_url = 'http://www.reddit.com/r/edx'
facebook_logo_url = 'http://email-media.s3.amazonaws.com/edX/2021/social_1_fb.png'
linkedin_logo_url = 'http://email-media.s3.amazonaws.com/edX/2021/social_3_linkedin.png'
Expand Down
8 changes: 4 additions & 4 deletions openedx/core/djangoapps/user_api/accounts/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def test_set_single_social_link(self):
def test_set_multiple_social_links(self):
social_links = [
dict(platform="facebook", social_link=f"https://www.facebook.com/{self.user.username}"),
dict(platform="twitter", social_link=f"https://www.twitter.com/{self.user.username}"),
dict(platform="twitter", social_link=f"https://www.x.com/{self.user.username}"),
]
update_account_settings(self.user, {"social_links": social_links})
account_settings = get_account_settings(self.default_request)[0]
Expand All @@ -197,7 +197,7 @@ def test_add_social_links(self):
update_account_settings(self.user, {"social_links": original_social_links})

extra_social_links = [
dict(platform="twitter", social_link=f"https://www.twitter.com/{self.user.username}"),
dict(platform="twitter", social_link=f"https://www.x.com/{self.user.username}"),
dict(platform="linkedin", social_link=f"https://www.linkedin.com/in/{self.user.username}"),
]
update_account_settings(self.user, {"social_links": extra_social_links})
Expand All @@ -208,7 +208,7 @@ def test_add_social_links(self):

def test_replace_social_links(self):
original_facebook_link = dict(platform="facebook", social_link="https://www.facebook.com/myself")
original_twitter_link = dict(platform="twitter", social_link="https://www.twitter.com/myself")
original_twitter_link = dict(platform="twitter", social_link="https://www.x.com/myself")
update_account_settings(self.user, {"social_links": [original_facebook_link, original_twitter_link]})

modified_facebook_link = dict(platform="facebook", social_link="https://www.facebook.com/new_me")
Expand All @@ -219,7 +219,7 @@ def test_replace_social_links(self):

def test_remove_social_link(self):
original_facebook_link = dict(platform="facebook", social_link="https://www.facebook.com/myself")
original_twitter_link = dict(platform="twitter", social_link="https://www.twitter.com/myself")
original_twitter_link = dict(platform="twitter", social_link="https://www.x.com/myself")
update_account_settings(self.user, {"social_links": [original_facebook_link, original_twitter_link]})

removed_facebook_link = dict(platform="facebook", social_link="")
Expand Down
10 changes: 5 additions & 5 deletions openedx/core/djangoapps/user_api/accounts/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def validate_social_link(self, social_platform, link):
('facebook', 'facebook.com/edX/', 'https://www.facebook.com/edX', True),
('facebook', 'HTTP://facebook.com/edX/', 'https://www.facebook.com/edX', True),
('facebook', 'www.evilwebsite.com/123', None, False),
('twitter', 'https://www.twiter.com/edX/', None, False),
('twitter', 'https://www.twitter.com/edX/123s', None, False),
('twitter', 'twitter.com/edX', 'https://www.twitter.com/edX', True),
('twitter', 'twitter.com/edX?foo=bar', 'https://www.twitter.com/edX', True),
('twitter', 'twitter.com/test.user', 'https://www.twitter.com/test.user', True),
('twitter', 'https://www.x.com/edX/', 'https://www.x.com/edX', True),
('twitter', 'https://www.x.com/edX/123s', None, False),
('twitter', 'x.com/edX', 'https://www.x.com/edX', True),
('twitter', 'x.com/edX?foo=bar', 'https://www.x.com/edX', True),
('twitter', 'x.com/test.user', 'https://www.x.com/test.user', True),
('linkedin', 'www.linkedin.com/harryrein', None, False),
('linkedin', 'www.linkedin.com/in/harryrein-1234', 'https://www.linkedin.com/in/harryrein-1234', True),
('linkedin', 'www.evilwebsite.com/123?www.linkedin.com/edX', None, False),
Expand Down
Loading