Files
openfoodnetwork/spec/features/admin/properties_spec.rb
filipefurtad0 6f694e2cab Standardise spec block naming
The `feature` and `scenario` names are aliases only available in feature
specs and not needed. It's confusing to have different names and we can
easily move feature specs to system specs when using standard names.
2021-09-28 08:24:05 +10:00

27 lines
755 B
Ruby

# frozen_string_literal: true
require "spec_helper"
describe '
As an admin
I want to manage product properties
' do
include AuthenticationHelper
it "creating and editing a property" do
login_as_admin_and_visit spree.admin_properties_path
click_link 'New Property'
fill_in 'property_name', with: 'New property!'
fill_in 'property_presentation', with: 'New property presentation!'
click_button 'Create'
expect(page).to have_content 'New property!'
page.find('td.actions a.icon-edit').click
expect(page).to have_field 'property_name', with: 'New property!'
fill_in 'property_name', with: 'New changed property!'
click_button 'Update'
expect(page).to have_content 'New changed property!'
end
end