<commit_before>require File.dirname(__FILE__) + '/spec_helper'

describe 'Sytem functionality for setting the record ID of a CMR' do

  it 'should create two CMRs in a row with sequential record numbers that start with the current year' do
    @browser.open "/nedss/cmrs"
    @browser.click('link=New CMR')
    @browser.wait_for_page_to_load('30000')
    @browser.type('event_active_patient__active_primary_entity__person_last_name', 'Record')
    @browser.type('event_active_patient__active_primary_entity__person_first_name', 'Number')
    @browser.type('event_active_patient__active_primary_entity__person_middle_name', 'Test')
    @browser.click('event_submit')
    @browser.wait_for_page_to_load('30000')
    recNum = @browser.get_text('//div[2]/fieldset/table/tbody/tr[1]/td[2]')
    puts "First record ID is " + recNum
    
    @browser.click('link=New CMR')
    @browser.wait_for_page_to_load('30000')
    @browser.type('event_active_patient__active_primary_entity__person_last_name', 'Next')
    @browser.type('event_active_patient__active_primary_entity__person_first_name', 'Record')
    @browser.click('event_submit')
    @browser.wait_for_page_to_load('30000')
    @browser.click('//li[2]/a/em')
    
    nextRecNum = @browser.get_text('//div[2]/fieldset/table/tbody/tr[1]/td[2]')
    puts "Second record ID is " + nextRecNum
    
    ((nextRecNum.to_i - recNum.to_i)==1).should be_true
    (recNum[0,4]==Time.now.year.to_s).should be_true
    (nextRecNum[0,4]==Time.now.year.to_s).should be_true
  end
end<commit_msg>fixing UAT test - removing middle name<commit_after>require File.dirname(__FILE__) + '/spec_helper'

describe 'Sytem functionality for setting the record ID of a CMR' do

  it 'should create two CMRs in a row with sequential record numbers that start with the current year' do
    @browser.open "/nedss/cmrs"
    @browser.click('link=New CMR')
    @browser.wait_for_page_to_load('30000')
    @browser.type('event_active_patient__active_primary_entity__person_last_name', 'Record')
    @browser.type('event_active_patient__active_primary_entity__person_first_name', 'Number')
    @browser.click('event_submit')
    @browser.wait_for_page_to_load('30000')
    recNum = @browser.get_text('//div[2]/fieldset/table/tbody/tr[1]/td[2]')
    puts "First record ID is " + recNum
    
    @browser.click('link=New CMR')
    @browser.wait_for_page_to_load('30000')
    @browser.type('event_active_patient__active_primary_entity__person_last_name', 'Next')
    @browser.type('event_active_patient__active_primary_entity__person_first_name', 'Record')
    @browser.click('event_submit')
    @browser.wait_for_page_to_load('30000')
    @browser.click('//li[2]/a/em')
    
    nextRecNum = @browser.get_text('//div[2]/fieldset/table/tbody/tr[1]/td[2]')
    puts "Second record ID is " + nextRecNum
    
    ((nextRecNum.to_i - recNum.to_i)==1).should be_true
    (recNum[0,4]==Time.now.year.to_s).should be_true
    (nextRecNum[0,4]==Time.now.year.to_s).should be_true
  end
end
{'fraction_non_alphanumeric': 0.1342685370741483, 'fraction_numerical': 0.02137608550434202, 'mean_word_length': 5.002004008016032, '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': '5525851', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1050, 'n_words': 166}