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"
Esempio n. 2
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_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
Esempio n. 4
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
Esempio n. 5
0
 def add_basic_personal_details(self):
     data = utils.get_common_data(
         self.config)["test_data"]["gff_client_data"]
     title_and_gender = self.wizard.title_and_gender_stage()
     title_and_gender \
         .click_title_option(data["Title"]) \
         .click_gender_option(data["Gender"])
     date_of_birth = self.wizard.date_of_birth_stage()
     date_of_birth.goto_stage()
     date_of_birth.fill_in_date_of_birth_fields()
     place_of_birth = self.wizard.place_of_birth_stage()
     place_of_birth.goto_stage()
     place_of_birth.fill_in_place_of_birth(data["PLACE_OF_BIRTH"])
     nationality = self.wizard.nationality_stage()
     nationality.goto_stage()
     nationality \
         .delete_nationality() \
         .fill_in_nationality_field(data["NATIONALITY"])
     residence = self.wizard.residence_stage()
     residence.goto_stage()
     residence.click_residence_option(data["RESIDENCE"])
     health = self.wizard.health_stage()
     health.goto_stage()
     health \
         .click_are_in_good_health_option(data["HEALTH_STATUS"]) \
         .click_have_you_smoked_option(data["SMOKE_STATUS"])
     will = self.wizard.will_stage()
     will.goto_stage()
     will.click_will_status_option(data["WILL_STATUS"])
     photo = self.wizard.photo_stage()
     photo.goto_stage()
     self.wizard.click_next_button()
     review = self.wizard.review_stage()
     review.click_save_and_close_button()
     return FactFind._YouAndYourFamily(self.journey)
 def add_employee_relationship(self):
     client = utils.get_common_data(self.config)["clients"]["default"]
     self.select_person_contact_type()\
         .fill_in_client_name(client["firstname"], client["lastname"])\
         .select_client()\
         .select_relationship()
     return self
Esempio n. 7
0
 def search_open_gff_client(self):
     SearchClient(self.config).quick_search_client(
         utils.get_common_data(
             self.config)["test_data"]["gff_client_data"]["fullname"])
     utils.update_temp_data(self.config, "client", 0, "id",
                            BaseClientPage(self.config).get_client_id())
     return self
Esempio n. 8
0
 def convert_lead_to_client(self):
     data = get_common_data(self.config)["test_data"]["lead_data"]
     self.dialog.select_status(data["STATUS"])
     self.dialog.wait_until_please_wait_spinner_present()
     self.dialog.click_save_button()
     self.dialog.close_io_dialog()
     return self.journey
Esempio n. 9
0
    def update_date_of_birth(self):
        data = utils.get_common_data(
            self.config)["test_data"]["gff_client_data"]
        ProfileStage.Personal(self.config).fill_in_date_of_birth\
            ('/'.join([data["UPDATED_DOB_DATE"], data["UPDATED_DOB_MONTH"], data["UPDATED_DOB_YEAR"]]))\
            .click_save_button()

        return self
Esempio n. 10
0
 def verify_dependants_data_syncronized(self):
     data = utils.get_common_data(
         self.config)["test_data"]["gff_client_data"]
     relationship_fullname = get_temp_data(self.config, "dependant_name")
     dependants = ProfileStage.Dependants(self.config)
     assert dependants.get_full_name_value(
     ) == relationship_fullname, "Full Name was not saved successfully"
     assert dependants.get_relationship_value() == data["RELATIONSHIP_TYPE"]
 def verify_imported_statement_synced(self):
     assert ElectronicImportsPage(self.config).get_import_amount_value() == \
            utils.get_common_data(self.config)["test_data"]["provider_statement_data"][
                "import_amount"], "Import not successfull"
     assert ElectronicImportsPage(self.config).get_import_date_value() == datetime.datetime.today().strftime(
         '%d/%m/%Y'), \
         "Import not successfull"
     return self
Esempio n. 12
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
 def search_for_live_statement(self):
     data = utils.get_common_data(self.config)["test_data"]["provider_statement_data"]
     StatementSearchPage(self.config) \
         .select_statement_search_type(data["provider_statement_advanced_search"]) \
         .click_clear() \
         .fill_in_low_state_amount(data["live_statement_amount"]) \
         .click_search()
     return self
Esempio n. 14
0
 def verify_lead_task_added(self):
     data = get_common_data(self.config)["test_data"]["lead_data"]
     assert LeadTasksPage(self.config).get_task_category(
     ) == data["task_category"], "Task Category not matching"
     assert LeadTasksPage(self.config).get_task_type(
     ) == data["task_type"], "Task Type not matching"
     assert LeadTasksPage(self.config).get_task_notes(
     ) == self.config.task_notes, "Task Notes not matching"
 def fill_needs_question_form(self):
     needs_questions = AddNeedsQuestionDialog(self.needs_questions)
     data = utils.get_common_data(
         self.config)["test_data"]["needs_questions_setup_details"]
     needs_questions.page.fill_in_form(data, needs_questions)
     needs_questions.click_group_in_profile_checkbox()
     needs_questions.click_save_button()
     return self.journey
 def add_relationship_to_lead(self):
     client = utils.get_common_data(self.config)["clients"]["default"]
     self.wizard.select_type_stage() \
         .select_radio_button_person()
     self.wizard.search_contact_stage() \
         .goto_stage() \
         .fill_in_firstname(client["firstname"]) \
         .fill_in_lastname(client["lastname"])
     self.wizard.select_contact_stage() \
         .goto_stage() \
         .select_contact_radio_button()
     self.wizard.finish_stage() \
         .goto_stage() \
         .select_relationship(utils.get_common_data(self.config)["test_data"]["add_relationship_data"]["spouse"])
     self.wizard.finish_stage() \
         .goto_stage() \
         .click_complete_button()
     return self.journey
 def add_plan_and_plan_fee(self):
     data = utils.get_common_data(self.config)["test_data"]["change_plan_status_data"]
     SearchClient(self.config).open_client_by_url() \
         .using_add_plan_wizard() \
         .add_mortgage_plan_with_basic_details()\
         .finish() \
         .open_change_plan_status_dialog() \
         .change_plan_status_to(data["submitted_to_provider"]) \
         .open_change_plan_status_dialog() \
         .change_plan_status_to(data["inforce"]) \
         .open_add_fee_from_plan_action() \
         .add_initial_fee_with_basic_details(
         utils.get_common_data(self.config)["test_data"]["fee_data"]["payment_type_by_provider"])
     BasePlanPage(self.config).click_open_first_plan_fee()
     Fee(self.config).save_fee_details() \
         .open_change_fee_status_dialog() \
         .change_fee_status_to(data["due"])
     return self
Esempio n. 18
0
 def add_lead_task(self):
     data = get_common_data(self.config)["test_data"]["lead_data"]
     self.config.task_notes = utils.fakedata.rand_text(5)
     self.dialog.select_task_category(data["task_category"]) \
         .wait_until_please_wait_spinner_present() \
         .select_task_type(data["task_type"]) \
         .fill_in_notes(self.config.task_notes) \
         .click_save_task()
     return self.journey
 def search_statement(self):
     data = utils.get_common_data(self.config)["test_data"]
     StatementSearchPage(self.config) \
         .select_statement_search_type(data["provider_statement_data"]["provider_statement_advanced_search"]) \
         .click_clear() \
         .fill_in_high_state_amount(data["fee_data"]["fee_amount"])\
         .select_matched(data["provider_statement_data"]["not_matched"])\
         .click_search()
     return self
Esempio n. 20
0
 def fill_in_date_of_birth_fields(self):
     data = utils.get_common_data(
         self.config)["test_data"]["gff_client_data"]
     self.page.clear_and_fill_in_field(self.Locators.DATE_FIELD,
                                       data["DOB_DATE"])
     self.page.clear_and_fill_in_field(self.Locators.MONTH_FIELD,
                                       data["DOB_MONTH"])
     self.page.clear_and_fill_in_field(self.Locators.YEAR_FIELD,
                                       data["DOB_YEAR"])
     return self
Esempio n. 21
0
 def match_fee_provider_statement(self):
     data = utils.get_common_data(self.config)["test_data"]["provider_statement_data"]
     self.dialog.select_provider_statement_match_search_type(data["provider_statement_match_search"])\
         .fill_high_amount(data["amount"])\
         .click_search() \
         .wait_search_results_appear() \
         .select_first_search_result_record() \
         .click_match()\
         .close_io_dialog()
     return self.journey
Esempio n. 22
0
 def verify_personal_data_was_updated(self):
     data = utils.get_common_data(
         self.config)["test_data"]["gff_client_data"]
     review = self.wizard.click_review_button()
     assert review.get_middle_name_value(
     ) == data["MIDDLE_NAME"], "Middle Name was not updated"
     assert review.get_marital_status_value(
     ) == data["MARITAL_STATUS"], "Marital status was not updated"
     review.click_save_and_close_button()
     return self
Esempio n. 23
0
 def search_for_user(self):
     dialog = self.dialog.open_user_search_dialog()
     data = utils.get_common_data(self.config)["advisers"]
     usersearch = UserSearchDialog(self.dialog, dialog.FRAME,
                                   "id_Party_Id").click_clear_button()
     time.sleep(5)
     usersearch.fill_in_user_firstname_field(data["delegation_user"]["first_name"])\
         .fill_in_user_lastname_field(data["delegation_user"]["last_name"])\
         .click_search()\
         .click_first_result()
     return self
Esempio n. 24
0
 def verify_employment_data_synchronized(self):
     actual_employment_data = utils.get_str_list_from_list_of_webelements(
         EmploymentStage(
             self.config).get_employment_rows_string())[0].split(' ')
     expected_employment_data = list(
         utils.get_common_data(
             self.config)["test_data"]["gff_employment_data"].values())
     assert all(item in actual_employment_data
                for item in expected_employment_data
                ), "Employment record not synced successfully"
     return self
 def add_provider_to_statement(self):
     data = utils.get_common_data(self.config)["test_data"]["fee_data"]
     ElectronicImportsPage(self.config) \
         .click_edit_button()
     StatementSearchPage(self.config) \
         .open_provider_search_dialog() \
         .select(data["plan_fee_provider"]) \
         .click_ok()
     ElectronicImportsPage(self.config).click_update_button() \
         .wait_until_please_wait_spinner_present()
     return self
 def send_unique_file(self, file_name):
     self.config.unique_file_url = utils.get_test_documents_file_url(
         file_name)
     os.renames(
         utils.get_test_documents_file_url(
             utils.get_common_data(self.config)["test_data"]
             ["provider_statement_data"][self.config.file_name]),
         self.config.unique_file_url)
     utils.send_file_to_element(self, self.Locators.BROWSE_BUTTON_INPUT_ID,
                                self.config.unique_file_url)
     return self
Esempio n. 27
0
def test_add_basic_initial_fee(config):
    """ Test Description: Adding a fee to a client.
    Verifying that the data is saved. """
    test = (Fee(config)
            .open_client_by_url()
            .using_add_fee_dialog()
                .add_initial_fee_with_basic_details(get_common_data(config)["test_data"]["fee_data"]["payment_type_cheque"])
            .save_fee_details()
            .verify_if_fee_details_opened()
            .verify_fee_category()
            .verify_fee_charging_type()
            )
 def create_statement(self):
     data = utils.get_common_data(self.config)["test_data"]["fee_data"]
     StatementSearchPage(self.config) \
         .click_clear() \
         .fill_in_amount(data["fee_amount"]) \
         .open_provider_search_dialog() \
         .select(data["plan_fee_provider"]) \
         .click_ok()
     StatementSearchPage(self.config) \
         .click_create() \
         .wait_until_please_wait_spinner_present()
     return self
Esempio n. 29
0
 def get_assureweb_quote(self):
     data = utils.get_common_data(
         self.config)["test_data"]["assureweb_quote"]
     GetQuoteForClientPage(self.config).click_next() \
         .select_product_type(data["PRODUCT_TYPE"]) \
         .fill_in_age_field(data["AGE"]) \
         .fill_in_min_life_amount_field(data["MIN_COVER"]) \
         .click_next() \
         .click_next() \
         .check_all_checkboxes() \
         .click_next() \
         .click_complete()
     utils.switch_to_parent_window(self)
     return self
Esempio n. 30
0
 def add_initial_fee_with_basic_details(self, payment_type):
     data = utils.get_common_data(self.config)["advisers"]
     self.dialog.open_adviser_search_dialog().clear_adviser_firstname_field() \
         .fill_in_adviser_firstname_field(data["default"]["firstname"]) \
         .click_search() \
         .click_first_result() \
         .close_io_dialog()
     self.dialog.select_fee_type(self.data["fee_type"])\
         .select_payment_type(payment_type)\
         .select_fee_charging_type(self.data["fee_charging_type"])\
         .select_net_amount()\
         .select_advice_category(self.data["advice_category"])\
         .fill_in_initial_period(self.data["initial_period"])\
         .click_save()\
         .close_io_dialog()
     return self.journey