Commit 066952a1 authored by Andras Bartok's avatar Andras Bartok Committed by Romain Bignon

[lcl] CapDocument implementation in espace e.lcl and pro

parent 89cd15a0
......@@ -109,8 +109,8 @@ class LCLBrowser(LoginBrowser, StatesMixin):
send_sms = URL('/outil/UWBE/Otp/envoiCodeOtp\?telChoisi=MOBILE', '/outil/UWBE/Otp/getValidationCodeOtp\?codeOtp', SmsPage)
recip_recap = URL('/outil/UWBE/Creation/executeCreation', RecipRecapPage)
documents = URL('/outil/UWDM/ConsultationDocument/derniersReleves',
'/outil/UWDM/Recherche/afficherPlus',
'/outil/UWDM/Recherche/rechercherAll', DocumentsPage)
documents_plus = URL('/outil/UWDM/Recherche/afficherPlus', DocumentsPage)
profile = URL('/outil/UWIP/Accueil/rafraichir', ProfilePage)
......@@ -516,7 +516,7 @@ class LCLBrowser(LoginBrowser, StatesMixin):
def iter_documents(self, subscription):
documents = []
self.documents.go()
self.location('https://particuliers.secure.lcl.fr/outil/UWDM/Recherche/afficherPlus')
self.documents_plus.go()
self.page.do_search_request()
for document in self.page.get_list():
documents.append(document)
......
......@@ -149,7 +149,7 @@ class LCLModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact,
old = old.encode('latin-1', errors='replace').decode('latin-1')
return super(LCLModule, self).transfer_check_label(old, new)
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def iter_contacts(self):
return self.browser.get_advisor()
......@@ -162,30 +162,30 @@ class LCLModule(Module, CapBankWealth, CapBankTransferAddRecipient, CapContact,
return profile
raise NotImplementedError()
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def get_document(self, _id):
return find_object(self.iter_documents(None), id=_id, error=DocumentNotFound)
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def get_subscription(self, _id):
return find_object(self.iter_subscription(), id=_id, error=SubscriptionNotFound)
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def iter_bills(self, subscription):
return self.iter_documents(None)
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def iter_documents(self, subscription):
if not isinstance(subscription, Subscription):
subscription = self.get_subscription(subscription)
return self.browser.iter_documents(subscription)
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def iter_subscription(self):
return self.browser.iter_subscriptions()
@only_for_websites('par')
@only_for_websites('par', 'elcl', 'pro')
def download_document(self, document):
if not isinstance(document, Document):
document = self.get_document(document)
......
......@@ -1109,6 +1109,8 @@ class DocumentsPage(LoggedPage, HTMLPage):
head_xpath = '//table[@class="dematTab"]/thead/tr/th'
item_xpath = u'//table[@class="dematTab"]/tbody/tr[./td[@class="dematTab-firstCell"]]'
ignore_duplicate = True
col_label = 'Nature de document'
col_id = 'Type de document'
col_url = 'Visualiser'
......
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