Example #1
0
 def driveSynchronizeCurrentDocument(self):
     fl = self.fl
     if 'driveUnsynchronizeCurrentDocument' in fl.getBody():
         # Already sync
         return
     fl.assert_('driveSynchronizeCurrentDocument' in fl.getBody(),
                "No sync button found")
     fl.post(
         fl.server_url + "/view_documents.faces",
         params=
         [[
             'nxw_driveSynchronizeCurrentDocument_form',
             'nxw_driveSynchronizeCurrentDocument_form'
         ], ['javax.faces.ViewState',
             extractJsfState(fl.getBody())],
          [
              'nxw_driveSynchronizeCurrentDocument_form:nxw_driveSynchronizeCurrentDocument',
              'nxw_driveSynchronizeCurrentDocument_form:nxw_driveSynchronizeCurrentDocument'
          ]],
         description="Synchronize the current document with Drive")
     fl.assert_(
         'driveUnsynchronizeCurrentDocument' in fl.getBody()
         or 'currentUserSyncRoots' in fl.getBody(),
         "Can not synchronize the folder")
     return self
Example #2
0
 def driveSynchronizeCurrentDocument(self):
     fl = self.fl
     if "driveUnsynchronizeCurrentDocument" in fl.getBody():
         # Already sync
         return
     fl.assert_("driveSynchronizeCurrentDocument" in fl.getBody(), "No sync button found")
     fl.post(
         fl.server_url + "/view_documents.faces",
         params=[
             [
                 "nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument_form",
                 "nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument_form",
             ],
             ["javax.faces.ViewState", extractJsfState(fl.getBody())],
             [
                 "nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument_form:nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument",
                 "nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument_form:nxw_documentActionsUpperButtons_1_driveSynchronizeCurrentDocument",
             ],
         ],
         description="Synchronize the current document with Drive",
     )
     fl.assert_(
         "driveUnsynchronizeCurrentDocument" in fl.getBody() or "currentUserSyncRoots" in fl.getBody(),
         "Can not synchronize the folder",
     )
     return self
Example #3
0
 def driveUnsynchronizeCurrentDocument(self):
     fl = self.fl
     fl.post(fl.server_url + "/view_documents.faces", params=[
         ['nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument_form', 'nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument_form'],
         ['javax.faces.ViewState', extractJsfState(fl.getBody())],
         ['nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument_form:nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument', 'nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument_form:nxw_documentActionsUpperButtons_1_driveUnsynchronizeCurrentDocument']],
         description="Unsynchronize the current document with Drive")
     fl.assert_('driveSynchronizeCurrentDocument' in fl.getBody())
     return self
Example #4
0
 def driveRevokeFirstToken(self):
     fl = self.fl
     fl.post(fl.server_url + "/view_home.faces", params=[
         ['AJAXREQUEST', '_viewRoot'],
         ['currentUserAuthTokenBindings', 'currentUserAuthTokenBindings'],
         ['autoScroll', ''],
         ['javax.faces.ViewState', extractJsfState(fl)],
         ['currentUserAuthTokenBindings:nxl_authTokenBindings_1:nxl_authTokenBindings_1_deleteButton', 'currentUserAuthTokenBindings:nxl_authTokenBindings_1:nxl_authTokenBindings_1_deleteButton'],
         ['AJAX:EVENTS_COUNT', '1']],
         description="Post /nuxeo/view_home.faces")
     return self
Example #5
0
 def driveSynchronizeCurrentDocument(self):
     fl = self.fl
     if 'driveUnsynchronizeCurrentDocument' in fl.getBody():
         # Already sync
         return
     fl.assert_('driveSynchronizeCurrentDocument' in fl.getBody(),
                "No sync button found")
     fl.post(fl.server_url + "/view_documents.faces", params=[
         ['nxw_driveSynchronizeCurrentDocument_form', 'nxw_driveSynchronizeCurrentDocument_form'],
         ['javax.faces.ViewState', extractJsfState(fl.getBody())],
         ['nxw_driveSynchronizeCurrentDocument_form:nxw_driveSynchronizeCurrentDocument', 'nxw_driveSynchronizeCurrentDocument_form:nxw_driveSynchronizeCurrentDocument']],
         description="Synchronize the current document with Drive")
     fl.assert_('driveUnsynchronizeCurrentDocument' in fl.getBody()
                or 'currentUserSyncRoots' in fl.getBody(),
                "Can not synchronize the folder")
     return self
Example #6
0
 def driveRevokeFirstToken(self):
     fl = self.fl
     fl.post(
         fl.server_url + "/view_home.faces",
         params=[
             ["AJAXREQUEST", "_viewRoot"],
             ["currentUserAuthTokenBindings", "currentUserAuthTokenBindings"],
             ["autoScroll", ""],
             ["javax.faces.ViewState", extractJsfState(fl)],
             [
                 "currentUserAuthTokenBindings:nxl_authTokenBindings_1:nxl_authTokenBindings_1_deleteButton",
                 "currentUserAuthTokenBindings:nxl_authTokenBindings_1:nxl_authTokenBindings_1_deleteButton",
             ],
             ["AJAX:EVENTS_COUNT", "1"],
         ],
         description="Post /nuxeo/view_home.faces",
     )
     return self
 def getLastJsfState(self):
     return extractJsfState(self.getBody())
 def getLastJsfState(self):
     return extractJsfState(self.getBody())