Commit 871b7fe7 by Mushtaq Ali

Add feature disabled JS tests

Fix quality
parent 554c90d1
...@@ -21,7 +21,7 @@ from edxval.api import ( ...@@ -21,7 +21,7 @@ from edxval.api import (
get_video_info, get_video_info,
get_course_video_image_url, get_course_video_image_url,
create_or_update_video_transcript create_or_update_video_transcript
) )
from mock import Mock, patch from mock import Mock, patch
from contentstore.models import VideoUploadConfig from contentstore.models import VideoUploadConfig
...@@ -287,8 +287,8 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase): ...@@ -287,8 +287,8 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase):
} }
], ],
{ {
'en': 'English', 'en': 'English',
'es': 'Spanish' 'es': 'Spanish'
} }
) )
) )
...@@ -653,12 +653,6 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase): ...@@ -653,12 +653,6 @@ class VideosHandlerTestCase(VideoUploadTestMixin, CourseTestCase):
is_video_transcript_enabled is_video_transcript_enabled
) )
# Verify that transcripts column is present in the response if videos transcript feature is enabled.
self.assertEqual(
'<div class="video-head-col video-col transcripts-col">Transcripts</div>' in response.content,
is_video_transcript_enabled
)
@ddt.ddt @ddt.ddt
@patch.dict('django.conf.settings.FEATURES', {'ENABLE_VIDEO_UPLOAD_PIPELINE': True}) @patch.dict('django.conf.settings.FEATURES', {'ENABLE_VIDEO_UPLOAD_PIPELINE': True})
......
...@@ -580,6 +580,7 @@ def _get_index_videos(course): ...@@ -580,6 +580,7 @@ def _get_index_videos(course):
_get_values(video) for video in _get_videos(course) _get_values(video) for video in _get_videos(course)
] ]
def get_all_transcript_languages(is_video_transcript_enabled=False): def get_all_transcript_languages(is_video_transcript_enabled=False):
""" """
Returns all possible languages for transcript. Returns all possible languages for transcript.
...@@ -592,7 +593,7 @@ def get_all_transcript_languages(is_video_transcript_enabled=False): ...@@ -592,7 +593,7 @@ def get_all_transcript_languages(is_video_transcript_enabled=False):
# Get third party transcription languages. # Get third party transcription languages.
third_party_transcription_languages = transcription_plans[TranscriptProvider.THREE_PLAY_MEDIA]['languages'] third_party_transcription_languages = transcription_plans[TranscriptProvider.THREE_PLAY_MEDIA]['languages']
third_party_transcription_languages = dict(third_party_transcription_languages, **cielo_fidelity['MECHANICAL']['languages']) third_party_transcription_languages = dict(third_party_transcription_languages, **cielo_fidelity['MECHANICAL']['languages'])
third_party_transcription_languages = dict(third_party_transcription_languages , **cielo_fidelity['PREMIUM']['languages']) third_party_transcription_languages = dict(third_party_transcription_languages, **cielo_fidelity['PREMIUM']['languages'])
third_party_transcription_languages = dict(third_party_transcription_languages, **cielo_fidelity['PROFESSIONAL']['languages']) third_party_transcription_languages = dict(third_party_transcription_languages, **cielo_fidelity['PROFESSIONAL']['languages'])
# Get all settings languages dict. # Get all settings languages dict.
...@@ -603,6 +604,7 @@ def get_all_transcript_languages(is_video_transcript_enabled=False): ...@@ -603,6 +604,7 @@ def get_all_transcript_languages(is_video_transcript_enabled=False):
# Return combined settings and 3rd party transcript languages. # Return combined settings and 3rd party transcript languages.
return dict(all_languages, **third_party_transcription_languages) return dict(all_languages, **third_party_transcription_languages)
def videos_index_html(course): def videos_index_html(course):
""" """
Returns an HTML page to display previous video uploads and allow new ones Returns an HTML page to display previous video uploads and allow new ones
......
...@@ -62,7 +62,7 @@ define( ...@@ -62,7 +62,7 @@ define(
StringUtils.interpolate( StringUtils.interpolate(
gettext('{toggleShowTranscriptText} transcripts ({totalTranscripts})'), gettext('{toggleShowTranscriptText} transcripts ({totalTranscripts})'),
{ {
toggleShowTranscriptText: $transcriptsWrapperEl.hasClass('hidden') ? gettext('Show') : gettext('Hide'), toggleShowTranscriptText: $transcriptsWrapperEl.hasClass('hidden') ? gettext('Show') : gettext('Hide'), // eslint-disable-line max-len
totalTranscripts: _.size(this.transcripts) totalTranscripts: _.size(this.transcripts)
} }
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment