Commit 2143afe6 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Romain Bignon

[caissedepargne] Check transfer functionality in pro space

If we continue the requests, we will send a sms to the customer. We have
to check precociously if the user doesn't have recipient/transfer

Closes: 28047@sibi
parent dcaefd0c
......@@ -672,6 +672,13 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
if origin_account.type == Account.TYPE_LOAN:
return []
if 'pro' in self.url:
# If transfer is not yet allowed, the next step will send a sms to the customer to validate it
if not
return []
# Transfer unavailable
......@@ -739,6 +739,16 @@ class IndexPage(LoggedPage, HTMLPage):
form['__EVENTARGUMENT'] ='Ajax", "(.*)", true', link).group(1)
def go_pro_transfer_availability(self):
form = self.get_form(id='main')
form['__EVENTTARGET'] = 'Menu_AJAX'
form['m_ScriptManager'] = 'm_ScriptManager|Menu_AJAX'
def is_transfer_allowed(self):
return not self.doc.xpath('//ul/li[contains(text(), "Aucun compte tiers n\'est disponible")]')
class ConsLoanPage(JsonPage):
def get_conso(self):
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