Skip to content

Instantly share code, notes, and snippets.

@thechrisoshow
Created June 22, 2010 15:48
Show Gist options
  • Save thechrisoshow/448652 to your computer and use it in GitHub Desktop.
Save thechrisoshow/448652 to your computer and use it in GitHub Desktop.
@javascript
Scenario: Create a basic job # features/admin_users/create_jobs.feature:7
Given the date is "22 July 2010" # features/step_definitions/time_steps.rb:1
And an account "HPK account" exists # features/step_definitions/pickle_steps.rb:4
And a company "HPK" exists with account: account "HPK account", name: "Harmonypark" # features/step_definitions/pickle_steps.rb:4
And a client_company "BBH" exists with name: "BBH", account: account "HPK account", company: company "HPK" # features/step_definitions/pickle_steps.rb:4
And the client_company "BBH" is one of company "HPK"'s client_companies # features/step_definitions/association_steps.rb:1
And a project: "First project" exists with company: company "HPK", name: "First project" # features/step_definitions/pickle_steps.rb:4
And the project "First project" is one of client_company "BBH"'s projects # features/step_definitions/association_steps.rb:1
And a user "Bob" exists with admin: true, email: "bob@example.com", company: company "HPK", state: "active" # features/step_definitions/pickle_steps.rb:4
When I go to login page # features/step_definitions/web_steps.rb:23
And I fill in "Email" with "bob@example.com" # features/step_definitions/web_steps.rb:39
And I fill in "Password" with "secret" # features/step_definitions/web_steps.rb:39
And I press "Log in" # features/step_definitions/web_steps.rb:27
And I follow "Jobs" # features/step_definitions/web_steps.rb:33
And I follow "New job" # features/step_definitions/web_steps.rb:33
And I fill in "Job name" with "Speculative job" # features/step_definitions/web_steps.rb:39
And I fill in "Deadline" with "22 Aug 2010" # features/step_definitions/web_steps.rb:39
And I select "BBH" from "Client" # features/step_definitions/web_steps.rb:70
Then I should see "First project" # features/step_definitions/web_steps.rb:107
When I select "First project" from "Project" # features/step_definitions/web_steps.rb:70
And I press "Save" # features/step_definitions/web_steps.rb:27
Then I should see "Job was successfully created." # features/step_definitions/web_steps.rb:107
And a job should exist with project: project "First project", company: company "HPK", name: "Speculative job", owner: user "Bob" # features/step_definitions/pickle_steps.rb:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment