Exemplo n.º 1
0
    def setUpClass(cls):
        super(TestCaseSubmittable, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.modal = site_modals.SiteModals(cls)
        cls.video_pg = video_page.VideoPage(cls)
        cls.video_language_pg = video_language_page.VideoLanguagePage(cls)

        cls.user = UserFactory.create(username = '******')
        cls.sub_editor = subtitle_editor.SubtitleEditor(cls)
        td = {'video_url': ('http://qa.pculture.org/amara_tests/'
                     'Birds_short.mp4')
             }
        cls.test_video = VideoFactory(**td)
        cls.video_pg.open_video_page(cls.test_video.video_id)
        cls.video_pg.log_in(cls.user.username, 'password')
 
        #Open the video page and sync the first 3 subs
        cls.video_pg.add_subtitles()
        cls.modal.add_language('English', 'English')
        cls.editor_pg.legacy_editor()
        cls.logger.info('typing subs')
        cls.typed_subs = cls.sub_editor.type_subs()
        cls.sub_editor.continue_to_next_step()
        cls.logger.info('syncing subs')
        cls.sub_editor.sync_subs(len(cls.typed_subs)+2)
        cls.timing_list = cls.sub_editor.sub_timings()
        cls.sub_editor.save_and_exit()
Exemplo n.º 2
0
    def setUpClass(cls):
        super(TestCaseTools, cls).setUpClass()
        cls.modal = site_modals.SiteModals(cls)
        cls.user = UserFactory.create()
        data = {
            'url': 'http://www.youtube.com/watch?v=5CKwCfLUwj4',
            'video__title': 'Open Source Philosophy',
            'video__primary_audio_language_code': 'en',
            'type': 'Y'
        }

        cls.data_utils = data_helpers.DataHelpers()
        cls.video = cls.data_utils.create_video(**data)
        subs_data = {
            'language_code': 'en',
            'complete': True,
            'visibility': 'public'
        }

        cls.data_utils.add_subs(video=cls.video, **subs_data)
        management.call_command('update_index', interactive=False)
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.data_utils = data_helpers.DataHelpers()
        cls.video_pg = video_page.VideoPage(cls)
        cls.video_pg.open_page('auth/login/', alert_check=True)
        cls.video_pg.log_in(cls.user.username, 'password')
Exemplo n.º 3
0
    def setUp(self):
        super(TestCaseIncomplete, self).setUp()
        self.data_utils = data_helpers.DataHelpers()
        self.video_pg = video_page.VideoPage(self)
        self.user = UserFactory.create(username = '******')
        self.sub_editor = subtitle_editor.SubtitleEditor(self)
        self.editor_pg = editor_page.EditorPage(self)
        self.modal = site_modals.SiteModals(self)
        td = {'url': ('http://qa.pculture.org/amara_tests/'
                   'Birds_short.webmsd.webm')
             }

        self.test_video = VideoFactory(**td)
        self.video_pg.open_video_page(self.test_video.video_id)
        self.video_pg.log_in(self.user.username, 'password')
        self.video_pg.set_skiphowto()
 
        #Open the video page and sync the first 3 subs
        self.video_pg.add_subtitles()

        self.modal.add_language('English', 'English')
        self.editor_pg.legacy_editor()
        self.logger.info('typing subs')
        self.typed_subs = self.sub_editor.type_subs()
        self.sub_editor.continue_to_next_step()
        
        self.logger.info('syncing subs')
        self.sub_editor.sync_subs(len(self.typed_subs)+2)
        self.timing_list = self.sub_editor.sub_timings()
        self.sub_editor.continue_to_next_step()
        self.logger.info('continue to description screen')
        self.sub_editor.continue_to_next_step()
        self.logger.info('continue to review screen')
        self.sub_editor.continue_to_next_step()
Exemplo n.º 4
0
    def setUpClass(cls):
        super(TestCaseTools, cls).setUpClass()
        cls.modal = site_modals.SiteModals(cls)
        cls.data_utils = data_helpers.DataHelpers()
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.video_pg = video_page.VideoPage(cls)
        cls.user = UserFactory()
        cls.video_pg.open_page('auth/login/')
        cls.video_pg.log_in(cls.user.username, 'password')
        cls.video = VideoFactory(
            video_url='http://www.youtube.com/watch?v=5CKwCfLUwj4',
            title='Open Source Philosophy',
            #primary_audio_language_code='en'
        )
        cls.data_utils.add_subs(video=cls.video)
        langs = ['en', 'da', 'nl']

        for lc in langs:
            defaults = {
                'video':
                cls.video,
                'language_code':
                lc,
                'complete':
                True,
                'visibility':
                'public',
                'committer':
                cls.user,
                'subtitles': ('apps/webdriver_testing/subtitle_data/'
                              'Open Source Philosophy.%s.dfxp' % lc)
            }
            cls.data_utils.add_subs(**defaults)
        management.call_command('update_index', interactive=False)
Exemplo n.º 5
0
    def setUpClass(cls):
        super(TestCaseTeamMessages, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.a_team_pg = ATeamPage(cls)
        cls.members_tab = members_tab.MembersTab(cls)
        cls.messages_tab = messages_tab.MessagesTab(cls)
        cls.modal = site_modals.SiteModals(cls)
        cls.user_message_pg = user_messages_page.UserMessagesPage(cls)
        cls.non_member = UserFactory()
        cls.admin = UserFactory()
        cls.manager = UserFactory()
        cls.member = UserFactory()

        cls.team = TeamFactory(admin=cls.admin,
                               manager=cls.manager,
                               member=cls.member,
                               )
        cls.team.membership_policy = 1
        cls.team.save()

        #ADD THE TEST MESSAGES TO THE TEST TEAM
        cls.members_tab.open_members_page(cls.team.slug)
        cls.members_tab.log_in(cls.admin.username, 'password')
        cls.messages_tab.open_messages_tab(cls.team.slug)
        cls.messages_tab.edit_messages(cls._TEST_MESSAGES)
Exemplo n.º 6
0
    def setUpClass(cls):
        super(TestCaseTasksEnabledDashboard, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.modal = site_modals.SiteModals(cls)
        cls.dashboard_tab = dashboard_tab.DashboardTab(cls)
        cls.tasks_tab = tasks_tab.TasksTab(cls)

        cls.admin = UserFactory()
        cls.manager = UserFactory()
        cls.member = UserFactory()
        cls.team = TeamFactory(admin=cls.admin,
                               manager=cls.manager,
                               member=cls.member,
                               workflow_enabled=True)
        cls.team_workflow = WorkflowFactory(team=cls.team,
                                            autocreate_subtitle=True,
                                            autocreate_translate=True,
                                            review_allowed=10)

        langs = ['en', 'ru', 'pt-br', 'fr', 'de', 'es']
        for lc in langs:
            TeamLangPrefFactory(team=cls.team,
                                language_code=lc,
                                preferred=True)

        cls.en_video = VideoFactory(primary_audio_language_code='en')
        TeamVideoFactory(team=cls.team, video=cls.en_video)
        cls.video = TeamVideoFactory(team=cls.team).video
        cls.polly_glott = TeamMemberFactory(team=cls.team, ).user

        polly_speaks = ['en', 'cs', 'ru', 'ar']
        for lang in polly_speaks:
            UserLangFactory(user=cls.polly_glott, language=lang)
Exemplo n.º 7
0
    def setUpClass(cls):
        super(TestCaseModeratedVideoTitles, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.admin_video_pg = edit_video_page.EditVideoPage(cls)
        cls.tasks_tab = TasksTab(cls)
        cls.videos_tab = VideosTab(cls)
        cls.video_pg = video_page.VideoPage(cls)

        cls.modal = site_modals.SiteModals(cls)
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.video_lang_pg = video_language_page.VideoLanguagePage(cls)

        cls.staff = UserFactory(is_staff=True, is_superuser=True)
        cls.admin = UserFactory()
        cls.manager = UserFactory()
        cls.member = UserFactory()
        cls.team = TeamFactory(admin=cls.admin,
                               manager=cls.manager,
                               member=cls.member,
                               workflow_type='O',
                               workflow_enabled=True
                              )

        cls.workflow = WorkflowFactory(
            team = cls.team,
            autocreate_subtitle = True,
            autocreate_translate = False,
            review_allowed = 10,
            approve_allowed = 20)
        #Create a member of the team
        cls.subs_file = os.path.join(os.getcwd(), 'apps','webdriver_testing',
                                    'subtitle_data', 'basic_subs.dfxp')
Exemplo n.º 8
0
 def setUpClass(cls):
     super(TestCaseOpenTeamPage, cls).setUpClass()
     cls.team_owner = UserFactory.create()
     cls.team = TeamMemberFactory.create(
         user = cls.team_owner).team
     cls.a_team_pg = ATeamPage(cls)
     cls.a_team_pg.open_team_page(cls.team.slug)
     cls.modal = site_modals.SiteModals(cls) 
     cls.default_langs = ['English', 'French']
Exemplo n.º 9
0
 def setUp(self):
     super(TestCaseTranscribing, self).setUp()
     self.data_utils = data_helpers.DataHelpers()
     self.modal = site_modals.SiteModals(self)
     self.editor_pg = editor_page.EditorPage(self)
     td = {
         'video_url': ('http://qa.pculture.org/amara_tests/'
                       'Birds_short.webmsd.webm')
     }
     self.test_video = self.data_utils.create_video(**td)
     self.video_pg = video_page.VideoPage(self)
     self.user = UserFactory.create()
     self.video_pg.open_video_page(self.test_video.video_id)
     self.video_pg.log_in(self.user.username, 'password')
     self.sub_editor = subtitle_editor.SubtitleEditor(self)
     self.video_pg.log_in(self.user.username, 'password')
     self.video_pg.add_subtitles()
     self.modal.add_language('English', 'English')
     self.editor_pg.legacy_editor()
     self.typed_subs = self.sub_editor.type_subs()
Exemplo n.º 10
0
    def setUpClass(cls):
        super(TestCasePartialSync, cls).setUpClass()
        cls.data_utils = data_helpers.DataHelpers()
        cls.user = UserFactory.create(username='******')
        cls.modal = site_modals.SiteModals(cls)
        cls.editor_pg = editor_page.EditorPage(cls)
        cls.sub_editor = subtitle_editor.SubtitleEditor(cls)
        cls.video_pg = video_page.VideoPage(cls)
        cls.video_language_pg = video_language_page.VideoLanguagePage(cls)

        td = {'video_url': ('http://www.youtube.com/watch?v=WqJineyEszo')}
        cls.test_video = VideoFactory(**td)
        cls.video_pg.open_video_page(cls.test_video.video_id)
        cls.video_pg.log_in(cls.user.username, 'password')
        cls.video_pg.set_skiphowto()
        #Open the video page and sync the first 3 subs
        cls.video_pg.add_subtitles()
        cls.modal.add_language('English', 'English')
        cls.editor_pg.legacy_editor()
        cls.typed_subs = cls.sub_editor.type_subs()
        cls.sub_editor.save_and_exit()