class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        g_common_obj.set_vertical_screen()

    def test_rotate_playvideo(self):
        ''' refer TC test_Rotate_PlayVideo
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.rotate_during_video_playback()
        self.photos.stop_photos_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()
        self.extend_photos = PhotosExtendImpl()
        self.remote_path = self.extend_photos.push_videos(like='test_video_qr',
                                                          exts='.mp4')[0]

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        ImageDetails.delete_picture()
        ImageDetails.set_workaround()

    def test_screenshot_videoplayback(self):
        ''' refer TC test_Screenshot_VideoPlayback
        '''
        print "[RunTest]: %s" % self.__str__()
        #         self.photos.launch_photos_am()
        self.photos.play_video_command(self.remote_path)
        time.sleep(5)
        self._composeui.capture_screen_shot_during_video_playback()
        self.photos.stop_photos_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self.photos = get_photo_implement()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.delete_local_video()
        self.photos.rm_delete_photos()
        self.photos.refresh_sdcard()
        g_common_obj.set_vertical_screen()

    def test_videoplayback_interaction(self):
        ''' refer TC test_VideoPlayback_Interaction
        '''
        print "[RunTest]: %s" % self.__str__()
        self.photos.launch_photos_am()
        self._composeui.rotate_during_video_playback()
        time.sleep(2)
        g_common_obj.set_vertical_screen()
        g_common_obj.assert_exp_happens()
        self._composeui.swipedown_notification_and_rotate_during_video_playback(
        )
        time.sleep(2)
        g_common_obj.set_vertical_screen()
        g_common_obj.assert_exp_happens()
        self.photos.stop_photos_am()
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        self._composeui = ComposeUiImpl()
        self._fit = FitImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        self._composeui.uninstall_mxtech()
        self._fit.open_wifi()
        self._composeui.delete_local_video()

    def test_immersemode_mxplayer(self):
        ''' refer TC test_ImmerseMode_MXPlayer
        '''
        print "[RunTest]: %s" % self.__str__()
        self._composeui.launch_mxtech_am()
        self._composeui.check_notification_during_playing()
        self._composeui.stop_mxtech_am()
Exemple #5
0
class ComposeUI(UIATestBase):
    def setUp(self):
        super(ComposeUI, self).setUp()
        self._test_name = __name__
        print "[Setup]: %s" % self._test_name
        #### Replace with MX
        # self._flvvideoplayer = FLVVideoPlayer()
        # self._composeui = ComposeUiImpl()
        # self.photos = get_photo_implement()
        # config = TestConfig()
        # cfg_file = 'tests.tablet.composeui.conf'
        # cfg_arti = config.read(cfg_file, 'artifactory')
        # config_handle = ConfigHandle()
        # cfg_arti["location"] = config_handle.read_configuration('artifactory', 'location', '/etc/oat/', 'sys.conf')
        # arti = Artifactory(cfg_arti.get('location'))
        # cfg_apk = config.read(cfg_file, 'FLVplayer')
        # binary_name = cfg_apk.get("name")
        # file_path = arti.get(binary_name)
        # result = config_handle.check_apps("air.br.com.bitlabs.FLVPlayer")
        # if result == 0:
        #     g_common_obj.adb_cmd_common('install ' + file_path)
        # self.photos.rm_delete_photos()
        # self.photos.refresh_sdcard()
        # self._composeui.init_local_video()
        self._composeui = ComposeUiImpl()
        self._fit = FitImpl()
        config_handle = ConfigHandle()
        result = config_handle.check_apps("com.mxtech.videoplayer.ad")
        if result == 0:
            self._composeui.install_apk('Mxplayer')
        self._composeui.init_local_video()

    def tearDown(self):
        print "[Teardown]: %s" % self._test_name
        super(ComposeUI, self).tearDown()
        # self._composeui.delete_local_video()
        # self._flvvideoplayer.uninstall_app()
        self._composeui.uninstall_mxtech()
        self._fit.open_wifi()
        self._composeui.delete_local_video()

    def test_VideoPlayer_FLV(self):
        ''' refer TC test_VideoPlayer_FLV
        '''
        print "[RunTest]: %s" % self.__str__()
        # self._flvvideoplayer.launch_app_am()
        # self._flvvideoplayer.play_video()
        # self._flvvideoplayer.stop_app_am()
        self._composeui.launch_mxtech_am()
        self._composeui.check_notification_during_playing()
        self._composeui.stop_mxtech_am()