<commit_before>
Feature: Bug Fix Tests
  As programmer
  I want bug-free code
  So that people will get off my ass.

  Scenario: New Items Coverage should not use TinyMCE
    Given I am logged into the admin console
    When I click "Add a new item to your archive"
    # This is to work around the setTimeout described here https://github.com/scholarslab/NeatlineFeatures/blob/ea055c7f4900310ed79c20ea7914f96bd795ac9a/views/admin/coverage.php#L56
    And I wait 30 seconds
    Then I should see "#Elements-38-0-free" in "#element-38"
    But I should not see ".mceEditor" in "#element-38"

  Scenario: "Use HTML" is Unchecked for New Items
    Given I am logged into the admin console
    And I click "Add a new item to your archive"
    Then "Element-38-0-html" should not be checked

  ## This one fails intermittently, and I'm not sure why. I'm commenting this
  ## out until it starts failing either consistently or on someone else.
  # Scenario: "Use HTML" is Checked When Editing Items with it Previously Set
    # Given I am logged into the admin console
    # And I click "Add a new item to your archive"
    # And I enter "Cucumber: 'Use HTML' is Checked When Editing Items" into "Elements-50-0-text"
    # Then I should see "#Elements-38-0-free" in "#element-38"
    # And I enter "hi" into "Elements-38-0-free"
    # And I click "Use HTML" checkbox in "#element-38"
    # And I click on "Add Item"
    # And I click "'Use HTML' is Checked When Editing Items"
    # When I click on "Edit this Item"
    # Then I should see ".mceEditor" in "#element-38"
    # And "Elements-38-0-html" should be checked

  Scenario: Editing buttons should have unique IDs.
    Given I am logged into the admin console
    When I click "Add a new item to your archive"
    And I click "Use Map" checkbox in "#Elements-38-0-widget"
    And I should see "#Elements-38-0-widget div.olMap"
    And I click on "add_element_38"
    And I click "Use Map" checkbox in "#Elements-38-1-widget"
    And I should see "#Elements-38-1-widget div.olMap"
    Then I should see "#Elements-38-0-drag-button"
    And I wait 5 seconds
    And I should see "#Elements-38-1-drag-button"
<commit_msg>Fixed failing scenario by making sure it runs in selenium.<commit_after>
Feature: Bug Fix Tests
  As programmer
  I want bug-free code
  So that people will get off my ass.

  Scenario: New Items Coverage should not use TinyMCE
    Given I am logged into the admin console
    When I click "Add a new item to your archive"
    # This is to work around the setTimeout described here https://github.com/scholarslab/NeatlineFeatures/blob/ea055c7f4900310ed79c20ea7914f96bd795ac9a/views/admin/coverage.php#L56
    And I wait 30 seconds
    Then I should see "#Elements-38-0-free" in "#element-38"
    But I should not see ".mceEditor" in "#element-38"

  Scenario: "Use HTML" is Unchecked for New Items
    Given I am logged into the admin console
    And I click "Add a new item to your archive"
    Then "Element-38-0-html" should not be checked

  ## This one fails intermittently, and I'm not sure why. I'm commenting this
  ## out until it starts failing either consistently or on someone else.
  # Scenario: "Use HTML" is Checked When Editing Items with it Previously Set
    # Given I am logged into the admin console
    # And I click "Add a new item to your archive"
    # And I enter "Cucumber: 'Use HTML' is Checked When Editing Items" into "Elements-50-0-text"
    # Then I should see "#Elements-38-0-free" in "#element-38"
    # And I enter "hi" into "Elements-38-0-free"
    # And I click "Use HTML" checkbox in "#element-38"
    # And I click on "Add Item"
    # And I click "'Use HTML' is Checked When Editing Items"
    # When I click on "Edit this Item"
    # Then I should see ".mceEditor" in "#element-38"
    # And "Elements-38-0-html" should be checked

  @selenium
  Scenario: Editing buttons should have unique IDs.
    Given I am logged into the admin console
    When I click "Add a new item to your archive"
    And I click "Use Map" checkbox in "#Elements-38-0-widget"
    And I should see "#Elements-38-0-widget div.olMap"
    And I click on "add_element_38"
    And I click "Use Map" checkbox in "#Elements-38-1-widget"
    And I should see "#Elements-38-1-widget div.olMap"
    Then I should see "#Elements-38-0-drag-button"
    And I wait 5 seconds
    And I should see "#Elements-38-1-drag-button"

{'fraction_non_alphanumeric': 0.08191126279863481, 'fraction_numerical': 0.03549488054607509, 'mean_word_length': 3.1550094517958414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '196524', 'n_tokens_mistral': 1446, 'n_tokens_neox': 1334, 'n_words': 614}