<commit_before># encoding: UTF-8
require_relative '../integration_test_helper'
require_relative 'smart_answer_test_helper'

class HolidayLeaveTest < ActionDispatch::IntegrationTest
  include SmartAnswerTestHelper

  def setup
    visit "/calculate-your-holiday-entitlement"
    click_on "Get started"
  end

  test "Has correct options" do
    assert has_question? "What is your employment status?"
    assert has_content? "Full-time"
    assert has_content? "Part-time"
    assert has_content? "Casual or irregular hours"
    assert has_content? "Annualised hours"
    assert has_content? "Compressed hours"
    assert has_content? "Shift worker"
  end

  test "Full-time" do
    respond_with "Full-time"
    assert has_question? "How long will you be employed full-time?"
    assert has_content? "A full year"
    assert has_content? "Part of a year"
  end

  test "Full-time all year flow" do
    respond_with "Full-time"
    respond_with "A full year"
    respond_with "5 days per week"
    assert_results_contain "Your paid statutory holiday entitlement is 28 of your working days."
  end

  test "Full-time all year more than 5 days flow" do
    respond_with "Full-time"
    respond_with "A full year"
    respond_with "6 or 7 days per week"
    assert_results_contain "get more statutory leave than this even if you work over 5 days a week"
  end

  test "Full time starting this year flow" do
    respond_with "Full-time"
    respond_with "Part of a year - I am starting this year"
    respond_with "2012-08-01"
    respond_with "5 days per week"
    assert_results_contain "11.6 days"
  end

  test "Full time leaving this year flow" do<commit_msg>Fix Jenkins build<commit_after># encoding: UTF-8
require_relative '../integration_test_helper'
require_relative 'smart_answer_test_helper'

class HolidayLeaveTest < ActionDispatch::IntegrationTest
  include SmartAnswerTestHelper

  def setup
    visit "/calculate-your-holiday-entitlement"
    click_on "Get started"
  end

  test "Has correct options" do
    assert has_question? "What is your employment status?"
    assert has_content? "Full-time"
    assert has_content? "Part-time"
    assert has_content? "Casual or irregular hours"
    assert has_content? "Annualised hours"
    assert has_content? "Compressed hours"
    assert has_content? "Shift worker"
  end

  test "Full-time" do
    respond_with "Full-time"
    assert has_question? "How long will you be employed full-time?"
    assert has_content? "A full year"
    assert has_content? "Part of a year"
  end

  test "Full-time all year flow" do
    respond_with "Full-time"
    respond_with "A full year"
    respond_with "5 days per week"
    assert_results_contain "Your statutory holiday entitlement is 28 days."
  end

  test "Full-time all year more than 5 days flow" do
    respond_with "Full-time"
    respond_with "A full year"
    respond_with "6 or 7 days per week"
    assert_results_contain "get more statutory leave than this even if you work over 5 days a week"
  end

  test "Full time starting this year flow" do
    respond_with "Full-time"
    respond_with "Part of a year - I am starting this year"
    respond_with "2012-08-01"
    respond_with "5 days per week"
    assert_results_contain "11.6 days"
  end

  test "Full time leaving this year flow" do
{'fraction_non_alphanumeric': 0.06733393994540492, 'fraction_numerical': 0.012132241431604488, 'mean_word_length': 3.638537271448664, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4109780', 'n_tokens_mistral': 1040, 'n_tokens_neox': 978, 'n_words': 381}