<commit_before>require File.dirname(__FILE__) + '/spec_helper'
  
describe "Using Form Builder to manipulte core-data fields" do
  
  it "should create a form using core data fields" do
    @browser.open "/nedss/"
    @browser.click "link=Forms"
    @browser.wait_for_page_to_load "30000"

    unless @browser.is_text_present "Core Data Form"
      @browser.click "link=New form"
      @browser.wait_for_page_to_load "30000"
      @browser.type "form_name", "Core Data Form"
      @browser.select "form_disease_id", "label=Amebiasis"
      @browser.click "form_submit"
      @browser.wait_for_page_to_load "30000"

      @browser.click "link=Form Builder"
      @browser.wait_for_page_to_load "30000"

      @browser.click "link=Add a core data element"<commit_msg>Updated form_builder_core_data UAT test to account for sections.<commit_after>require File.dirname(__FILE__) + '/spec_helper'
  
describe "Using Form Builder to manipulte core-data fields" do
  
  it "should create a form using core data fields" do
    @browser.open "/nedss/"
    @browser.click "link=Forms"
    @browser.wait_for_page_to_load "30000"

    unless @browser.is_text_present "Core Data Form"
      @browser.click "link=New form"
      @browser.wait_for_page_to_load "30000"
      @browser.type "form_name", "Core Data Form"
      @browser.select "form_disease_id", "label=Amebiasis"
      @browser.click "form_submit"
      @browser.wait_for_page_to_load "30000"

      @browser.click "link=Form Builder"
      @browser.wait_for_page_to_load "30000"

      @browser.click "link=Add a section"
      wait_for_element_present("new-section-form")
      @browser.type "section_element_name", "Section 1"
      @browser.click "section_element_submit"
      wait_for_element_not_present("new-section-form")

      @browser.click "link=Add a core data element"
{'fraction_non_alphanumeric': 0.10316593886462883, 'fraction_numerical': 0.02237991266375546, 'mean_word_length': 3.836411609498681, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '831731', 'n_tokens_mistral': 632, 'n_tokens_neox': 595, 'n_words': 140}