def open_plan_and_save_details(self):
     QuotesAppsPage(self.config).open_plan()
     plan_ref = BasePlanSummaryPage(self.config).get_plan_ref()
     utils.add_temp_data(self.config, "plan", {"reference": plan_ref})
     plan_id = BasePlanSummaryPage(self.config).get_plan_id()
     utils.update_temp_data(self.config, "plan", 0, "id", plan_id)
     return self
Exemplo n.º 2
0
 def finish(self):
     self.wizard.click_finish_button()
     plan_id = BasePlanPage(self.config).get_plan_id()
     add_temp_data(self.config, "plan", {"id": plan_id})
     plan_ref = BasePlanPage(self.config).get_plan_ref()
     update_temp_data(self.config, "plan", 0, "reference", plan_ref)
     return self.journey
Exemplo n.º 3
0
 def add_dependant(self):
     data = utils.get_common_data(
         self.config)["test_data"]["gff_client_data"]
     relationship_name = fakedata.rand_firstname(self, "first_name") + \
                         "_" + fakedata.rand_lastname(self, "last_name")
     utils.add_temp_data(self.config, "dependant_name",
                         relationship_name)
     family_members = self.wizard.your_family_member_stage()
     family_members.click_add_family_member()
     relationship = self.wizard.relationship_type_stage()
     relationship.click_relationship_type_option(
         data["RELATIONSHIP_TYPE"])
     name = self.wizard.name_stage()
     name.goto_stage()
     name.fill_in_name_field(
         get_temp_data(self.config, "dependant_name"))
     date_of_birth = self.wizard.date_of_birth_stage()
     date_of_birth.goto_stage()
     living_with_you = self.wizard.living_with_you_stage()
     living_with_you.goto_stage()
     self.wizard.click_next_button()
     review = self.wizard.review_stage()
     review.click_save_and_close_button()
     family_members = self.wizard.your_family_member_stage()
     family_members \
         .click_yes_button() \
         .click_save_and_close_button()
     return self.journey
Exemplo n.º 4
0
 def save_fee_details(self):
     fee_id = BaseFeesPage(self.config).get_fee_id()
     utils.add_temp_data(self.config, "fee", {"id": fee_id})
     fee_ref = BaseFeesPage(self.config).get_fee_ref()
     utils.update_temp_data(self.config, "fee", 0, "sequentialRef", fee_ref)
     fee_total_amount = BaseFeesPage(self.config).get_total_amount()
     utils.update_temp_data(self.config, "fee", 0, "net",
                            {"amount": fee_total_amount})
     return self
Exemplo n.º 5
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
Exemplo n.º 6
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
 def verify_relationship_added(self):
     relationship_id = ViewRelationshipsPage(
         self.config).get_first_relationship_id()
     utils.add_temp_data(self.config, "lead_relationship",
                         {"id": relationship_id})
     data = utils.get_common_data(self.config)["clients"]["default"]
     assert data["firstname"] + " " + data[
         "lastname"] == ViewRelationshipsPage(
             self.config).get_first_relationship_name(
             ), "Incorrect relationship name"
     assert utils.get_common_data(self.config)["test_data"]["add_relationship_data"]["spouse"] == \
         ViewRelationshipsPage(self.config).get_first_relationship(), "Incorrect relationship"
 def verify_corporate_client_relationship(self):
     relationship_id = ClientRelationshipsPage(
         self.config).get_relationship_id()
     utils.add_temp_data(self.config, "client_relationship",
                         {"id": relationship_id})
     client = utils.get_common_data(self.config)["clients"]["default"]
     assert ClientRelationshipsPage(self.config).get_first_employee_name() == client["firstname"] + " " + client["lastname"], \
         "Incorrect Employee Name"
     assert ClientRelationshipsPage(
         self.config).get_first_employee_relationship(
         ) == utils.get_common_data(self.config)["test_data"][
             "add_relationship_data"]["employee"], "Incorrect Relationship"
     return self
Exemplo n.º 9
0
 def save_lead_data(self):
     utils.add_temp_data(
         self.config, "lead", {
             "person": {
                 "firstName":
                 get_common_data(self.config)["test_data"]
                 ["lead_template_csv_data"]["lead_firstname"],
                 "lastName":
                 get_common_data(self.config)["test_data"]
                 ["lead_template_csv_data"]["lead_lastname"]
             }
         })
     return self
Exemplo n.º 10
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
Exemplo n.º 11
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
Exemplo n.º 12
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
 def save_opportunity_ref(self):
     opportunity_ref = OpportunityBasePage(self.config)\
         .get_opportunity_ref()
     utils.add_temp_data(self.config, "opportunity", {"reference": opportunity_ref})
     return self