boomerdigital / solidus_flexi_variants

BSD 3-Clause "New" or "Revised" License
15 stars 31 forks source link

Conditional decorators in case Solidus frontend is not being used. Specify type of data allowed for customizable product options. Also testing improvements #7

Closed masonjeffreys closed 6 years ago

masonjeffreys commented 6 years ago

The following changes were made: ***Still in-progress - getting all tests to pass

***Small changes 1.) Add conditional statements to frontend decorators so that the gem can still be used even if solidus frontend is not being used. (eg. controllers/spree/orders_controller_decorator.rb) 2.) Fix existing testing suite by changing FactoryGirl to FactoryBot 3.) Add jquery.validate.min.js to vendor/assets/javascripts/jquery.validate

***Big changes 4.) Don't allow blank Calculator for product_customization_type 5.) Add "data-type" column to customizable product options - now you can select the type of value you want to allow for customizable fields. This will let postgres validate the data type. Valid types are "file", "multi-select", "single-select", "integer", "boolean", "float" and "string" (default). 6.) For "multi-select" and "single-select" customizable product options - allow input of selectable options 7.) Render customizations based on their data type 8.) Expand testing suite to make sure different customizable data types are rendered differently - /spec/features/product_page_customizations_feature_spec.rb