<commit_before>require 'spec_helper'

describe "loading a different country", :js => true, :vcr => true do
  fixtures :tabs, :sidebar_items, :slides, :output_elements, :output_element_types

  it "should create a new scenario from a preset" do
    visit root_path
    # save_and_open_page
    click_link "Start a new scenario"
    select 'Germany', :from => 'area_code'
    click_button 'Start'

    page.should have_content('Household energy demand')

    settings = page.evaluate_script('App.settings.toJSON()')

    settings['area_code'].should == 'de'
    settings['end_year'].should == 2050

    new_scenario_id = settings['api_session_id']
    remote_scenario = Api::Scenario.find new_scenario_id

    remote_scenario.end_year.should == 2050
    remote_scenario.area_code.should == 'de'
  end
end<commit_msg>Fixed spec following change in Germany's area_code<commit_after>require 'spec_helper'

describe "loading a different country", :js => true, :vcr => true do
  fixtures :tabs, :sidebar_items, :slides, :output_elements, :output_element_types

  it "should create a new scenario from a preset" do
    visit root_path
    # save_and_open_page
    click_link "Start a new scenario"
    select 'Germany (test)', :from => 'area_code'
    click_button 'Start'

    page.should have_content('Household energy demand')

    settings = page.evaluate_script('App.settings.toJSON()')

    settings['area_code'].should == 'de'
    settings['end_year'].should == 2050

    new_scenario_id = settings['api_session_id']
    remote_scenario = Api::Scenario.find new_scenario_id

    remote_scenario.end_year.should == 2050
    remote_scenario.area_code.should == 'de'
  end
end
{'fraction_non_alphanumeric': 0.10825358851674641, 'fraction_numerical': 0.009569377990430622, 'mean_word_length': 4.467320261437909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '1074957', 'n_tokens_mistral': 555, 'n_tokens_neox': 521, 'n_words': 132}