   casper.thenEvaluate ->
     $("input[value=0][type=radio]").click()
     $("#id_your_details-has_partner_0").click()
-    $("button[type='submit']").click()
 
+  casper.then ->
+    @fill 'form', {}, true
     @waitForUrl /.*your_capital/
 
   casper.thenEvaluate ->
     $("input[type=number]").val(0)
-    $("button[type='submit']").click()
+
+  casper.then ->
+    @fill 'form', {}, true
     @waitForUrl /.*your_income/
 
   casper.thenEvaluate ->
     $("input[type=number]").val(0)
     $("#id_your_income-earnings").val(910.51)
     $("input[value=1][type=radio]").click()
-    $("button[type='submit']").click()
+
+  casper.then ->
+    @fill 'form', {}, true
     @waitForUrl /.*your_allowances/
 
   casper.thenEvaluate ->
     $("input[type=number]").val(0)
-    $("button[type='submit']").click()
+
+  casper.then ->
+    @fill 'form', {}, true
     @waitForUrl /.*result/
 
   casper.then ->

  casper.thenEvaluate ->
    $("input[value=0][type=radio]").click()
    $("#id_your_details-has_partner_0").click()
    $("button[type='submit']").click()

    @waitForUrl /.*your_capital/

  casper.thenEvaluate ->
    $("input[type=number]").val(0)
    $("button[type='submit']").click()
    @waitForUrl /.*your_income/

  casper.thenEvaluate ->
    $("input[type=number]").val(0)
    $("#id_your_income-earnings").val(910.5)
    $("input[value=1][type=radio]").click()
    $("button[type='submit']").click()
    @waitForUrl /.*your_allowances/

  casper.thenEvaluate ->
    $("input[type=number]").val(0)
    $("button[type='submit']").click()
    @waitForUrl /.*result/

  casper.then ->
    test.assertSelectorHasText "form h2", "might be", "test case is eligible"

  casper.run ->
    test.done()



  casper.thenEvaluate ->
      $("input[name=your_problem-category]:first").click()
      $("button[type='submit']").click()

  casper.then ->
    @waitForUrl /.*your_details/
