Пример #1
0
 def verify_uploaded_document(self):
     assert utils.get_temp_data(self.config, "document")["category"] == LeadDocumentsPage(self.config).get_category_text(), \
         "Incorrect document category name"
     assert utils.get_temp_data(self.config, "document")['subcategory'] == LeadDocumentsPage(self.config).get_subcategory_text(), \
         "Incorrect document subcategory name"
     assert datetime.datetime.now().strftime("%d/%m/%Y") in LeadDocumentsPage(self.config).get_created_on_date(), \
         "Incorrect created on date"
Пример #2
0
 def create_fee_cash_receipt(self):
     client = utils.get_temp_data(self.config, "client")
     fee = utils.get_temp_data(self.config, "fee")
     CashReceiptSearchPage(self.config).click_select_category()\
         .select_fee_category()\
         .fill_in_amount(fee["net"]["amount"])\
         .fill_in_description(client["name"])\
         .click_create()
     return self
Пример #3
0
 def verify_recommendation_status_for_clients(self):
     client1_rec = self._get_recommendation_status_for_client(
         utils.get_temp_data(self.config, 'client')["name"])
     assert 'Accepted' in client1_rec and len(client1_rec) == 1, \
         f"Expected status is Accepted. Observed status is {client1_rec}"
     client2_rec = self._get_recommendation_status_for_client(
         utils.get_temp_data(self.config, 'client', 1)["name"])
     assert 'New' in client2_rec and len(client2_rec) == 1, \
         f"Expected status is New. Observed status is {client2_rec}"
     return self
Пример #4
0
 def verify_uploaded_data_synced(self):
     utils.update_temp_data(self.config, "lead", 0, "id",
                            LeadDetailsPage(self.config).get_lead_id())
     assert LeadDetailsPage(
         self.config).get_full_name_value() == utils.get_temp_data(
             self.config,
             "lead")["person"]["firstName"] + " " + utils.get_temp_data(
                 self.config,
                 "lead")["person"]["lastName"], "Lead not found"
     return self
Пример #5
0
 def upload_pdf_document(self):
     utils.add_temp_data(self.config, "document", {"category": utils.get_common_data(
         self.config)["test_data"]["document_data"]["document_category"]})
     utils.update_temp_data(self.config, "document", 0, "subcategory", utils.get_common_data(
         self.config)["test_data"]["document_data"]["document_subcategory"])
     self.dialog \
         .click_file_type() \
         .select_document_category(utils.get_temp_data(self.config, "document")["category"]) \
         .select_document_subcategory(utils.get_temp_data(self.config, "document")['subcategory']) \
         .send_file_url() \
         .click_upload_button()
     return self.journey
Пример #6
0
 def start_rebalance_communication(self):
     rebalance_recommendation_commentary = "Rebalance Recommendation Commentary " + fakedata.rand_text(
     )
     model_update_recommendation_commentary = "Model Update Recommendation Commentary " + fakedata.rand_text(
     )
     no_action_recommendation_commentary = "No Action Recommendation Commentary " + fakedata.rand_text(
     )
     utils.add_temp_data(self.config, "rebalance_recommendation", {
         "rebalance": {
             "commentary": rebalance_recommendation_commentary
         }
     })
     utils.add_temp_data(
         self.config, "rebalance_recommendation", {
             "rebalance": {
                 "commentary": model_update_recommendation_commentary
             }
         })
     utils.add_temp_data(self.config, "rebalance_recommendation", {
         "rebalance": {
             "commentary": no_action_recommendation_commentary
         }
     })
     self.dialog.fill_in_rebalance_recommendation_commentary(rebalance_recommendation_commentary)\
         .fill_in_model_update_recommendation_commentary(model_update_recommendation_commentary)\
         .fill_in_no_action_recommendation_commentary(no_action_recommendation_commentary)
     utils.execute_click_for_all_webelements(
         self.dialog.get_models_that_apply_checkbox_elements())
     self.dialog.click_model_that_apply(utils.get_temp_data(self.config, "imps_model")["name"])\
         .click_proceed()\
         .close_io_dialog()
     return self.journey
Пример #7
0
 def assert_lead_exists(self):
     leaddetails = LeadDetailsPage(self.config)
     assert leaddetails.is_title_matches(
     ), "Title does not match the lead details page"
     assert leaddetails.get_lead_bar_info() == \
            utils.get_temp_data(self.config, "lead")["person"]["firstName"] + ' ' + utils.get_temp_data(self.config, "lead")["person"]["lastName"], "Lead name not matching"
     return self
 def verify_client_not_present_in_result(self):
     client = get_temp_data(self.config, "client")
     clientsearch = ClientSearch.ClientQuickSearchResult(self.config)
     assert not is_string_present(clientsearch.get_client_search_result(), client["person"]["firstName"]), \
         "User is present in the list."
     assert not is_string_present(clientsearch.get_client_search_result(), client["person"]["lastName"]), \
         "User is present in the list."
     return self
 def search_for_client(self):
     client = get_temp_data(self.config, "client")
     ClientSearch(self.config)\
         .click_clear_button()\
         .fill_in_firstname(client["person"]["firstName"])\
         .fill_in_lastname(client["person"]["lastName"])\
         .click_go_button()
     return self
Пример #10
0
 def add_mortgage_plan_details(self):
     data = get_common_data(
         self.config)["test_data"]["mortgage_plan_data"]
     second_client = get_temp_data(self.config, "client", 1)
     self.wizard.mortgage_plan_stage().select_second_owner(second_client["name"])\
         .fill_in_price_valuation(data["price_valuation"])\
         .fill_in_deposit_equity(data["deposit_equity"])
     return self
Пример #11
0
 def search_and_open_lead(self):
     lead = utils.get_temp_data(self.config, "lead")
     LeadSearchPage(self.config).clear_first_name()\
         .clear_last_name()\
         .fill_in_first_name(lead["person"]["firstName"])\
         .fill_in_last_name(lead["person"]["lastName"])\
         .select_lead_status_by_text("Initial")\
         .click_search_button()\
         .click_open()
     return self
Пример #12
0
 def add_switch_recommendation_details(self):
     rec_name = fakedata.rand_intsuffix(
         'Automation Test Recommendation ')
     utils.add_temp_data(self.config, "recommendation",
                         {"name": rec_name})
     self.dialog.wait_until_please_wait_spinner_present()\
         .fill_in_recommendation_name(rec_name)\
         .select_existing_plan(str(utils.get_temp_data(self.config, "plan")["id"]))\
         .wait_until_please_wait_spinner_present()
     return self
Пример #13
0
 def match_fee(self):
     fee = utils.get_temp_data(self.config, "fee")
     self.dialog.click_clear()\
         .fill_in_io_ref(fee["sequentialRef"])\
         .click_search()\
         .wait_search_results_appear()\
         .select_first_search_result_record()\
         .click_match()\
         .close_io_dialog()
     return self.journey
Пример #14
0
 def using_planning_opportunities(self):
     BaseClientPage(self.config)\
         .level3_menu()\
         .click_advice()
     ViewPlanningOpportunitiesPage(self.config)\
         .fill_in_sequential_ref(utils.get_temp_data(self.config, "opportunity")["reference"])\
         .click_filter()\
         .wait_until_please_wait_spinner_present()\
         .click_first_enter_planning_button()\
         .wait_until_please_wait_spinner_present()
     return PlanningOpportunities._AdvicePlanning(self)
Пример #15
0
 def add_basic_lead_details(self):
     utils.add_temp_data(
         self.config, "lead", {
             "person": {
                 "firstName": fakedata.rand_firstname(
                     self, "first_name"),
                 "lastName": fakedata.rand_lastname(self, "last_name")
             }
         })
     basic_details = self.wizard.basic_details_stage()
     basic_details.goto_stage()
     basic_details.page.fill_in_form(
         utils.get_common_data(
             self.config)["test_data"]["add_basic_lead_details"],
         basic_details)
     basic_details.fill_in_first_name_field(
         utils.get_temp_data(self.config,
                             "lead")["person"]["firstName"])
     basic_details.fill_in_last_name_field(
         utils.get_temp_data(self.config, "lead")["person"]["lastName"])
     return self
Пример #16
0
 def verify_existing_and_new_funds_present(self):
     current_fund_names_list = utils.get_str_list_from_list_of_webelements(
         self.dialog.get_funds_names())
     expected_fund_list = json.loads(
         utils.get_api_test_data(
             self.config, "create_basic_imps_model"))["funds"]
     expected_fund_list.append(
         utils.get_temp_data(self.config, "fund_holding")["fund"])
     expected_fund_names_list = [
         fund["name"] for fund in expected_fund_list
     ]
     assert set(current_fund_names_list) == set(expected_fund_names_list), \
         f"Expected funds are {expected_fund_names_list}. Observed funds are {current_fund_names_list}"
     return self
 def allocate_statement(self):
     data =utils.get_common_data(self.config)["test_data"]["provider_statement_data"]
     client = utils.get_temp_data(self.config, "client")
     StatementSearchPage(self.config) \
         .click_open() \
         .select_fee_type(data["int_fee"]) \
         .fill_in_client_name(client["name"]) \
         .fill_in_fee_amount(data["amount"]) \
         .click_create()\
         .wait_until_please_wait_spinner_present()\
         .click_save()\
         .click_allocate()\
         .click_clear()\
         .fill_in_first_name(client["person"]["firstName"]) \
         .click_search() \
         .select_first_line_item() \
         .click_allocate() \
         .select_first_link_to_fee() \
         .click_allocate_to_fee() \
         .wait_until_please_wait_spinner_present()
     StatementSearchPage(self.config).click_close()
     return self
Пример #18
0
 def add_current_employment_record(self):
     utils.add_temp_data(
         self.config, "client", {
             "employment_data":
             utils.get_common_data(
                 self.config)["test_data"]["gff_employment_data"]
         })
     data = utils.get_temp_data(self.config,
                                "client")["employment_data"]
     data['occupation'] = data['occupation'] + fakedata.rand_text(5)
     data['employer_name'] = data[
         'employer_name'] + fakedata.rand_text(5)
     self.wizard.click_add_current_employment_record()
     title = self.wizard.employment_title_stage()
     title.goto_stage()
     title.select_job_title(data['status'])
     occupation = self.wizard.occupation_stage()
     occupation.goto_stage()
     occupation.fill_in_occupation(data['occupation'])
     employer = self.wizard.employer_stage()
     employer.goto_stage()
     employer.fill_in_employer_name(data['employer_name'])
     start_date = self.wizard.date_stage()
     start_date.goto_stage()
     start_date.fill_in_start_date(data['start_date'].split('/')[0])\
         .fill_in_start_month(data['start_date'].split('/')[1])\
         .fill_in_start_year(data['start_date'].split('/')[2])
     income = self.wizard.income_stage()
     income.goto_stage()
     overtime = self.wizard.overtime_stage()
     overtime.goto_stage()
     bonus = self.wizard.bonus_stage()
     bonus.goto_stage()
     self.wizard.click_next_button()
     review = self.wizard.review_stage()
     review.click_save_and_close_button()
     return self
Пример #19
0
 def verify_second_owner_name(self):
     second_client = get_temp_data(self.config, "client", 1)
     assert MortgagePlanSummaryPage(self.config).get_second_owner_name() == second_client["name"], \
         "Incorrect Second owner name."
     return self
Пример #20
0
 def verify_message_present_in_sent_messages(self):
     assert self.page.get_message_title() == get_temp_data(
         self.config,
         "secure_message")["subject"], "Subject does not match"
 def open_opportunity(self):
     self.page.click_open(utils.get_temp_data(self.config, "opportunity")["id"])
     return ClientOpportunities._ClientOpportunity(self)
Пример #22
0
 def verify_client_not_present_in_recent_clients(self):
     client = get_temp_data(self.config, "client")
     is_string_present(UserDashboardPage(self.config).get_recent_clients(), client["person"]["firstName"])
     return self
Пример #23
0
 def assert_lead_converted_to_client_exists(self):
     lead = get_temp_data(self.config, "lead")
     clientdashboard = ClientDashboardPage(self.config)
     assert clientdashboard.is_title_matches(), "Title does not match the client dashboard"
     assert clientdashboard.get_client_bar_info() == lead["person"]["firstName"] + ' ' + lead["person"]["lastName"]
Пример #24
0
 def search_cash_receipt(self):
     client = utils.get_temp_data(self.config, "client")
     CashReceiptSearchPage(self.config).click_clear()\
         .fill_in_description_search(client["name"])\
         .click_search().wait_until_please_wait_spinner_present()
     return self