<commit_before>package integration.s1_carersallowance

import org.specs2.mutable.{Tags, Specification}
import play.api.test.WithBrowser

class G5ApproveSpec extends Specification with Tags {

  "Approve" should {
    "be presented" in new WithBrowser {
      browser.goTo("/allowance/approve")
      browser.title() mustEqual "Can you get Carer's Allowance?"
    }
  } section "integration"


  "Carer's Allowance" should {
    "be approved" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")

      browser.title() mustEqual "Can you get Carer's Allowance?"
      browser.find("div[class=prompt]").size mustEqual 1
      browser.find(".prompt.error").size mustEqual 0

    }

    "be declined" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-no")
      browser.submit("input[type='submit']")

      browser.title() mustEqual "Can you get Carer's Allowance?"
      browser.find("div[class=prompt]").size mustEqual 0
      browser.find(".prompt.error").size mustEqual 1
    }

    "navigate to next section" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-no")
      browser.submit("input[type='submit']")
      browser.title() mustEqual "Can you get Carer's Allowance?"

      browser.submit("input[type='submit']")

      browser.title() mustEqual "Your Details - Carer's Allowance"

    }

  } section "integration"
}<commit_msg>updated test<commit_after>package integration.s1_carersallowance

import org.specs2.mutable.{Tags, Specification}
import play.api.test.WithBrowser

class G5ApproveSpec extends Specification with Tags {

  "Approve" should {
    "be presented" in new WithBrowser {
      browser.goTo("/allowance/approve")
      browser.title() mustEqual "Can you get Carer's Allowance?"
    }
  } section "integration"


  "Carer's Allowance" should {
    "be approved" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")

      browser.title() mustEqual "Can you get Carer's Allowance?"
      browser.find("div[class=prompt]").size mustEqual 1
      browser.find(".prompt.error").size mustEqual 0

    }

    "be declined" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-no")
      browser.submit("input[type='submit']")

      browser.title() mustEqual "Can you get Carer's Allowance?"
      browser.find("div[class=prompt]").size mustEqual 0
      browser.find(".prompt.error").size mustEqual 1
    }

    "navigate to next section" in new WithBrowser {
      browser.goTo("/")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-yes")
      browser.submit("input[type='submit']")
      browser.click("#q3-no")
      browser.submit("input[type='submit']")
      browser.title() mustEqual "Can you get Carer's Allowance?"

      browser.submit("input[type='submit']")

      browser.title() mustEqual "Your Details - About You"

    }

  } section "integration"
}
{'fraction_non_alphanumeric': 0.16545069428100728, 'fraction_numerical': 0.00894328077194634, 'mean_word_length': 3.3634496919917862, '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': '4737665', 'n_tokens_mistral': 1342, 'n_tokens_neox': 1287, 'n_words': 239}