Commit 58e77d90 authored by Damien Ramelet's avatar Damien Ramelet Committed by Vincent A

[creditmutuel] Skipping authority management page

parent 70e6b91b
......@@ -61,6 +61,7 @@
OtpValidationPage, OtpBlockedErrorPage, TwoFAUnabledPage,
LoansOperationsPage, OutagePage, PorInvestmentsPage, PorHistoryPage, PorHistoryDetailsPage,
PorMarketOrdersPage, PorMarketOrderDetailsPage, SafeTransPage, PhoneNumberConfirmationPage,
AuthorityManagementPage,
)
......@@ -210,6 +211,7 @@ class CreditMutuelBrowser(TwoFactorBrowser):
phone_number_confirmation_page = URL(
r'/(?P<subbank>.*)fr/client/paci_engine/information-client.html', PhoneNumberConfirmationPage
)
authority_management = URL(r'/(?P<subbank>.*)fr/banque/migr_gestion_pouvoirs.html', AuthorityManagementPage)
currentSubBank = None
is_new_website = None
......@@ -452,6 +454,9 @@ def init_login(self):
self.page.skip_confirmation()
self.logger.debug("Skipping phone confirmation")
if self.authority_management.is_here():
self.page.skip_authority_management()
if not self.page.logged:
# 302 redirect to catch to know if polling
if self.login.is_here():
......
......@@ -78,6 +78,22 @@ class UselessPage(LoggedPage, HTMLPage):
pass
class AuthorityManagementPage(HTMLPage):
"""This page is about authority management
'Votre contrat de Banque à distance évolue et vous permet désormais de gérer électroniquement les pouvoirs bancaires de vos mandataires,
quel que soit le canal qu'ils utilisent (internet, agence, ...).'
There's a later button, so skipping it.
"""
def skip_authority_management(self):
form = self.get_form(xpath='//form[@id="C:P:F"]')
name = '_FID_DoYes' # Name attribute of the input element that represent the part "Yes, i want to report my consent"
data = {name: form[name]}
form.submit(data=data)
class RedirectPage(LoggedPage, HTMLPage):
def on_load(self):
super(RedirectPage, self).on_load()
......@@ -2845,4 +2861,3 @@ def is_here(self):
def skip_confirmation(self):
link = Link('//a[@class="ei_btn ei_btn_typ_quit"]')(self.doc)
self.browser.location(link)
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