예제 #1
0
def create_lead(config):
    data = json.loads(utils.get_api_test_data(config, "create_lead"))
    data["person"][
        "firstName"] = data["person"]["firstName"] + fakedata.rand_text()
    data["person"][
        "lastName"] = data["person"]["lastName"] + fakedata.rand_text()
    result = config.post("/v2/leads", "crm", data=json.dumps(data))
    assert result.status_code == 201, \
        f"Expected response code is 201. Actual response code is {result.status_code} {result.text}"
    return result.json()
예제 #2
0
def create_model_portfolio(config):
    data = json.loads(
        utils.get_api_test_data(config, "create_basic_imps_model"))
    data["code"] = data["code"] + fakedata.rand_text()
    data[
        "name"] = "Automation Rebalance Test iMPS Model " + fakedata.rand_text(
        )
    config.access_token = config.get_app_tcc_token("imps_app")
    app_id = utils.get_app_by_type(config, "imps_app")["app_id"]
    result = config.post(f"/v2/apps/{app_id}/models",
                         "imps",
                         data=json.dumps(data))
    assert result.status_code == 201, \
        f"Expected response code is 201. Actual response code is {result.status_code} {result.text}"
    config.access_token = None
    return result.json()
예제 #3
0
 def add_wrap_report_notes(self):
     self.config.plan_report_note = rand_text()
     BasePlanPage(self.config).click_summary()
     WrapPlanSummaryPage(self.config).fill_in_report_notes(self.config.plan_report_note)\
         .click_save()\
         .wait_until_please_wait_spinner_present()
     return self
예제 #4
0
def create_secure_message(config):
    config.get_access_token_for_resource_owner_flow()
    data = json.loads(utils.get_api_test_data(config, "create_secure_message"))
    data["subject"] = fakedata.rand_text(5)
    result = config.post("/v1/messages", "securemessaging", data=json.dumps(data))
    assert result.status_code == 201, \
        f"Expected response code is 201. Actual response code is {result.status_code} {result.text}"
    return result.json()
예제 #5
0
 def run_month_end(self):
     self.config.month_end_description = fakedata.rand_text(6)
     PaymentRunsPage(self.config).click_close_month_end()\
         .fill_in_description_text_box(self.config.month_end_description)\
         .click_start_button()\
         .click_confirm_button()\
         .close_io_dialog()
     return self
예제 #6
0
def create_workflow_category(config):
    config.get_access_token_using_internal_credentials()
    data = json.loads(utils.get_api_test_data(config, "create_workflow_category"))
    data["name"] = data["name"] + rand_text()
    result = config.post(f"/v1/templatecategories", "workflow", data=json.dumps(data))
    assert result.status_code == 201, \
        f"Expected response code is 201. Actual response code is {result.status_code} {result.text}"
    return result.json()
예제 #7
0
def create_corporate_client(config):
    data = json.loads(
        utils.get_api_test_data(config, "create_corporate_client"))
    data["corporate"]["name"] = data["corporate"]["name"] + fakedata.rand_text(
    )
    result = config.post("/v2/clients", "crm", data=json.dumps(data))
    assert result.status_code == 201, \
        f"Expected response code is 201. Actual response code is {result.status_code} {result.text}"
    return result.json()
예제 #8
0
 def add_new_workflow_template_related_to(self, related_to):
     add_temp_data(
         self.config, "workflow_template", {
             "name":
             get_common_data(self.config)["test_data"]["workflow_data"]
             ["template_name"] + rand_text()
         })
     self.dialog.fill_in_template_name(get_temp_data(self.config, "workflow_template")["name"]) \
         .select_related_to(related_to) \
         .select_category(get_temp_data(self.config, "workflow_category")["name"])
     return self
 def add_task_note(self):
     self.page.hover_over_task_actions().click_add_a_task_note()
     task_note = fakedata.rand_text()
     add_temp_data(self.config, "task",
                   {"notes": [{
                       "notes": task_note
                   }]})
     AddNotesDialog(self.page).fill_in_note_details(
         task_note).click_save().close_dialog()
     self.page.wait_until_please_wait_spinner_present()
     return self
예제 #10
0
 def create_category(self):
     category_name = get_common_data(
         self.config
     )["test_data"]["workflow_data"]["category_name"] + rand_text()
     add_temp_data(self.config, "workflow_category",
                   {"name": category_name})
     TemplateCategoriesPage(self.config) \
         .fill_in_category_name(category_name) \
         .click_create() \
         .wait_until_please_wait_spinner_present()
     self.save_category_id()
     return self
예제 #11
0
 def send_basic_message(self):
     self.dialog\
         .fill_in_subject(rand_text(10))\
         .fill_in_body(rand_text(10))\
         .click_send()
     return self.journey
예제 #12
0
 def create_binder(self):
     self.config.binder = rand_text(5)
     self.page.fill_in_description(self.config.binder)\
         .click_create()\
         .wait_until_please_wait_spinner_present()
     return self
예제 #13
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