<commit_before>Feature: sf scenarios

  Background: Clean application state
    Given clean SF, removes all leads with email: "<EMAIL>"
	And remove all records from DB
    And create SF connection

  @integrations-sf-db
  Scenario: SF action on create - DB integration
    And create SF "create" action step on field: "Lead"
    And create mapper step using template: "sf-create-db"
    And create finish DB invoke stored procedure "add_lead" action step
    When create integration with name: "SF create to DB rest test"
    Then wait for integration with name: "SF create to DB rest test" to become active
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    Then validate DB created new lead with first name: "John", last name: "Doe", email: "<EMAIL>"

  @integrations-sf-db
  Scenario: SF action on delete - DB integration
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    And create SF "delete" action step on field: "Lead"
    And create mapper step using template: "sf-delete-db"
    And create finish DB invoke sql action step with query "INSERT INTO TODO(task) VALUES(:#todo)"
    When create integration with name: "SF delete to DB rest test"
    Then wait for integration with name: "SF delete to DB rest test" to become active
    Then delete lead from SF with email: "<EMAIL>"
    Then validate SF on delete to DB created new task with lead ID as task name

  @integrations-sf-db
  Scenario: SF action on update - DB integration
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    And create SF "update" action step on field: "Lead"
    And create mapper step using template: "sf-update-db"
    And create finish DB invoke sql action step with query "INSERT INTO TODO(task) VALUES(:#todo)"
    When create integration with name: "SF update to DB rest test"
    Then wait for integration with name: "SF update to DB rest test" to become active
    Then update SF lead with email "<EMAIL>" to first name: "Joe", last name "Carrot", email "<EMAIL>", company name "EMCA"
    Then validate DB created new lead with first name: "Joe", last name: "Carrot", email: "<EMAIL>"<commit_msg>[fix] quick fix to facilitate deleting of updated lead on SF<commit_after>Feature: sf scenarios

  Background: Clean application state
    Given clean SF, removes all leads with email: "<EMAIL>"
	And remove all records from DB
    And create SF connection

  @integrations-sf-db
  Scenario: SF action on create - DB integration
    And create SF "create" action step on field: "Lead"
    And create mapper step using template: "sf-create-db"
    And create finish DB invoke stored procedure "add_lead" action step
    When create integration with name: "SF create to DB rest test"
    Then wait for integration with name: "SF create to DB rest test" to become active
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    Then validate DB created new lead with first name: "John", last name: "Doe", email: "<EMAIL>"

  @integrations-sf-db
  Scenario: SF action on delete - DB integration
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    And create SF "delete" action step on field: "Lead"
    And create mapper step using template: "sf-delete-db"
    And create finish DB invoke sql action step with query "INSERT INTO TODO(task) VALUES(:#todo)"
    When create integration with name: "SF delete to DB rest test"
    Then wait for integration with name: "SF delete to DB rest test" to become active
    Then delete lead from SF with email: "<EMAIL>"
    Then validate SF on delete to DB created new task with lead ID as task name

  @integrations-sf-db
  Scenario: SF action on update - DB integration
    Then create SF lead with first name: "John", last name: "Doe", email: "<EMAIL>" and company: "ACME"
    And create SF "update" action step on field: "Lead"
    And create mapper step using template: "sf-update-db"
    And create finish DB invoke sql action step with query "INSERT INTO TODO(task) VALUES(:#todo)"
    When create integration with name: "SF update to DB rest test"
    Then wait for integration with name: "SF update to DB rest test" to become active
    Then update SF lead with email "<EMAIL>" to first name: "Joe", last name "Carrot", email "<EMAIL>", company name "EMCA"
    Then validate DB created new lead with first name: "Joe", last name: "Carrot", email: "<EMAIL>"
{'fraction_non_alphanumeric': 0.08320560543026057, 'fraction_numerical': 0.0, 'mean_word_length': 3.7932843651626444, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '374356', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1227, 'n_words': 679}