<commit_before>Feature: Test of the steps provided by Iridium

	Scenario: Open App
		# Load the page from the appUrlOverride value
		Given I open the application
		# Load the page from the URL
		And I open the page "https://mcasperson.github.io/iridium/examples/test.html"
		And I set the default wait time between steps to "1" seconds
		And I set the default wait for elements to be available to "3" seconds
		And I set the alias mappings
			| Button ID           | buttonId                |
			| Button ID Output    | Button By ID Clicked    |
			| Button Class        | buttonClass             |
			| Button Class Output | Button By Class Clicked |
			| Button Name         | buttonName              |
			| Button Name Output  | Button By Name Clicked  |
			| Button Value        | buttonValue             |
			| Button Value Output | Button By Value Clicked |
			| Button Text         | Button By Text          |
			| Button Text Output  | Button By Text Clicked  |
			| Non-Existant Field  | thisDoesntExist         |
			| Link Contents       | Test Link               |
			| Text Area 1         | textArea                |
			| Text Area 2         | textArea2               |
			| Text Box css		  | body > div:nth-child(3) > input[type="text"]:nth-child(4) |
			| Text Box xpath	  | /html/body/div[2]/input[4] |
            | Test Value 1        | 100                     |
            | Test Value 2        | 200.15                  |
            | Test Value 3        | 100                     |
            | Test Value 4        | $1,234.50               |
            | Test Value 6        | Test Value              |
            | Event Button        | eventButton             |
            | MouseDown Text      | Button mousedown        |

    Scenario: Test Autoaliasing
      # This is actually the default, but test the step anyway
      Given I enable autoaliasing
      And I enable HAR logging
      And I "mousedown" on the hidden element found by "Event Button"
      Then I verify that the page contains the text "MouseDown Text"

    Scenario: Test missing elements
      And I wait "2" seconds for the element with the ID of "thisdoesntexist" to not be present
      And I wait "2" seconds for the element with the xpath of "/html/body/div[100]/input[1000000]" to not be displayed
      And I wait "2" seconds for the element with the class of "thisdoesntexist" to not be displayed
      And I wait "2" seconds for the element with the css selector of "thisdoesntexist" to not be displayed
      And I wait "2" seconds for the element found by "thisdoesntexist" to not be present
      And I wait "2" seconds for the element found by "thisdoesntexist" to not be displayed

    Scenario: Modify aliased values
      And I modify the alias "Test Value 4" by removing all characters that match the regex "[^0-9.]"
      And I verify that the alias "Test Value 4" is equal to "1234.50"
      And I modify the alias "Test Value 4" by replacing all characters that match the regex "1" with "2"
      And I verify that the alias "Test Value 4" is equal to "2234.50"
      And I modify the alias "Test Value 4" by replacing the first characters that match the regex "2" with "1"
      And I verify that the alias "Test Value 4" is equal to "1234.50"
      And I modify the alias "Test Value 4" by prepending it with "9"
      And I verify that the alias "Test Value 4" is equal to "91234.50"
      And I modify the alias "Test Value 4" by appending it with "0"
      And I verify that the alias "Test Value 4" is equal to "91234.500"
      And I modify the alias "Test Value 4" by replacing all characters that match the regex "(\d+)\.(\d+)" with "$2.$1"
      And I verify that the alias "Test Value 4" is equal to "500.91234"
      And I copy the alias "Test Value 4" to the alias "Test Value 5"
      And I verify that the alias "Test Value 5" is equal to "500.91234"
      And I modify the alias "Test Value 4" by appending it with " "
      And I modify the alias "Test Value 4" by appending it with alias "Test Value 5"
      And I verify that the alias "Test Value 4" is equal to "500.91234 500.91234"
      And I modify the alias "Test Value 4" by prepending it with " "
      And I modify the alias "Test Value 4" by prepending it with alias "Test Value 6"
      And I verify that the alias "Test Value 4" is equal to "Test Value 500.91234 500.91234"


  Scenario: Manual Mouse Events
		And I "mousedown" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mousedown"
		And I "mouseup" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseup"
		And I "mouseover" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseover"
		And I "mouseout" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseout"
		And I "mousemove" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mousemove"
		And I "mouseenter" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseenter"
		And I "mouseleave" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseleave"

	Scenario: Manual Key Events
		And I "keydown" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button keydown"
		And I "keyup" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button keyup"
		And I "keypress" on the hidden element found by "eventButton"<commit_msg>Added a step to allow aliases to be appended or prepended with other aliases<commit_after>Feature: Test of the steps provided by Iridium

	Scenario: Open App
		# Load the page from the appUrlOverride value
		Given I open the application
		# Load the page from the URL
		And I open the page "https://mcasperson.github.io/iridium/examples/test.html"
		And I set the default wait time between steps to "1" seconds
		And I set the default wait for elements to be available to "3" seconds
		And I set the alias mappings
			| Button ID           | buttonId                |
			| Button ID Output    | Button By ID Clicked    |
			| Button Class        | buttonClass             |
			| Button Class Output | Button By Class Clicked |
			| Button Name         | buttonName              |
			| Button Name Output  | Button By Name Clicked  |
			| Button Value        | buttonValue             |
			| Button Value Output | Button By Value Clicked |
			| Button Text         | Button By Text          |
			| Button Text Output  | Button By Text Clicked  |
			| Non-Existant Field  | thisDoesntExist         |
			| Link Contents       | Test Link               |
			| Text Area 1         | textArea                |
			| Text Area 2         | textArea2               |
			| Text Box css		  | body > div:nth-child(3) > input[type="text"]:nth-child(4) |
			| Text Box xpath	  | /html/body/div[2]/input[4] |
            | Test Value 1        | 100                     |
            | Test Value 2        | 200.15                  |
            | Test Value 3        | 100                     |
            | Test Value 4        | $1,234.50               |
            | Test Value 6        | Test Value              |
            | Test Value 7        | Another Value           |
            | Event Button        | eventButton             |
            | MouseDown Text      | Button mousedown        |

    Scenario: Test Autoaliasing
      # This is actually the default, but test the step anyway
      Given I enable autoaliasing
      And I enable HAR logging
      And I "mousedown" on the hidden element found by "Event Button"
      Then I verify that the page contains the text "MouseDown Text"

    Scenario: Test missing elements
      And I wait "2" seconds for the element with the ID of "thisdoesntexist" to not be present
      And I wait "2" seconds for the element with the xpath of "/html/body/div[100]/input[1000000]" to not be displayed
      And I wait "2" seconds for the element with the class of "thisdoesntexist" to not be displayed
      And I wait "2" seconds for the element with the css selector of "thisdoesntexist" to not be displayed
      And I wait "2" seconds for the element found by "thisdoesntexist" to not be present
      And I wait "2" seconds for the element found by "thisdoesntexist" to not be displayed

    Scenario: Modify aliased values
      And I modify the alias "Test Value 4" by removing all characters that match the regex "[^0-9.]"
      And I verify that the alias "Test Value 4" is equal to "1234.50"
      And I modify the alias "Test Value 4" by replacing all characters that match the regex "1" with "2"
      And I verify that the alias "Test Value 4" is equal to "2234.50"
      And I modify the alias "Test Value 4" by replacing the first characters that match the regex "2" with "1"
      And I verify that the alias "Test Value 4" is equal to "1234.50"
      And I modify the alias "Test Value 4" by prepending it with "9"
      And I verify that the alias "Test Value 4" is equal to "91234.50"
      And I modify the alias "Test Value 4" by appending it with "0"
      And I verify that the alias "Test Value 4" is equal to "91234.500"
      And I modify the alias "Test Value 4" by replacing all characters that match the regex "(\d+)\.(\d+)" with "$2.$1"
      And I verify that the alias "Test Value 4" is equal to "500.91234"
      And I copy the alias "Test Value 4" to the alias "Test Value 5"
      And I verify that the alias "Test Value 5" is equal to "500.91234"
      And I modify the alias "Test Value 4" by appending it with " "
      And I modify the alias "Test Value 4" by appending it with alias "Test Value 7"
      And I verify that the alias "Test Value 4" is equal to "500.91234 Another Value"
      And I modify the alias "Test Value 4" by prepending it with " "
      And I modify the alias "Test Value 4" by prepending it with alias "Test Value 6"
      And I verify that the alias "Test Value 4" is equal to "Test Value 500.91234 Another Value"


  Scenario: Manual Mouse Events
		And I "mousedown" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mousedown"
		And I "mouseup" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseup"
		And I "mouseover" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseover"
		And I "mouseout" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseout"
		And I "mousemove" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mousemove"
		And I "mouseenter" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseenter"
		And I "mouseleave" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button mouseleave"

	Scenario: Manual Key Events
		And I "keydown" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button keydown"
		And I "keyup" on the hidden element found by "eventButton"
		Then I verify that the page contains the text "Button keyup"
		And I "keypress" on the hidden element found by "eventButton"
{'fraction_non_alphanumeric': 0.058639562157935886, 'fraction_numerical': 0.026670141603683434, 'mean_word_length': 2.3928676687297377, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '652858', 'n_tokens_mistral': 3428, 'n_tokens_neox': 3052, 'n_words': 1663}