Seperate some specs

This commit is contained in:
Brenda Wallace
2019-01-23 16:25:01 +13:00
parent 045deb1ae4
commit f39af27538
2 changed files with 14 additions and 14 deletions

View File

@@ -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

View File

@@ -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