mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-30 04:35:28 -04:00
Seperate some specs
This commit is contained in:
@@ -32,11 +32,11 @@ feature "crop wranglers", js: true do
|
||||
end
|
||||
end
|
||||
|
||||
scenario "visiting a crop can see wrangler links" do
|
||||
visit crop_path(crops.first)
|
||||
expect(page).to have_content 'You are a CROP WRANGLER'
|
||||
expect(page).to have_link 'Edit crop'
|
||||
expect(page).to have_link 'Delete crop'
|
||||
describe "visiting a crop can see wrangler links" do
|
||||
before { visit crop_path(crops.first) }
|
||||
it { expect(page).to have_content 'You are a CROP WRANGLER' }
|
||||
it { expect(page).to have_link 'Edit' }
|
||||
it { expect(page).to have_link 'Delete' }
|
||||
end
|
||||
|
||||
scenario "can create a new crop" do
|
||||
|
||||
@@ -21,15 +21,15 @@ feature "Planting a crop", :js, :elasticsearch do
|
||||
expect(page).to have_content "* denotes a required field"
|
||||
end
|
||||
|
||||
it "displays required and optional fields properly" do
|
||||
expect(page).to have_selector ".form-group.required", text: "What did you plant?"
|
||||
expect(page).to have_selector ".form-group.required", text: "Where did you plant it?"
|
||||
expect(page).to have_optional 'input#planting_planted_at'
|
||||
expect(page).to have_optional 'input#planting_quantity'
|
||||
expect(page).to have_optional 'select#planting_planted_from'
|
||||
expect(page).to have_optional 'select#planting_sunniness'
|
||||
expect(page).to have_optional 'textarea#planting_description'
|
||||
expect(page).to have_optional 'input#planting_finished_at'
|
||||
describe "displays required and optional fields properly" do
|
||||
it { expect(page).to have_selector ".form-group.required", text: "What did you plant?" }
|
||||
it { expect(page).to have_selector ".form-group.required", text: "Where did you plant it?" }
|
||||
it { expect(page).to have_optional 'input#planting_planted_at' }
|
||||
it { expect(page).to have_optional 'input#planting_quantity' }
|
||||
it { expect(page).to have_optional 'select#planting_planted_from' }
|
||||
it { expect(page).to have_optional 'select#planting_sunniness' }
|
||||
it { expect(page).to have_optional 'textarea#planting_description' }
|
||||
it { expect(page).to have_optional 'input#planting_finished_at' }
|
||||
end
|
||||
|
||||
scenario "Creating a new planting" do
|
||||
|
||||
Reference in New Issue
Block a user