<commit_before>require 'rails_helper'

RSpec.describe "school creation", :schools, type: :system do

  let(:school_name) { 'Oldfield Park Infants'}
  let!(:admin)  { create(:user, role: 'admin')}

  let!(:ks1_tag) { ActsAsTaggableOn::Tag.create(name: 'KS1') }
  let!(:ks1_tagging) { ActsAsTaggableOn::Tagging.create(tag_id: ks1_tag.id, taggable_type: nil, taggable_id: nil, context: 'key_stages') }

  let!(:calendar_area){ create(:calendar_area, title: 'BANES calendar') }
  let!(:solar_pv_area){ create(:solar_pv_tuos_area, title: 'BANES solar') }
  let!(:weather_underground_area){ create(:weather_underground_area, title: 'BANES weather') }
  let!(:school_group) do
    create(
      :school_group,
      name: 'BANES',
      default_calendar_area: calendar_area,
      default_solar_pv_tuos_area: solar_pv_area,
      default_weather_underground_area: weather_underground_area
    )
  end

  before(:each) do
    sign_in(admin)
    visit root_path
  end

  it 'splits the journey up in to basic details and configuration' do
    within '.navbar' do
      click_on 'New School'
    end

    fill_in 'Name', with: "<NAME>"
    fill_in 'Unique Reference Number', with: '4444244'
    fill_in 'Number of pupils', with: 300
    fill_in 'Floor area in square metres', with: 400<commit_msg>Create template for calendar area for onboarding system test<commit_after>require 'rails_helper'

RSpec.describe "school creation", :schools, type: :system do

  let(:school_name) { 'Oldfield Park Infants'}
  let!(:admin)  { create(:user, role: 'admin')}

  let!(:ks1_tag) { ActsAsTaggableOn::Tag.create(name: 'KS1') }
  let!(:ks1_tagging) { ActsAsTaggableOn::Tagging.create(tag_id: ks1_tag.id, taggable_type: nil, taggable_id: nil, context: 'key_stages') }

  let!(:calendar_area){ create(:calendar_area, title: 'BANES calendar') }
  let!(:calendar){ create(:calendar_with_terms, calendar_area: calendar_area, template: true) }
  let!(:solar_pv_area){ create(:solar_pv_tuos_area, title: 'BANES solar') }
  let!(:weather_underground_area){ create(:weather_underground_area, title: 'BANES weather') }
  let!(:school_group) do
    create(
      :school_group,
      name: 'BANES',
      default_calendar_area: calendar_area,
      default_solar_pv_tuos_area: solar_pv_area,
      default_weather_underground_area: weather_underground_area
    )
  end

  before(:each) do
    sign_in(admin)
    visit root_path
  end

  it 'splits the journey up in to basic details and configuration' do
    within '.navbar' do
      click_on 'New School'
    end

    fill_in 'Name', with: "<NAME>"
    fill_in 'Unique Reference Number', with: '4444244'
    fill_in 'Number of pupils', with: 300
    fill_in 'Floor area in square metres', with: 400
{'fraction_non_alphanumeric': 0.12108943687891056, 'fraction_numerical': 0.012513801987486198, 'mean_word_length': 4.734177215189874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7373274', 'n_tokens_mistral': 988, 'n_tokens_neox': 935, 'n_words': 225}