workarea-storefront 3.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +52 -0
- data/README.md +19 -0
- data/Rakefile +23 -0
- data/app/assets/fonts/.keep +0 -0
- data/app/assets/images/workarea/core/test.jpg +0 -0
- data/app/assets/images/workarea/storefront/default_card.svg +1 -0
- data/app/assets/images/workarea/storefront/dialog_close.svg +1 -0
- data/app/assets/images/workarea/storefront/email/banner.png +0 -0
- data/app/assets/images/workarea/storefront/icons/facebook.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/google_plus.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/menu.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/pinterest.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/twitter.svg +1 -0
- data/app/assets/images/workarea/storefront/logo.png +0 -0
- data/app/assets/images/workarea/storefront/message_dismiss.svg +1 -0
- data/app/assets/images/workarea/storefront/message_error.svg +1 -0
- data/app/assets/images/workarea/storefront/message_info.svg +1 -0
- data/app/assets/images/workarea/storefront/message_success.svg +1 -0
- data/app/assets/images/workarea/storefront/message_warning.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_icons/american_express.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_icons/diner_s_club.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_icons/discover.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_icons/mastercard.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_icons/visa.svg +1 -0
- data/app/assets/images/workarea/storefront/payment_method_icons.png +0 -0
- data/app/assets/images/workarea/storefront/style_guide_light_banner.png +0 -0
- data/app/assets/images/workarea/storefront/style_guide_product.jpg +0 -0
- data/app/assets/javascripts/jquery_ui/storefront/categorized_autocomplete.js +53 -0
- data/app/assets/javascripts/workarea/storefront/application.js.erb +162 -0
- data/app/assets/javascripts/workarea/storefront/config.js.erb +153 -0
- data/app/assets/javascripts/workarea/storefront/head.js.erb +18 -0
- data/app/assets/javascripts/workarea/storefront/modules/address_region_fields.js +91 -0
- data/app/assets/javascripts/workarea/storefront/modules/admin_toolbar.js +105 -0
- data/app/assets/javascripts/workarea/storefront/modules/alternate_image_buttons.js +78 -0
- data/app/assets/javascripts/workarea/storefront/modules/analytics.js +285 -0
- data/app/assets/javascripts/workarea/storefront/modules/authenticity_token.js +27 -0
- data/app/assets/javascripts/workarea/storefront/modules/back_to_top_button.js +47 -0
- data/app/assets/javascripts/workarea/storefront/modules/break_points.js +67 -0
- data/app/assets/javascripts/workarea/storefront/modules/cart_count.js +51 -0
- data/app/assets/javascripts/workarea/storefront/modules/checkout_addresses_forms.js +222 -0
- data/app/assets/javascripts/workarea/storefront/modules/checkout_primary_payments.js +66 -0
- data/app/assets/javascripts/workarea/storefront/modules/checkout_shipping_services.js +53 -0
- data/app/assets/javascripts/workarea/storefront/modules/current_user.js +28 -0
- data/app/assets/javascripts/workarea/storefront/modules/dialog.js +284 -0
- data/app/assets/javascripts/workarea/storefront/modules/dialog_buttons.js +78 -0
- data/app/assets/javascripts/workarea/storefront/modules/dialog_close_buttons.js +29 -0
- data/app/assets/javascripts/workarea/storefront/modules/dialog_forms.js +47 -0
- data/app/assets/javascripts/workarea/storefront/modules/forms.js +94 -0
- data/app/assets/javascripts/workarea/storefront/modules/loading.js +81 -0
- data/app/assets/javascripts/workarea/storefront/modules/log_out_link_placeholders.js +36 -0
- data/app/assets/javascripts/workarea/storefront/modules/messages.js +179 -0
- data/app/assets/javascripts/workarea/storefront/modules/mobile_filter_buttons.js +87 -0
- data/app/assets/javascripts/workarea/storefront/modules/mobile_nav_button.js +100 -0
- data/app/assets/javascripts/workarea/storefront/modules/option_buttons.js +40 -0
- data/app/assets/javascripts/workarea/storefront/modules/optional_fields.js +49 -0
- data/app/assets/javascripts/workarea/storefront/modules/pagination.js +284 -0
- data/app/assets/javascripts/workarea/storefront/modules/popup_buttons.js +42 -0
- data/app/assets/javascripts/workarea/storefront/modules/primary_nav_content.js +77 -0
- data/app/assets/javascripts/workarea/storefront/modules/product_details_sku_selects.js +94 -0
- data/app/assets/javascripts/workarea/storefront/modules/recent_views.js +25 -0
- data/app/assets/javascripts/workarea/storefront/modules/recommendations_placeholders.js +33 -0
- data/app/assets/javascripts/workarea/storefront/modules/scroll_to_buttons.js +37 -0
- data/app/assets/javascripts/workarea/storefront/modules/search_fields.js +59 -0
- data/app/assets/javascripts/workarea/storefront/modules/single_submit_forms.js +35 -0
- data/app/assets/javascripts/workarea/storefront/modules/traffic_referrer.js +33 -0
- data/app/assets/javascripts/workarea/storefront/modules/workarea_analytics.js +54 -0
- data/app/assets/javascripts/workarea/storefront/routes.js.erb +16 -0
- data/app/assets/javascripts/workarea/storefront/serviceworkers/pwa_cache.js.erb +31 -0
- data/app/assets/javascripts/workarea/storefront/serviceworkers/register_pwa_cache.js +5 -0
- data/app/assets/javascripts/workarea/storefront/templates/authenticity_token.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/back_to_top_button.jst.ejs +3 -0
- data/app/assets/javascripts/workarea/storefront/templates/button.jst.ejs +3 -0
- data/app/assets/javascripts/workarea/storefront/templates/loading.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/log_out_link.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/message.jst.ejs +10 -0
- data/app/assets/javascripts/workarea/storefront/templates/message_dismiss_action.jst.ejs +5 -0
- data/app/assets/javascripts/workarea/storefront/templates/mobile_filters_nav_close_button.jst.ejs +3 -0
- data/app/assets/javascripts/workarea/storefront/templates/optional_field_prompt.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/page_header_cart_count.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/pagination_button.jst.ejs +11 -0
- data/app/assets/javascripts/workarea/storefront/templates/same_as_shipping_button_property.jst.ejs +8 -0
- data/app/assets/javascripts/workarea/storefront/templates/saved_addresses_property.jst.ejs +21 -0
- data/app/assets/javascripts/workarea/storefront/templates/ui_menu_heading.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/ui_menu_item.jst.ejs +8 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_autocomplete.scss +17 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_dialog.scss +158 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_helper_hidden_accessible.scss +7 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_menu.scss +40 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_state_focus.scss +10 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_widget_overlay.scss +11 -0
- data/app/assets/stylesheets/workarea/storefront/application.scss.erb +138 -0
- data/app/assets/stylesheets/workarea/storefront/base/_forms.scss +113 -0
- data/app/assets/stylesheets/workarea/storefront/base/_images.scss +29 -0
- data/app/assets/stylesheets/workarea/storefront/base/_lists.scss +8 -0
- data/app/assets/stylesheets/workarea/storefront/base/_page.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/base/_tables.scss +15 -0
- data/app/assets/stylesheets/workarea/storefront/components/_admin_toolbar.scss +34 -0
- data/app/assets/stylesheets/workarea/storefront/components/_back_to_top_button.scss +23 -0
- data/app/assets/stylesheets/workarea/storefront/components/_box.scss +37 -0
- data/app/assets/stylesheets/workarea/storefront/components/_breadcrumbs.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/components/_button.scss +47 -0
- data/app/assets/stylesheets/workarea/storefront/components/_button_content_block.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_button_property.scss +40 -0
- data/app/assets/stylesheets/workarea/storefront/components/_cart.scss +21 -0
- data/app/assets/stylesheets/workarea/storefront/components/_category_summary_content_block.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_addresses.scss +17 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_payment.scss +48 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_progress.scss +42 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_shipping.scss +11 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_step_summary.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/components/_content_block.scss +39 -0
- data/app/assets/stylesheets/workarea/storefront/components/_data_card.scss +68 -0
- data/app/assets/stylesheets/workarea/storefront/components/_divider_content_block.scss +38 -0
- data/app/assets/stylesheets/workarea/storefront/components/_email_signup.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_hero_content_block.scss +77 -0
- data/app/assets/stylesheets/workarea/storefront/components/_html_content_block.scss +5 -0
- data/app/assets/stylesheets/workarea/storefront/components/_image_and_text_content_block.scss +30 -0
- data/app/assets/stylesheets/workarea/storefront/components/_image_content_block.scss +16 -0
- data/app/assets/stylesheets/workarea/storefront/components/_image_group_content_block.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_inline_form.scss +11 -0
- data/app/assets/stylesheets/workarea/storefront/components/_loading.scss +92 -0
- data/app/assets/stylesheets/workarea/storefront/components/_message.scss +120 -0
- data/app/assets/stylesheets/workarea/storefront/components/_mobile_filters.scss +25 -0
- data/app/assets/stylesheets/workarea/storefront/components/_mobile_filters_nav.scss +31 -0
- data/app/assets/stylesheets/workarea/storefront/components/_mobile_nav.scss +67 -0
- data/app/assets/stylesheets/workarea/storefront/components/_option_button.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/components/_order_help_menu.scss +31 -0
- data/app/assets/stylesheets/workarea/storefront/components/_order_summary.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_container.scss +26 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_content.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_footer.scss +57 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_header.scss +79 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_messages.scss +36 -0
- data/app/assets/stylesheets/workarea/storefront/components/_pagination.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_payment_icon.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/components/_personalized_recommendations_content_block.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/components/_primary_nav.scss +54 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_detail_container.scss +13 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_details.scss +84 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_insights_content_block.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_list.scss +160 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_list_content_block.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_prices.scss +32 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_summary.scss +53 -0
- data/app/assets/stylesheets/workarea/storefront/components/_property.scss +67 -0
- data/app/assets/stylesheets/workarea/storefront/components/_quote_content_block.scss +38 -0
- data/app/assets/stylesheets/workarea/storefront/components/_recent_views.scss +28 -0
- data/app/assets/stylesheets/workarea/storefront/components/_recommendations.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_result_filters.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/components/_search_no_results.scss +21 -0
- data/app/assets/stylesheets/workarea/storefront/components/_search_results.scss +22 -0
- data/app/assets/stylesheets/workarea/storefront/components/_secondary_nav.scss +23 -0
- data/app/assets/stylesheets/workarea/storefront/components/_sitemap.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/components/_sitemap_pagination.scss +26 -0
- data/app/assets/stylesheets/workarea/storefront/components/_social_networks_content_block.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/components/_style_guide.scss +140 -0
- data/app/assets/stylesheets/workarea/storefront/components/_svg_icon.scss +57 -0
- data/app/assets/stylesheets/workarea/storefront/components/_table.scss +50 -0
- data/app/assets/stylesheets/workarea/storefront/components/_taxonomy_content_block.scss +87 -0
- data/app/assets/stylesheets/workarea/storefront/components/_text_box.scss +36 -0
- data/app/assets/stylesheets/workarea/storefront/components/_text_button.scss +17 -0
- data/app/assets/stylesheets/workarea/storefront/components/_text_content_block.scss +5 -0
- data/app/assets/stylesheets/workarea/storefront/components/_value.scss +46 -0
- data/app/assets/stylesheets/workarea/storefront/components/_video_and_text_content_block.scss +44 -0
- data/app/assets/stylesheets/workarea/storefront/components/_video_content_block.scss +21 -0
- data/app/assets/stylesheets/workarea/storefront/components/_view.scss +12 -0
- data/app/assets/stylesheets/workarea/storefront/email.scss +4 -0
- data/app/assets/stylesheets/workarea/storefront/email/_base.scss +52 -0
- data/app/assets/stylesheets/workarea/storefront/email/_components.scss +91 -0
- data/app/assets/stylesheets/workarea/storefront/email/_helpers.scss +69 -0
- data/app/assets/stylesheets/workarea/storefront/email/_settings.scss +22 -0
- data/app/assets/stylesheets/workarea/storefront/generic/_box_sizing.scss +20 -0
- data/app/assets/stylesheets/workarea/storefront/generic/_fonts.scss +24 -0
- data/app/assets/stylesheets/workarea/storefront/generic/_reset.scss +37 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_button_reset.scss +17 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_content_preview_visibility.scss +93 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_content_wrapper.scss +18 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_inline_list.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_list_reset.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_text_field_reset.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_breakpoints.scss.erb +8 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_colors.scss +45 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_global.scss +25 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_grid.scss +36 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_typography.scss +18 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_z_indexes.scss +29 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_center.scss +34 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_focus_ring.scss +23 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_respond_to.scss +31 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_svg.scss +29 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_break_word.scss +9 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_clearfix.scss +13 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_hidden.scss +71 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_hidden_if_js_enabled.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_image_replacement.scss +11 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_truncate.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_visible.scss +70 -0
- data/app/assets/stylesheets/workarea/storefront/trumps/_visually_hidden.scss +14 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_align.scss +15 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_headings.scss +62 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_links.scss +15 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_text.scss +26 -0
- data/app/controllers/workarea/storefront/analytics_controller.rb +45 -0
- data/app/controllers/workarea/storefront/application_controller.rb +50 -0
- data/app/controllers/workarea/storefront/cart_items_controller.rb +99 -0
- data/app/controllers/workarea/storefront/carts_controller.rb +61 -0
- data/app/controllers/workarea/storefront/categories_controller.rb +11 -0
- data/app/controllers/workarea/storefront/check_inventory.rb +10 -0
- data/app/controllers/workarea/storefront/check_pricing_override.rb +17 -0
- data/app/controllers/workarea/storefront/checkout/addresses_controller.rb +58 -0
- data/app/controllers/workarea/storefront/checkout/payment_controller.rb +21 -0
- data/app/controllers/workarea/storefront/checkout/place_order_controller.rb +65 -0
- data/app/controllers/workarea/storefront/checkout/shipping_controller.rb +53 -0
- data/app/controllers/workarea/storefront/checkouts_controller.rb +102 -0
- data/app/controllers/workarea/storefront/contacts_controller.rb +28 -0
- data/app/controllers/workarea/storefront/content_areas_controller.rb +15 -0
- data/app/controllers/workarea/storefront/content_blocks_controller.rb +51 -0
- data/app/controllers/workarea/storefront/current_checkout.rb +114 -0
- data/app/controllers/workarea/storefront/email_signups_controller.rb +19 -0
- data/app/controllers/workarea/storefront/errors_controller.rb +58 -0
- data/app/controllers/workarea/storefront/http_caching.rb +33 -0
- data/app/controllers/workarea/storefront/menus_controller.rb +25 -0
- data/app/controllers/workarea/storefront/order_lookup.rb +20 -0
- data/app/controllers/workarea/storefront/orders_controller.rb +29 -0
- data/app/controllers/workarea/storefront/pages_controller.rb +23 -0
- data/app/controllers/workarea/storefront/products_controller.rb +25 -0
- data/app/controllers/workarea/storefront/recent_views_controller.rb +51 -0
- data/app/controllers/workarea/storefront/recommendations_controller.rb +11 -0
- data/app/controllers/workarea/storefront/searches_controller.rb +47 -0
- data/app/controllers/workarea/storefront/sitemaps_controller.rb +11 -0
- data/app/controllers/workarea/storefront/style_guides_controller.rb +6 -0
- data/app/controllers/workarea/storefront/user_activity.rb +17 -0
- data/app/controllers/workarea/storefront/users/accounts_controller.rb +91 -0
- data/app/controllers/workarea/storefront/users/addresses_controller.rb +49 -0
- data/app/controllers/workarea/storefront/users/credit_cards_controller.rb +75 -0
- data/app/controllers/workarea/storefront/users/logins_controller.rb +47 -0
- data/app/controllers/workarea/storefront/users/orders_controller.rb +30 -0
- data/app/controllers/workarea/storefront/users/passwords_controller.rb +65 -0
- data/app/helpers/workarea/storefront/admin_helper.rb +13 -0
- data/app/helpers/workarea/storefront/analytics_helper.rb +230 -0
- data/app/helpers/workarea/storefront/application_helper.rb +79 -0
- data/app/helpers/workarea/storefront/content_helper.rb +71 -0
- data/app/helpers/workarea/storefront/credit_cards_helper.rb +38 -0
- data/app/helpers/workarea/storefront/favicons_helper.rb +25 -0
- data/app/helpers/workarea/storefront/locales_helper.rb +27 -0
- data/app/helpers/workarea/storefront/navigation_helper.rb +97 -0
- data/app/helpers/workarea/storefront/pagination_helper.rb +22 -0
- data/app/helpers/workarea/storefront/products_helper.rb +43 -0
- data/app/helpers/workarea/storefront/recent_views_helper.rb +9 -0
- data/app/helpers/workarea/storefront/users_helper.rb +9 -0
- data/app/mailers/workarea/storefront/account_mailer.rb +21 -0
- data/app/mailers/workarea/storefront/application_mailer.rb +23 -0
- data/app/mailers/workarea/storefront/fulfillment_mailer.rb +47 -0
- data/app/mailers/workarea/storefront/inquiry_mailer.rb +10 -0
- data/app/mailers/workarea/storefront/order_mailer.rb +31 -0
- data/app/mailers/workarea/storefront/payment_mailer.rb +23 -0
- data/app/mailers/workarea/storefront/transactional_mailer.rb +17 -0
- data/app/view_models/workarea/storefront/cart_item_view_model.rb +11 -0
- data/app/view_models/workarea/storefront/cart_recommendations_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/cart_view_model.rb +95 -0
- data/app/view_models/workarea/storefront/category_view_model.rb +119 -0
- data/app/view_models/workarea/storefront/checkout/addresses_view_model.rb +73 -0
- data/app/view_models/workarea/storefront/checkout/confirmation_view_model.rb +14 -0
- data/app/view_models/workarea/storefront/checkout/payment_view_model.rb +103 -0
- data/app/view_models/workarea/storefront/checkout/shipping_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/checkout/summary_view_model.rb +89 -0
- data/app/view_models/workarea/storefront/checkout_content.rb +11 -0
- data/app/view_models/workarea/storefront/content_block_view_model.rb +62 -0
- data/app/view_models/workarea/storefront/content_blocks/category_summary_view_model.rb +52 -0
- data/app/view_models/workarea/storefront/content_blocks/hero_view_model.rb +23 -0
- data/app/view_models/workarea/storefront/content_blocks/image_group_view_model.rb +24 -0
- data/app/view_models/workarea/storefront/content_blocks/navigation_view_model.rb +32 -0
- data/app/view_models/workarea/storefront/content_blocks/product_insights_view_model.rb +46 -0
- data/app/view_models/workarea/storefront/content_blocks/product_list_view_model.rb +20 -0
- data/app/view_models/workarea/storefront/content_blocks/taxonomy_view_model.rb +17 -0
- data/app/view_models/workarea/storefront/content_blocks/video_view_model.rb +58 -0
- data/app/view_models/workarea/storefront/content_view_model.rb +11 -0
- data/app/view_models/workarea/storefront/credit_card_view_model.rb +7 -0
- data/app/view_models/workarea/storefront/detail_page_recommendations_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/display_content.rb +56 -0
- data/app/view_models/workarea/storefront/email_recommendations_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/email_signups_view_model.rb +18 -0
- data/app/view_models/workarea/storefront/fulfillment_item_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/inquiry_view_model.rb +22 -0
- data/app/view_models/workarea/storefront/inventory_status_view_model.rb +27 -0
- data/app/view_models/workarea/storefront/menu_view_model.rb +7 -0
- data/app/view_models/workarea/storefront/option_set_view_model.rb +59 -0
- data/app/view_models/workarea/storefront/order_item_view_model.rb +83 -0
- data/app/view_models/workarea/storefront/order_pricing.rb +37 -0
- data/app/view_models/workarea/storefront/order_view_model.rb +144 -0
- data/app/view_models/workarea/storefront/package_view_model.rb +20 -0
- data/app/view_models/workarea/storefront/page_view_model.rb +11 -0
- data/app/view_models/workarea/storefront/pagination.rb +42 -0
- data/app/view_models/workarea/storefront/personalized_recommendations_view_model.rb +13 -0
- data/app/view_models/workarea/storefront/product_browsing.rb +33 -0
- data/app/view_models/workarea/storefront/product_templates/option_selects_view_model.rb +7 -0
- data/app/view_models/workarea/storefront/product_templates/option_thumbnails_view_model.rb +15 -0
- data/app/view_models/workarea/storefront/product_view_model.rb +183 -0
- data/app/view_models/workarea/storefront/product_view_model/cache_key.rb +44 -0
- data/app/view_models/workarea/storefront/product_view_model/image_collection.rb +58 -0
- data/app/view_models/workarea/storefront/product_view_model/option.rb +24 -0
- data/app/view_models/workarea/storefront/product_view_model/option_set.rb +97 -0
- data/app/view_models/workarea/storefront/product_view_model/sku_options.rb +53 -0
- data/app/view_models/workarea/storefront/recommendations_view_model.rb +39 -0
- data/app/view_models/workarea/storefront/refund_view_model.rb +16 -0
- data/app/view_models/workarea/storefront/search_content.rb +19 -0
- data/app/view_models/workarea/storefront/search_customization_content.rb +15 -0
- data/app/view_models/workarea/storefront/search_customization_view_model.rb +7 -0
- data/app/view_models/workarea/storefront/search_suggestion_view_model.rb +87 -0
- data/app/view_models/workarea/storefront/search_view_model.rb +50 -0
- data/app/view_models/workarea/storefront/shipping_view_model.rb +27 -0
- data/app/view_models/workarea/storefront/taxon_lookup.rb +37 -0
- data/app/view_models/workarea/storefront/user_activity_view_model.rb +41 -0
- data/app/view_models/workarea/storefront/user_view_model.rb +55 -0
- data/app/views/layouts/workarea/storefront/application.html.haml +175 -0
- data/app/views/layouts/workarea/storefront/checkout.html.haml +89 -0
- data/app/views/layouts/workarea/storefront/content_preview.html.haml +46 -0
- data/app/views/layouts/workarea/storefront/email.html.haml +193 -0
- data/app/views/layouts/workarea/storefront/empty.html.haml +48 -0
- data/app/views/layouts/workarea/storefront/navigation.html.haml +48 -0
- data/app/views/workarea/storefront/account_mailer/creation.html.haml +15 -0
- data/app/views/workarea/storefront/account_mailer/password_reset.html.haml +12 -0
- data/app/views/workarea/storefront/cart_items/create.html.haml +71 -0
- data/app/views/workarea/storefront/carts/_pricing.html.haml +14 -0
- data/app/views/workarea/storefront/carts/show.html.haml +183 -0
- data/app/views/workarea/storefront/categories/show.html.haml +103 -0
- data/app/views/workarea/storefront/checkouts/_checkout_progress.html.haml +6 -0
- data/app/views/workarea/storefront/checkouts/_summary.html.haml +102 -0
- data/app/views/workarea/storefront/checkouts/addresses.html.haml +56 -0
- data/app/views/workarea/storefront/checkouts/confirmation.html.haml +37 -0
- data/app/views/workarea/storefront/checkouts/payment.html.haml +184 -0
- data/app/views/workarea/storefront/checkouts/shipping.html.haml +39 -0
- data/app/views/workarea/storefront/checkouts/summary.html.haml +1 -0
- data/app/views/workarea/storefront/contacts/show.html.haml +41 -0
- data/app/views/workarea/storefront/content_areas/show.html.haml +6 -0
- data/app/views/workarea/storefront/content_blocks/_button.html.haml +5 -0
- data/app/views/workarea/storefront/content_blocks/_category_summary.html.haml +15 -0
- data/app/views/workarea/storefront/content_blocks/_divider.html.haml +2 -0
- data/app/views/workarea/storefront/content_blocks/_hero.html.haml +3 -0
- data/app/views/workarea/storefront/content_blocks/_html.html.haml +1 -0
- data/app/views/workarea/storefront/content_blocks/_image.html.haml +2 -0
- data/app/views/workarea/storefront/content_blocks/_image_and_text.html.haml +4 -0
- data/app/views/workarea/storefront/content_blocks/_image_group.html.haml +10 -0
- data/app/views/workarea/storefront/content_blocks/_product_insights.html.haml +10 -0
- data/app/views/workarea/storefront/content_blocks/_product_list.html.haml +10 -0
- data/app/views/workarea/storefront/content_blocks/_quote.html.haml +4 -0
- data/app/views/workarea/storefront/content_blocks/_recommendations.html.haml +1 -0
- data/app/views/workarea/storefront/content_blocks/_social_networks.html.haml +17 -0
- data/app/views/workarea/storefront/content_blocks/_taxonomy.html.haml +27 -0
- data/app/views/workarea/storefront/content_blocks/_text.html.haml +1 -0
- data/app/views/workarea/storefront/content_blocks/_three_column_taxonomy.html.haml +28 -0
- data/app/views/workarea/storefront/content_blocks/_two_column_taxonomy.html.haml +28 -0
- data/app/views/workarea/storefront/content_blocks/_video.html.haml +2 -0
- data/app/views/workarea/storefront/content_blocks/_video_and_text.html.haml +4 -0
- data/app/views/workarea/storefront/content_blocks/show.html.haml +1 -0
- data/app/views/workarea/storefront/email_signups/show.html.haml +12 -0
- data/app/views/workarea/storefront/errors/show.html.haml +12 -0
- data/app/views/workarea/storefront/facets/_range.html.haml +11 -0
- data/app/views/workarea/storefront/facets/_terms.html.haml +11 -0
- data/app/views/workarea/storefront/favicons/_tags.html.haml +8 -0
- data/app/views/workarea/storefront/fulfillment_mailer/canceled.html.haml +34 -0
- data/app/views/workarea/storefront/fulfillment_mailer/shipped.html.haml +92 -0
- data/app/views/workarea/storefront/inquiry_mailer/created.html.haml +27 -0
- data/app/views/workarea/storefront/mailers/_recommendations.html.haml +22 -0
- data/app/views/workarea/storefront/menus/index.html.haml +12 -0
- data/app/views/workarea/storefront/menus/show.html.haml +6 -0
- data/app/views/workarea/storefront/order_mailer/_summary.html.haml +209 -0
- data/app/views/workarea/storefront/order_mailer/confirmation.html.haml +15 -0
- data/app/views/workarea/storefront/order_mailer/reminder.html.haml +34 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_credit_card.html.haml +4 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_store_credit.html.haml +2 -0
- data/app/views/workarea/storefront/orders/_summary.html.haml +274 -0
- data/app/views/workarea/storefront/orders/index.html.haml +40 -0
- data/app/views/workarea/storefront/orders/show.html.haml +16 -0
- data/app/views/workarea/storefront/orders/tenders/_credit_card.html.haml +9 -0
- data/app/views/workarea/storefront/orders/tenders/_store_credit.html.haml +6 -0
- data/app/views/workarea/storefront/pages/accessibility.html.haml +53 -0
- data/app/views/workarea/storefront/pages/browser_config.xml.builder +9 -0
- data/app/views/workarea/storefront/pages/home_page.html.haml +20 -0
- data/app/views/workarea/storefront/pages/robots.text.erb +17 -0
- data/app/views/workarea/storefront/pages/show.html.haml +28 -0
- data/app/views/workarea/storefront/pages/templates/_generic.html.haml +1 -0
- data/app/views/workarea/storefront/pages/templates/_test.html.haml +1 -0
- data/app/views/workarea/storefront/pages/web_manifest.json.jbuilder +11 -0
- data/app/views/workarea/storefront/payment_mailer/refunded.html.haml +13 -0
- data/app/views/workarea/storefront/products/_price.html.haml +4 -0
- data/app/views/workarea/storefront/products/_pricing.html.haml +34 -0
- data/app/views/workarea/storefront/products/_summary.html.haml +12 -0
- data/app/views/workarea/storefront/products/details.html.haml +2 -0
- data/app/views/workarea/storefront/products/show.html.haml +48 -0
- data/app/views/workarea/storefront/products/templates/_generic.html.haml +69 -0
- data/app/views/workarea/storefront/products/templates/_option_selects.html.haml +70 -0
- data/app/views/workarea/storefront/products/templates/_option_thumbnails.html.haml +76 -0
- data/app/views/workarea/storefront/products/templates/_test.html.haml +1 -0
- data/app/views/workarea/storefront/recent_views/aside.html.haml +25 -0
- data/app/views/workarea/storefront/recent_views/narrow.html.haml +25 -0
- data/app/views/workarea/storefront/recent_views/show.html.haml +27 -0
- data/app/views/workarea/storefront/recommendations/show.html.haml +12 -0
- data/app/views/workarea/storefront/searches/index.json.jbuilder +1 -0
- data/app/views/workarea/storefront/searches/no_results.html.haml +31 -0
- data/app/views/workarea/storefront/searches/show.html.haml +99 -0
- data/app/views/workarea/storefront/shared/_address_fields.html.haml +105 -0
- data/app/views/workarea/storefront/shared/_left_navigation.html.haml +24 -0
- data/app/views/workarea/storefront/shared/_message.html.haml +4 -0
- data/app/views/workarea/storefront/sitemaps/_pagination.html.haml +37 -0
- data/app/views/workarea/storefront/sitemaps/show.html.haml +36 -0
- data/app/views/workarea/storefront/style_guides/_navigation.html.haml +11 -0
- data/app/views/workarea/storefront/style_guides/base/_forms.html.haml +82 -0
- data/app/views/workarea/storefront/style_guides/base/_tables.html.haml +63 -0
- data/app/views/workarea/storefront/style_guides/components/_box.html.haml +26 -0
- data/app/views/workarea/storefront/style_guides/components/_breadcrumbs.html.haml +12 -0
- data/app/views/workarea/storefront/style_guides/components/_button.html.haml +50 -0
- data/app/views/workarea/storefront/style_guides/components/_button_content_block.html.haml +20 -0
- data/app/views/workarea/storefront/style_guides/components/_button_property.html.haml +83 -0
- data/app/views/workarea/storefront/style_guides/components/_category_summary_content_block.html.haml +29 -0
- data/app/views/workarea/storefront/style_guides/components/_data_card.html.haml +215 -0
- data/app/views/workarea/storefront/style_guides/components/_divider_content_block.html.haml +40 -0
- data/app/views/workarea/storefront/style_guides/components/_hero_content_block.html.haml +29 -0
- data/app/views/workarea/storefront/style_guides/components/_html_content_block.html.haml +10 -0
- data/app/views/workarea/storefront/style_guides/components/_image_and_text_content_block.html.haml +28 -0
- data/app/views/workarea/storefront/style_guides/components/_image_content_block.html.haml +38 -0
- data/app/views/workarea/storefront/style_guides/components/_image_group_content_block.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/components/_inline_form.html.haml +18 -0
- data/app/views/workarea/storefront/style_guides/components/_loading.html.haml +106 -0
- data/app/views/workarea/storefront/style_guides/components/_message.html.haml +45 -0
- data/app/views/workarea/storefront/style_guides/components/_mobile_filters.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/components/_pagination.html.haml +24 -0
- data/app/views/workarea/storefront/style_guides/components/_payment_icon.html.haml +19 -0
- data/app/views/workarea/storefront/style_guides/components/_personalized_recommendations_content_block.html.haml +32 -0
- data/app/views/workarea/storefront/style_guides/components/_product_insights_content_block.html.haml +32 -0
- data/app/views/workarea/storefront/style_guides/components/_product_list.html.haml +302 -0
- data/app/views/workarea/storefront/style_guides/components/_product_list_content_block.html.haml +32 -0
- data/app/views/workarea/storefront/style_guides/components/_product_prices.html.haml +79 -0
- data/app/views/workarea/storefront/style_guides/components/_product_summary.html.haml +35 -0
- data/app/views/workarea/storefront/style_guides/components/_property.html.haml +93 -0
- data/app/views/workarea/storefront/style_guides/components/_quote_content_block.html.haml +18 -0
- data/app/views/workarea/storefront/style_guides/components/_recommendations.html.haml +34 -0
- data/app/views/workarea/storefront/style_guides/components/_social_networks_content_block.html.haml +20 -0
- data/app/views/workarea/storefront/style_guides/components/_svg_icon.html.haml +51 -0
- data/app/views/workarea/storefront/style_guides/components/_table.html.haml +112 -0
- data/app/views/workarea/storefront/style_guides/components/_taxonomy_content_block.html.haml +205 -0
- data/app/views/workarea/storefront/style_guides/components/_text_box.html.haml +73 -0
- data/app/views/workarea/storefront/style_guides/components/_text_button.html.haml +26 -0
- data/app/views/workarea/storefront/style_guides/components/_text_content_block.html.haml +10 -0
- data/app/views/workarea/storefront/style_guides/components/_ui_autocomplete.html.haml +11 -0
- data/app/views/workarea/storefront/style_guides/components/_ui_dialog.html.haml +5 -0
- data/app/views/workarea/storefront/style_guides/components/_ui_dialog_image.html.haml +5 -0
- data/app/views/workarea/storefront/style_guides/components/_ui_helper_hidden_accessible.html.haml +6 -0
- data/app/views/workarea/storefront/style_guides/components/_value.html.haml +70 -0
- data/app/views/workarea/storefront/style_guides/components/_video_and_text_content_block.html.haml +21 -0
- data/app/views/workarea/storefront/style_guides/components/_video_content_block.html.haml +11 -0
- data/app/views/workarea/storefront/style_guides/index.html.haml +87 -0
- data/app/views/workarea/storefront/style_guides/objects/_button_reset.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/objects/_inline_list.html.haml +20 -0
- data/app/views/workarea/storefront/style_guides/objects/_list_reset.html.haml +20 -0
- data/app/views/workarea/storefront/style_guides/objects/_text_field_reset.html.haml +11 -0
- data/app/views/workarea/storefront/style_guides/settings/_color_variables.html.haml +21 -0
- data/app/views/workarea/storefront/style_guides/show.html.haml +10 -0
- data/app/views/workarea/storefront/style_guides/trumps/_break_word.html.haml +15 -0
- data/app/views/workarea/storefront/style_guides/trumps/_clearfix.html.haml +21 -0
- data/app/views/workarea/storefront/style_guides/trumps/_hidden.html.haml +97 -0
- data/app/views/workarea/storefront/style_guides/trumps/_hidden_if_js_enabled.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/trumps/_image_replacement.html.haml +13 -0
- data/app/views/workarea/storefront/style_guides/trumps/_truncate.html.haml +13 -0
- data/app/views/workarea/storefront/style_guides/trumps/_visible.html.haml +97 -0
- data/app/views/workarea/storefront/style_guides/trumps/_visually_hidden.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/typography/_align.html.haml +25 -0
- data/app/views/workarea/storefront/style_guides/typography/_fonts.html.haml +9 -0
- data/app/views/workarea/storefront/style_guides/typography/_headings.html.haml +25 -0
- data/app/views/workarea/storefront/style_guides/typography/_links.html.haml +13 -0
- data/app/views/workarea/storefront/style_guides/typography/_text.html.haml +23 -0
- data/app/views/workarea/storefront/users/accounts/edit.html.haml +42 -0
- data/app/views/workarea/storefront/users/accounts/show.html.haml +118 -0
- data/app/views/workarea/storefront/users/addresses/edit.html.haml +24 -0
- data/app/views/workarea/storefront/users/addresses/new.html.haml +24 -0
- data/app/views/workarea/storefront/users/credit_cards/edit.html.haml +65 -0
- data/app/views/workarea/storefront/users/credit_cards/new.html.haml +58 -0
- data/app/views/workarea/storefront/users/current_user.json.jbuilder +8 -0
- data/app/views/workarea/storefront/users/logins/new.html.haml +51 -0
- data/app/views/workarea/storefront/users/orders/_summary.html.haml +23 -0
- data/app/views/workarea/storefront/users/orders/index.html.haml +21 -0
- data/app/views/workarea/storefront/users/orders/show.html.haml +19 -0
- data/app/views/workarea/storefront/users/passwords/change.html.haml +21 -0
- data/app/views/workarea/storefront/users/passwords/edit.html.haml +13 -0
- data/app/views/workarea/storefront/users/passwords/new.html.haml +24 -0
- data/bin/rails +18 -0
- data/config/locales/en.yml +403 -0
- data/config/routes.rb +110 -0
- data/lib/workarea/mailer_previews/storefront/account_mailer_preview.rb +16 -0
- data/lib/workarea/mailer_previews/storefront/fulfillment_mailer_preview.rb +27 -0
- data/lib/workarea/mailer_previews/storefront/inquiry_mailer_preview.rb +9 -0
- data/lib/workarea/mailer_previews/storefront/order_mailer_preview.rb +16 -0
- data/lib/workarea/mailer_previews/storefront/payment_mailer_preview.rb +9 -0
- data/lib/workarea/storefront.rb +7 -0
- data/lib/workarea/storefront/engine.rb +8 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +5 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +34 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +22 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +9 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +51 -0
- data/test/dummy/config/environments/production.rb +86 -0
- data/test/dummy/config/environments/test.rb +43 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
- data/test/dummy/config/initializers/assets.rb +11 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/new_framework_defaults.rb +17 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/workarea.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/puma.rb +47 -0
- data/test/dummy/config/routes.rb +8 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/db/seeds.rb +10 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +1 -0
- data/test/helpers/workarea/storefront/application_helper_test.rb +25 -0
- data/test/helpers/workarea/storefront/content_helper_test.rb +50 -0
- data/test/helpers/workarea/storefront/credit_cards_helper_test.rb +29 -0
- data/test/helpers/workarea/storefront/navigation_helper_test.rb +85 -0
- data/test/helpers/workarea/storefront/pagination_helper_test.rb +27 -0
- data/test/helpers/workarea/storefront/products_helper_test.rb +43 -0
- data/test/integration/workarea/storefront/accounts_integration_test.rb +128 -0
- data/test/integration/workarea/storefront/analytics_integration_test.rb +32 -0
- data/test/integration/workarea/storefront/browse_images_integration_test.rb +71 -0
- data/test/integration/workarea/storefront/cart_integration_test.rb +109 -0
- data/test/integration/workarea/storefront/cart_items_integration_test.rb +330 -0
- data/test/integration/workarea/storefront/categories_integration_test.rb +21 -0
- data/test/integration/workarea/storefront/checkout_side_effects_integration_test.rb +214 -0
- data/test/integration/workarea/storefront/checkout_with_pricing_override_integration_test.rb +168 -0
- data/test/integration/workarea/storefront/checkouts_integration_test.rb +267 -0
- data/test/integration/workarea/storefront/contact_form_integration_test.rb +33 -0
- data/test/integration/workarea/storefront/content_blocks_integration_test.rb +71 -0
- data/test/integration/workarea/storefront/current_checkout_integration_test.rb +30 -0
- data/test/integration/workarea/storefront/current_user_integration_test.rb +28 -0
- data/test/integration/workarea/storefront/email_signups_integration_test.rb +25 -0
- data/test/integration/workarea/storefront/errors_integration_test.rb +137 -0
- data/test/integration/workarea/storefront/favicons_integration_test.rb +16 -0
- data/test/integration/workarea/storefront/guest_browsing_integration_test.rb +24 -0
- data/test/integration/workarea/storefront/head_tags_integration_test.rb +127 -0
- data/test/integration/workarea/storefront/health_check_integration_test.rb +13 -0
- data/test/integration/workarea/storefront/host_integration_test.rb +32 -0
- data/test/integration/workarea/storefront/impersonations_integration_test.rb +128 -0
- data/test/integration/workarea/storefront/layout_integration_test.rb +29 -0
- data/test/integration/workarea/storefront/login_integration_test.rb +157 -0
- data/test/integration/workarea/storefront/order_data_integration_test.rb +264 -0
- data/test/integration/workarea/storefront/order_lookup_integration_test.rb +117 -0
- data/test/integration/workarea/storefront/pages_integration_test.rb +56 -0
- data/test/integration/workarea/storefront/place_order_integration_test.rb +140 -0
- data/test/integration/workarea/storefront/placing_order_integration_test.rb +92 -0
- data/test/integration/workarea/storefront/products_integration_test.rb +36 -0
- data/test/integration/workarea/storefront/search_integration_test.rb +128 -0
- data/test/integration/workarea/storefront/store_credit_integration_test.rb +121 -0
- data/test/integration/workarea/storefront/users/addresses_integration_test.rb +136 -0
- data/test/integration/workarea/storefront/users/credit_cards_integration_test.rb +96 -0
- data/test/integration/workarea/storefront/users/orders_integration_test.rb +15 -0
- data/test/integration/workarea/storefront/users/passwords_integration_test.rb +48 -0
- data/test/javascripts/address_region_fields_spec.js +46 -0
- data/test/javascripts/analytics_spec.js +91 -0
- data/test/javascripts/authenticity_token_spec.js +26 -0
- data/test/javascripts/back_to_top_button_spec.js +41 -0
- data/test/javascripts/break_points_spec.js +41 -0
- data/test/javascripts/checkout_primary_payments_spec.js +32 -0
- data/test/javascripts/dialog_spec.js +347 -0
- data/test/javascripts/fixtures/address_region_fields.html.haml +17 -0
- data/test/javascripts/fixtures/analytics_add_to_cart_form.html.haml +12 -0
- data/test/javascripts/fixtures/analytics_product_click.html.haml +7 -0
- data/test/javascripts/fixtures/authenticity_token.html.haml +2 -0
- data/test/javascripts/fixtures/back_to_top_button.html.haml +2 -0
- data/test/javascripts/fixtures/checkout_primary_payments.html.haml +12 -0
- data/test/javascripts/fixtures/dialog.html.haml +16 -0
- data/test/javascripts/fixtures/form.html.haml +10 -0
- data/test/javascripts/fixtures/optional_fields.html.haml +4 -0
- data/test/javascripts/fixtures/popup_button.html.haml +1 -0
- data/test/javascripts/fixtures/product_details_sku_select.html.haml +8 -0
- data/test/javascripts/fixtures/product_details_sku_select_without_sku_option_details.html.haml +7 -0
- data/test/javascripts/fixtures/scroll_to_element.html.haml +19 -0
- data/test/javascripts/forms_spec.js +85 -0
- data/test/javascripts/messages_spec.js +50 -0
- data/test/javascripts/optional_fields_spec.js +20 -0
- data/test/javascripts/popup_button_spec.js +19 -0
- data/test/javascripts/product_details_sku_selects_spec.js +154 -0
- data/test/javascripts/scroll_to_buttons_spec.js +46 -0
- data/test/javascripts/spec_helper.js +2 -0
- data/test/javascripts/traffic_referrer_spec.js +33 -0
- data/test/mailers/workarea/storefront/transactional_mailer_test.rb +29 -0
- data/test/performance/workarea/storefront/cart_performance_test.rb +52 -0
- data/test/performance/workarea/storefront/categories_performance_test.rb +26 -0
- data/test/performance/workarea/storefront/pages_performance_test.rb +31 -0
- data/test/performance/workarea/storefront/products_performance_test.rb +19 -0
- data/test/performance/workarea/storefront/search_performance_test.rb +27 -0
- data/test/system/workarea/storefront/accounts_system_test.rb +97 -0
- data/test/system/workarea/storefront/addresses_system_test.rb +60 -0
- data/test/system/workarea/storefront/analytics_system_test.rb +725 -0
- data/test/system/workarea/storefront/cart_items_system_test.rb +117 -0
- data/test/system/workarea/storefront/cart_system_test.rb +93 -0
- data/test/system/workarea/storefront/categories_system_test.rb +258 -0
- data/test/system/workarea/storefront/content_system_test.rb +114 -0
- data/test/system/workarea/storefront/credit_cards_system_test.rb +77 -0
- data/test/system/workarea/storefront/customer_service_system_test.rb +21 -0
- data/test/system/workarea/storefront/digital_products_system_test.rb +140 -0
- data/test/system/workarea/storefront/discounting_multiple_system_test.rb +87 -0
- data/test/system/workarea/storefront/discounting_system_test.rb +292 -0
- data/test/system/workarea/storefront/email_signup_system_test.rb +19 -0
- data/test/system/workarea/storefront/fulfillment_system_test.rb +78 -0
- data/test/system/workarea/storefront/guest_checkout_system_test.rb +426 -0
- data/test/system/workarea/storefront/logged_in_checkout_system_test.rb +336 -0
- data/test/system/workarea/storefront/login_system_test.rb +157 -0
- data/test/system/workarea/storefront/navigation_system_test.rb +73 -0
- data/test/system/workarea/storefront/no_js_system_test.rb +84 -0
- data/test/system/workarea/storefront/orders_system_test.rb +84 -0
- data/test/system/workarea/storefront/pages_system_test.rb +61 -0
- data/test/system/workarea/storefront/pagination_system_test.rb +129 -0
- data/test/system/workarea/storefront/passwords_system_test.rb +158 -0
- data/test/system/workarea/storefront/pricing_overrides_system_test.rb +45 -0
- data/test/system/workarea/storefront/products_system_test.rb +241 -0
- data/test/system/workarea/storefront/recommendations_system_test.rb +85 -0
- data/test/system/workarea/storefront/release_browsing_system_test.rb +73 -0
- data/test/system/workarea/storefront/search_system_test.rb +267 -0
- data/test/system/workarea/storefront/sitemap_system_test.rb +57 -0
- data/test/system/workarea/storefront/store_credit_system_test.rb +166 -0
- data/test/system/workarea/storefront/style_guides_system_test.rb +16 -0
- data/test/teaspoon_env.rb +10 -0
- data/test/test_helper.rb +10 -0
- data/test/view_models/workarea/storefront/cart_view_model_test.rb +36 -0
- data/test/view_models/workarea/storefront/category_view_model_test.rb +59 -0
- data/test/view_models/workarea/storefront/checkout/addresses_view_model_test.rb +16 -0
- data/test/view_models/workarea/storefront/checkout/payment_view_model_test.rb +76 -0
- data/test/view_models/workarea/storefront/checkout/summary_view_model_test.rb +29 -0
- data/test/view_models/workarea/storefront/content_block_view_model_test.rb +86 -0
- data/test/view_models/workarea/storefront/content_blocks/category_summary_view_model_test.rb +35 -0
- data/test/view_models/workarea/storefront/content_blocks/navigation_view_model_test.rb +53 -0
- data/test/view_models/workarea/storefront/content_blocks/product_insights_view_model_test.rb +73 -0
- data/test/view_models/workarea/storefront/content_blocks/product_list_view_model_test.rb +24 -0
- data/test/view_models/workarea/storefront/content_blocks/taxonomy_view_model_test.rb +81 -0
- data/test/view_models/workarea/storefront/content_blocks/video_view_model_test.rb +89 -0
- data/test/view_models/workarea/storefront/display_content_test.rb +105 -0
- data/test/view_models/workarea/storefront/fulfillment_item_view_model_test.rb +18 -0
- data/test/view_models/workarea/storefront/inventory_status_view_model_test.rb +39 -0
- data/test/view_models/workarea/storefront/option_set_view_model_test.rb +158 -0
- data/test/view_models/workarea/storefront/order_item_view_model_test.rb +49 -0
- data/test/view_models/workarea/storefront/order_view_model_test.rb +84 -0
- data/test/view_models/workarea/storefront/package_view_model_test.rb +32 -0
- data/test/view_models/workarea/storefront/product_templates/option_thumbnails_view_model_test.rb +25 -0
- data/test/view_models/workarea/storefront/product_view_model/cache_key_test.rb +16 -0
- data/test/view_models/workarea/storefront/product_view_model/image_collection_test.rb +93 -0
- data/test/view_models/workarea/storefront/product_view_model/option_set_test.rb +379 -0
- data/test/view_models/workarea/storefront/product_view_model/sku_options_test.rb +35 -0
- data/test/view_models/workarea/storefront/product_view_model_test.rb +235 -0
- data/test/view_models/workarea/storefront/recommendations_view_model_test.rb +62 -0
- data/test/view_models/workarea/storefront/refund_view_model_test.rb +23 -0
- data/test/view_models/workarea/storefront/search_suggestion_view_model_test.rb +42 -0
- data/test/view_models/workarea/storefront/search_view_model_test.rb +57 -0
- data/test/view_models/workarea/storefront/shipping_view_model_test.rb +29 -0
- data/test/view_models/workarea/storefront/user_activity_view_model_test.rb +65 -0
- data/test/view_models/workarea/storefront/user_view_model_test.rb +35 -0
- data/workarea-storefront.gemspec +16 -0
- metadata +742 -0
@@ -0,0 +1,73 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class NavigationSystemTest < Workarea::SystemTest
|
6
|
+
include BreakpointHelpers
|
7
|
+
setup :set_navigation_menu
|
8
|
+
|
9
|
+
def set_navigation_menu
|
10
|
+
first_level = create_taxon(
|
11
|
+
name: 'First Level',
|
12
|
+
url: 'http://example.com'
|
13
|
+
)
|
14
|
+
|
15
|
+
second_level = first_level.children.create!(
|
16
|
+
name: 'Second Level',
|
17
|
+
url: 'http://www.example.com'
|
18
|
+
)
|
19
|
+
|
20
|
+
menu = create_menu(taxon: first_level)
|
21
|
+
|
22
|
+
content = Content.for(menu)
|
23
|
+
content.blocks.create!(
|
24
|
+
type: 'taxonomy',
|
25
|
+
data: { 'start' => second_level.id }
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_desktop_navigation_menus
|
30
|
+
visit storefront.root_path
|
31
|
+
assert(page.has_content?('First Level'))
|
32
|
+
|
33
|
+
find('li.primary-nav__item').hover
|
34
|
+
assert(page.has_content?('Second Level'))
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_mobile_navigation_menus
|
38
|
+
resize_window_to('small')
|
39
|
+
|
40
|
+
leaf = create_taxon(name: 'Leaf', url: 'http://example.com')
|
41
|
+
menu = create_menu(taxon: leaf)
|
42
|
+
content = Content.for(menu)
|
43
|
+
content.blocks.create!(type: 'text', data: { text: 'Foo' })
|
44
|
+
|
45
|
+
visit storefront.root_path
|
46
|
+
click_link 'mobile_nav_button'
|
47
|
+
|
48
|
+
click_link 'First Level'
|
49
|
+
assert(page.has_content?('Second Level'))
|
50
|
+
|
51
|
+
click_link '←'
|
52
|
+
click_link 'Leaf'
|
53
|
+
assert(page.has_content?('Foo'))
|
54
|
+
assert_current_path(storefront.root_path)
|
55
|
+
|
56
|
+
page.execute_script("$('body').trigger('click');")
|
57
|
+
refute(page.has_content?('Foo'))
|
58
|
+
end
|
59
|
+
|
60
|
+
def test_left_navigation
|
61
|
+
primary = create_taxon(navigable: create_page(show_navigation: true))
|
62
|
+
secondary = primary.children.create!(navigable: create_category(name: 'Foo'))
|
63
|
+
|
64
|
+
visit storefront.page_path(primary.navigable)
|
65
|
+
assert(page.has_content?('Foo'))
|
66
|
+
|
67
|
+
secondary.navigable.update_attributes!(active: false)
|
68
|
+
visit storefront.page_path(primary.navigable)
|
69
|
+
refute(page.has_content?('Foo'))
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class NoJsSystemTest < Workarea::SystemTest
|
6
|
+
include Storefront::SystemTest
|
7
|
+
|
8
|
+
driven_by :rack_test
|
9
|
+
|
10
|
+
def test_successfully_completing_checkout
|
11
|
+
setup_checkout_specs
|
12
|
+
start_guest_checkout
|
13
|
+
|
14
|
+
assert_current_path(storefront.checkout_addresses_path)
|
15
|
+
click_button t('workarea.storefront.checkouts.continue_to_shipping')
|
16
|
+
assert_current_path(storefront.checkout_addresses_path)
|
17
|
+
assert(page.has_content?('Error'))
|
18
|
+
|
19
|
+
fill_in_email
|
20
|
+
fill_in_shipping_address
|
21
|
+
fill_in 'shipping_address[region]', with: 'PA'
|
22
|
+
fill_in_billing_address
|
23
|
+
fill_in 'billing_address[region]', with: 'PA'
|
24
|
+
click_button t('workarea.storefront.checkouts.continue_to_shipping')
|
25
|
+
|
26
|
+
assert_current_path(storefront.checkout_shipping_path)
|
27
|
+
assert(page.has_content?('Success'))
|
28
|
+
click_button t('workarea.storefront.checkouts.continue_to_payment')
|
29
|
+
|
30
|
+
assert_current_path(storefront.checkout_payment_path)
|
31
|
+
assert(page.has_content?('Success'))
|
32
|
+
|
33
|
+
assert(page.has_content?('22 S. 3rd St.'))
|
34
|
+
assert(page.has_content?('Philadelphia'))
|
35
|
+
assert(page.has_content?('PA'))
|
36
|
+
assert(page.has_content?('19106'))
|
37
|
+
assert(page.has_content?('Ground'))
|
38
|
+
|
39
|
+
assert(page.has_content?('Integration Product'))
|
40
|
+
assert(page.has_content?('SKU'))
|
41
|
+
|
42
|
+
assert(page.has_content?('$5.00')) # Subtotal
|
43
|
+
assert(page.has_content?('$7.00')) # Shipping
|
44
|
+
assert(page.has_content?('$0.84')) # Tax
|
45
|
+
assert(page.has_content?('$12.84')) # Total
|
46
|
+
|
47
|
+
click_button t('workarea.storefront.checkouts.place_order')
|
48
|
+
assert_current_path(storefront.checkout_place_order_path)
|
49
|
+
assert(page.has_content?('Error'))
|
50
|
+
|
51
|
+
fill_in_credit_card
|
52
|
+
click_button t('workarea.storefront.checkouts.place_order')
|
53
|
+
|
54
|
+
assert_current_path(storefront.checkout_confirmation_path)
|
55
|
+
|
56
|
+
assert(page.has_content?('Success'))
|
57
|
+
assert(page.has_content?('Thanks'))
|
58
|
+
assert(page.has_content?(Order.first.id))
|
59
|
+
|
60
|
+
assert(page.has_content?('22 S. 3rd St.'))
|
61
|
+
assert(page.has_content?('Philadelphia'))
|
62
|
+
assert(page.has_content?('PA'))
|
63
|
+
assert(page.has_content?('19106'))
|
64
|
+
assert(page.has_content?('Ground'))
|
65
|
+
|
66
|
+
assert(page.has_content?('1019 S. 47th St.'))
|
67
|
+
assert(page.has_content?('Philadelphia'))
|
68
|
+
assert(page.has_content?('PA'))
|
69
|
+
assert(page.has_content?('19143'))
|
70
|
+
|
71
|
+
assert(page.has_content?('Test Card'))
|
72
|
+
assert(page.has_content?('XX-1'))
|
73
|
+
|
74
|
+
assert(page.has_content?('Integration Product'))
|
75
|
+
assert(page.has_content?('SKU'))
|
76
|
+
|
77
|
+
assert(page.has_content?('$5.00')) # Subtotal
|
78
|
+
assert(page.has_content?('$7.00')) # Shipping
|
79
|
+
assert(page.has_content?('$0.84')) # Tax
|
80
|
+
assert(page.has_content?('$12.84')) # Total
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class OrdersSystemTest < Workarea::SystemTest
|
6
|
+
setup :set_user
|
7
|
+
setup :set_order
|
8
|
+
setup :set_fulfillment
|
9
|
+
|
10
|
+
def set_user
|
11
|
+
@user = create_user(email: 'existing-account@workarea.com', password: 'W3bl1nc!')
|
12
|
+
end
|
13
|
+
|
14
|
+
def set_order
|
15
|
+
@order = create_placed_order(
|
16
|
+
id: '1234',
|
17
|
+
email: 'existing-account@workarea.com',
|
18
|
+
user_id: @user.id
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
def set_fulfillment
|
23
|
+
create_fulfillment = CreateFulfillment.new(@order)
|
24
|
+
create_fulfillment.perform
|
25
|
+
create_fulfillment.fulfillment.ship_items('1Z111', [
|
26
|
+
{ 'id' => @order.items.first.id, 'quantity' => @order.items.first.quantity }
|
27
|
+
])
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_returning_customer
|
31
|
+
visit storefront.check_orders_path
|
32
|
+
|
33
|
+
within '#login_form' do
|
34
|
+
fill_in 'email', with: 'existing-account@workarea.com'
|
35
|
+
fill_in 'password', with: 'W3bl1nc!'
|
36
|
+
click_button t('workarea.storefront.users.login')
|
37
|
+
end
|
38
|
+
|
39
|
+
assert(page.has_content?(@order.id))
|
40
|
+
assert(page.has_content?(t('workarea.storefront.orders.track_package')))
|
41
|
+
|
42
|
+
assert_current_path(storefront.users_orders_path)
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_single_order_lookup
|
46
|
+
visit storefront.check_orders_path
|
47
|
+
|
48
|
+
within '#single_order_lookup_form' do
|
49
|
+
fill_in 'order_id', with: '1234'
|
50
|
+
fill_in 'postal_code', with: '19106'
|
51
|
+
click_button t('workarea.storefront.orders.lookup_order')
|
52
|
+
end
|
53
|
+
|
54
|
+
assert_current_path(storefront.order_path('1234'))
|
55
|
+
|
56
|
+
assert(page.has_content?('1234'))
|
57
|
+
assert(page.has_content?('Shipped'))
|
58
|
+
assert(page.has_content?(t('workarea.storefront.orders.track_package')))
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_showing_refunds
|
62
|
+
payment = Payment.find(@order.id)
|
63
|
+
amounts = payment.tenders.reduce({}) { |m, t| m.merge(t.id => t.amount) }
|
64
|
+
|
65
|
+
Payment::Capture.new(payment: payment, amounts: amounts).complete!
|
66
|
+
Payment::Refund.new(payment: payment, amounts: amounts).complete!
|
67
|
+
|
68
|
+
visit storefront.check_orders_path
|
69
|
+
|
70
|
+
within '#single_order_lookup_form' do
|
71
|
+
fill_in 'order_id', with: '1234'
|
72
|
+
fill_in 'postal_code', with: '19106'
|
73
|
+
click_button t('workarea.storefront.orders.lookup_order')
|
74
|
+
end
|
75
|
+
|
76
|
+
assert_current_path(storefront.order_path('1234'))
|
77
|
+
|
78
|
+
assert(page.has_content?('1234'))
|
79
|
+
assert(page.has_content?(t('workarea.storefront.orders.refunds')))
|
80
|
+
assert(page.has_content?(t('workarea.storefront.orders.issued')))
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class PagesSystemTest < Workarea::SystemTest
|
6
|
+
setup :set_content_page
|
7
|
+
|
8
|
+
def set_content_page
|
9
|
+
@content_page = create_page(name: 'Integration Page')
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_showing_the_home_page
|
13
|
+
create_content(
|
14
|
+
name: 'home_page',
|
15
|
+
blocks: [
|
16
|
+
{
|
17
|
+
type_id: 'html',
|
18
|
+
data: { html: 'Home Page Product' }
|
19
|
+
}
|
20
|
+
]
|
21
|
+
)
|
22
|
+
|
23
|
+
visit storefront.root_path
|
24
|
+
assert(page.has_content?('Home Page Product'))
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_showing_the_page
|
28
|
+
visit storefront.page_path(@content_page)
|
29
|
+
assert(page.has_content?('Integration Page'))
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_rendering_left_navigation
|
33
|
+
top_level = create_taxon(name: 'Foo Taxon', url: 'http://example.com')
|
34
|
+
create_taxon(parent: top_level, name: 'Foo Taxon', navigable: @content_page)
|
35
|
+
@content_page.update_attributes!(show_navigation: true)
|
36
|
+
|
37
|
+
visit storefront.page_path(@content_page)
|
38
|
+
within '.page-content__aside' do
|
39
|
+
assert(page.has_content?('Foo Taxon'))
|
40
|
+
end
|
41
|
+
|
42
|
+
@content_page.update_attributes!(show_navigation: false)
|
43
|
+
|
44
|
+
visit storefront.page_path(@content_page)
|
45
|
+
assert(page.has_no_selector?('.page-content__aside'))
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_showing_custom_page_templates
|
49
|
+
product = create_product(name: 'Integration Page', template: 'test')
|
50
|
+
visit storefront.product_path(product)
|
51
|
+
assert(page.has_content?('This is for testing custom template rendering'))
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_rendering_robots_txt
|
55
|
+
visit storefront.robots_txt_path
|
56
|
+
assert(page.has_content?('User-Agent: *'))
|
57
|
+
assert(page.has_content?('Disallow: /')) # since this is the test env
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,129 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class PaginationSystemTest < Workarea::SystemTest
|
6
|
+
setup :set_config
|
7
|
+
setup :set_products
|
8
|
+
setup :set_search_settings
|
9
|
+
teardown :reset_config
|
10
|
+
|
11
|
+
def set_config
|
12
|
+
@per_page = Workarea.config.per_page
|
13
|
+
Workarea.config.per_page = 1
|
14
|
+
|
15
|
+
# Due to 5 XHR requests to load pages, these tests are slow on the build
|
16
|
+
# server and headless Chrome.
|
17
|
+
@default_max_wait_time = Capybara.default_max_wait_time
|
18
|
+
Capybara.default_max_wait_time = 30
|
19
|
+
end
|
20
|
+
|
21
|
+
def reset_config
|
22
|
+
Workarea.config.per_page = @per_page
|
23
|
+
Capybara.default_max_wait_time = @default_max_wait_time
|
24
|
+
end
|
25
|
+
|
26
|
+
def set_products
|
27
|
+
@products =
|
28
|
+
[
|
29
|
+
create_product(id: 'PROD1', name: 'Product 1'),
|
30
|
+
create_product(id: 'PROD2', name: 'Product 2'),
|
31
|
+
create_product(id: 'PROD3', name: 'Product 3'),
|
32
|
+
create_product(id: 'PROD4', name: 'Product 4'),
|
33
|
+
create_product(id: 'PROD5', name: 'Product 5'),
|
34
|
+
create_product(id: 'PROD6', name: 'Product 6')
|
35
|
+
]
|
36
|
+
end
|
37
|
+
|
38
|
+
def set_search_settings
|
39
|
+
update_search_settings
|
40
|
+
end
|
41
|
+
|
42
|
+
def categorize_products(category)
|
43
|
+
category.update_attributes!(
|
44
|
+
product_ids: @products.map(&:id)
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_category_pagination
|
49
|
+
category = create_category
|
50
|
+
categorize_products(category)
|
51
|
+
|
52
|
+
visit storefront.category_path(category)
|
53
|
+
|
54
|
+
assert(page.has_content?('Product 1'))
|
55
|
+
assert(page.has_content?('Product 2'))
|
56
|
+
assert(page.has_content?('Product 3'))
|
57
|
+
assert(page.has_content?('Product 4'))
|
58
|
+
assert(page.has_content?('Product 5'))
|
59
|
+
|
60
|
+
scroll_to_bottom
|
61
|
+
|
62
|
+
refute(page.has_content?(t('workarea.storefront.pagination.next_page')))
|
63
|
+
click_link t('workarea.storefront.pagination.load_more')
|
64
|
+
|
65
|
+
assert_current_path(storefront.category_path(category))
|
66
|
+
assert(page.has_content?('Product 1'))
|
67
|
+
assert(page.has_content?('Product 2'))
|
68
|
+
assert(page.has_content?('Product 3'))
|
69
|
+
assert(page.has_content?('Product 4'))
|
70
|
+
assert(page.has_content?('Product 5'))
|
71
|
+
assert(page.has_content?('Product 6'))
|
72
|
+
|
73
|
+
refute(page.has_content?(t('workarea.storefront.pagination.load_more')))
|
74
|
+
|
75
|
+
find('a', text: 'Product 6').click
|
76
|
+
page.execute_script("history.back()")
|
77
|
+
|
78
|
+
assert_current_path(storefront.category_path(category))
|
79
|
+
|
80
|
+
wait_for_xhr
|
81
|
+
|
82
|
+
refute(page.has_content?(t('workarea.storefront.pagination.load_more')))
|
83
|
+
|
84
|
+
assert_match(/PROD1.*PROD2.*PROD3.*PROD4.*PROD5.*PROD6/m, page.html)
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_search_pagination
|
88
|
+
visit storefront.search_path(q: 'Product')
|
89
|
+
|
90
|
+
assert(page.has_content?('Product 1'))
|
91
|
+
assert(page.has_content?('Product 2'))
|
92
|
+
assert(page.has_content?('Product 3'))
|
93
|
+
assert(page.has_content?('Product 4'))
|
94
|
+
assert(page.has_content?('Product 5'))
|
95
|
+
|
96
|
+
scroll_to_bottom
|
97
|
+
|
98
|
+
refute(page.has_content?(t('workarea.storefront.pagination.next_page')))
|
99
|
+
click_link t('workarea.storefront.pagination.load_more')
|
100
|
+
|
101
|
+
assert_current_path(storefront.search_path(q: 'Product'))
|
102
|
+
assert(page.has_content?('Product 1'))
|
103
|
+
assert(page.has_content?('Product 2'))
|
104
|
+
assert(page.has_content?('Product 3'))
|
105
|
+
assert(page.has_content?('Product 4'))
|
106
|
+
assert(page.has_content?('Product 5'))
|
107
|
+
assert(page.has_content?('Product 6'))
|
108
|
+
|
109
|
+
refute(page.has_content?(t('workarea.storefront.pagination.load_more')))
|
110
|
+
|
111
|
+
find('a', text: 'Product 6').click
|
112
|
+
page.execute_script("history.back()")
|
113
|
+
|
114
|
+
assert_current_path(storefront.search_path(q: 'Product'))
|
115
|
+
|
116
|
+
wait_for_xhr
|
117
|
+
|
118
|
+
refute(page.has_content?(t('workarea.storefront.pagination.load_more')))
|
119
|
+
|
120
|
+
assert(page.has_content?('Product 1'))
|
121
|
+
assert(page.has_content?('Product 2'))
|
122
|
+
assert(page.has_content?('Product 3'))
|
123
|
+
assert(page.has_content?('Product 4'))
|
124
|
+
assert(page.has_content?('Product 5'))
|
125
|
+
assert(page.has_content?('Product 6'))
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
@@ -0,0 +1,158 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Storefront
|
5
|
+
class PasswordsSystemTest < Workarea::SystemTest
|
6
|
+
setup :set_customer_email
|
7
|
+
setup :set_admin_email
|
8
|
+
setup :set_password
|
9
|
+
setup :set_customer_user
|
10
|
+
setup :set_admin_user
|
11
|
+
|
12
|
+
def set_customer_email
|
13
|
+
@customer_email = 'test@workarea.com'
|
14
|
+
end
|
15
|
+
|
16
|
+
def set_admin_email
|
17
|
+
@admin_email = 'test-admin@workarea.com'
|
18
|
+
end
|
19
|
+
|
20
|
+
def set_password
|
21
|
+
@password = 'P@ssw0rd!!'
|
22
|
+
end
|
23
|
+
|
24
|
+
def set_customer_user
|
25
|
+
@customer_user = create_user(email: @customer_email, password: 'W3bl1nc!')
|
26
|
+
end
|
27
|
+
|
28
|
+
def set_admin_user
|
29
|
+
create_user(
|
30
|
+
email: @admin_email,
|
31
|
+
password: 'W3bl1nc!',
|
32
|
+
admin: true
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_customer_resetting_a_password
|
37
|
+
visit storefront.forgot_password_path
|
38
|
+
|
39
|
+
within '#forgot_password_form' do
|
40
|
+
fill_in 'email', with: 'bogus@email.com'
|
41
|
+
click_button t('workarea.storefront.forms.send')
|
42
|
+
end
|
43
|
+
assert(page.has_content?(t('workarea.storefront.flash_messages.password_reset_email_sent', email: 'bogus@email.com')))
|
44
|
+
|
45
|
+
within '#forgot_password_form' do
|
46
|
+
fill_in 'email', with: @customer_email
|
47
|
+
click_button t('workarea.storefront.forms.send')
|
48
|
+
end
|
49
|
+
|
50
|
+
# User comes back from a link in an email
|
51
|
+
token = User::PasswordReset.first.token
|
52
|
+
visit storefront.reset_password_path(token)
|
53
|
+
|
54
|
+
within '#reset_password_form' do
|
55
|
+
fill_in 'password', with: @password
|
56
|
+
click_button t('workarea.storefront.users.reset_password')
|
57
|
+
end
|
58
|
+
|
59
|
+
assert_current_path(storefront.login_path)
|
60
|
+
assert(page.has_content?('Success'))
|
61
|
+
|
62
|
+
within '#login_form' do
|
63
|
+
fill_in 'email', with: @customer_email
|
64
|
+
fill_in 'password', with: @password
|
65
|
+
click_button t('workarea.storefront.users.login')
|
66
|
+
end
|
67
|
+
|
68
|
+
assert(page.has_content?('Success'))
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_admin_resetting_a_password
|
72
|
+
visit storefront.forgot_password_path
|
73
|
+
|
74
|
+
within '#forgot_password_form' do
|
75
|
+
fill_in 'email', with: @admin_email
|
76
|
+
click_button t('workarea.storefront.forms.send')
|
77
|
+
end
|
78
|
+
|
79
|
+
token = User::PasswordReset.first.token
|
80
|
+
visit storefront.reset_password_path(token)
|
81
|
+
|
82
|
+
within '#reset_password_form' do
|
83
|
+
fill_in 'password', with: @password
|
84
|
+
click_button t('workarea.storefront.users.reset_password')
|
85
|
+
end
|
86
|
+
|
87
|
+
assert_current_path(storefront.login_path)
|
88
|
+
assert(page.has_content?('Success'))
|
89
|
+
|
90
|
+
delivery = ActionMailer::Base.deliveries.last
|
91
|
+
assert_includes(delivery.subject, t('workarea.storefront.email.password_reset.subject'))
|
92
|
+
assert_includes(delivery.to, @admin_email)
|
93
|
+
assert_includes(delivery.html_part.body, token)
|
94
|
+
|
95
|
+
within '#login_form' do
|
96
|
+
fill_in 'email', with: @admin_email
|
97
|
+
fill_in 'password', with: @password
|
98
|
+
click_button t('workarea.storefront.users.login')
|
99
|
+
end
|
100
|
+
|
101
|
+
assert_current_path(admin.root_path)
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_admin_forcing_password_resets
|
105
|
+
Workarea.with_config do |config|
|
106
|
+
config.password_lifetime = 1.second
|
107
|
+
sleep(1)
|
108
|
+
|
109
|
+
# sign in for the first time
|
110
|
+
visit storefront.login_path
|
111
|
+
|
112
|
+
within '#login_form' do
|
113
|
+
fill_in 'email', with: @admin_email
|
114
|
+
fill_in 'password', with: 'W3bl1nc!'
|
115
|
+
click_button t('workarea.storefront.users.login')
|
116
|
+
end
|
117
|
+
|
118
|
+
assert_current_path(storefront.change_password_path)
|
119
|
+
|
120
|
+
# sign out
|
121
|
+
reset_session!
|
122
|
+
|
123
|
+
visit storefront.login_path
|
124
|
+
|
125
|
+
# sign in again
|
126
|
+
within '#login_form' do
|
127
|
+
fill_in 'email', with: @admin_email
|
128
|
+
fill_in 'password', with: 'W3bl1nc!'
|
129
|
+
click_button t('workarea.storefront.users.login')
|
130
|
+
end
|
131
|
+
|
132
|
+
assert_current_path(storefront.change_password_path)
|
133
|
+
|
134
|
+
# disallow all other page movement
|
135
|
+
visit storefront.root_path
|
136
|
+
assert_current_path(storefront.change_password_path)
|
137
|
+
|
138
|
+
config.password_lifetime = 1.hour
|
139
|
+
fill_in 'old_password', with: 'W3bl1nc!'
|
140
|
+
fill_in 'password', with: @password
|
141
|
+
click_button t('workarea.storefront.users.change_password')
|
142
|
+
|
143
|
+
assert_current_path(storefront.users_account_path)
|
144
|
+
|
145
|
+
click_link t('workarea.storefront.users.logout')
|
146
|
+
visit storefront.login_path
|
147
|
+
|
148
|
+
within '#login_form' do
|
149
|
+
fill_in 'email', with: @admin_email
|
150
|
+
fill_in 'password', with: @password
|
151
|
+
click_button t('workarea.storefront.users.login')
|
152
|
+
end
|
153
|
+
assert_current_path(admin.root_path)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|