Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Cucumber

cucumber rails 4.0.5

  • Please log in to reply
No replies to this topic

#1 Rahul Patil

Rahul Patil

    Passenger

  • Members
  • 1 posts
  • LocationBangalore

Posted 29 May 2014 - 07:34 AM

I have written following code in rails 4.0.5
 
Feature: Web-SPP – Additional Salary Definition
  Background:
    Given a valid user
    And valid state Karnakata created
    And valid Feb/2012 month is created
 
  @javascript
  Scenario: Create new Salary Heading
    Given user created required details
    When User follow "Salary" link
    And User follow "Additional Salary" link
    And User follow "Add New Salary Heading" link
    And User select "Feb/2012" from "additional_salary_definition_paymonth_id"
    And User select "Special Earning" from "additional_salary_definition_salary_head_id"
    And User enters "additional_salary_definition_heading_name" as "Bonus"
    And User clicks "Save" button
    Then User should see the text "Bonus"
 
  @javascript
  Scenario: Additional salary definition for employee
    Given user created required details for definition
    And User follow "Salary" link
    And User follow "Additional Salary" link
    And User clicks on the Add Earn
    Then User should see the text "Contribution Applicable"
 
i get following error 
"Given a valid user  Unable to find field "user_username" (Capybara::ElementNotFound)"
and when i remove @javascript then Given a valid user step passes.
Any idea how this works?
 
 

 







Also tagged with one or more of these keywords: cucumber, rails 4.0.5

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users