workarea-admin 3.4.45 → 3.5.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +52 -0
- data/app/assets/images/workarea/admin/email_logo.png +0 -0
- data/app/assets/javascripts/workarea/admin/application.js.erb +11 -1
- data/app/assets/javascripts/workarea/admin/config.js.erb +96 -0
- data/app/assets/javascripts/workarea/admin/modules/active_by_segment_tooltips.js +108 -0
- data/app/assets/javascripts/workarea/admin/modules/calendars.js +1 -1
- data/app/assets/javascripts/workarea/admin/modules/categorized_autocomplete_fields.js +1 -1
- data/app/assets/javascripts/workarea/admin/modules/impersonation_notification.js +44 -0
- data/app/assets/javascripts/workarea/admin/modules/jump_to_menus.js +74 -0
- data/app/assets/javascripts/workarea/admin/modules/new_navigation_taxons.js +1 -2
- data/app/assets/javascripts/workarea/admin/modules/release_reminder.js +1 -0
- data/app/assets/javascripts/workarea/admin/modules/selects.js +33 -0
- data/app/assets/javascripts/workarea/admin/modules/style_guide_autocomplete_fields.js +42 -0
- data/app/assets/javascripts/workarea/admin/modules/timeline_report_chart.js +105 -0
- data/app/assets/javascripts/workarea/admin/modules/toggle_elements.js +27 -0
- data/app/assets/javascripts/workarea/admin/modules/tribute_areas.js +91 -0
- data/app/assets/javascripts/workarea/admin/templates/chart_legend.jst.ejs +17 -9
- data/app/assets/javascripts/workarea/admin/templates/jump_to_menu.jst.ejs +13 -0
- data/app/assets/stylesheets/workarea/admin/application.scss.erb +3 -0
- data/app/assets/stylesheets/workarea/admin/base/_forms.scss +2 -2
- data/app/assets/stylesheets/workarea/admin/components/_activity.scss +24 -16
- data/app/assets/stylesheets/workarea/admin/components/_activity_group.scss +3 -19
- data/app/assets/stylesheets/workarea/admin/components/_box.scss +21 -5
- data/app/assets/stylesheets/workarea/admin/components/_calendar.scss +102 -140
- data/app/assets/stylesheets/workarea/admin/components/_chart_legend.scss +10 -13
- data/app/assets/stylesheets/workarea/admin/components/_checkbox.scss +49 -23
- data/app/assets/stylesheets/workarea/admin/components/_content_block_list.scss +5 -3
- data/app/assets/stylesheets/workarea/admin/components/_date_marker.scss +24 -3
- data/app/assets/stylesheets/workarea/admin/components/_index_table.scss +5 -0
- data/app/assets/stylesheets/workarea/admin/components/_jump_to_menu.scss +57 -0
- data/app/assets/stylesheets/workarea/admin/components/_product_summary.scss +46 -0
- data/app/assets/stylesheets/workarea/admin/components/_toggle_button.scss +1 -4
- data/app/assets/stylesheets/workarea/admin/email/_base.scss +30 -2
- data/app/assets/stylesheets/workarea/admin/email/_components.scss +66 -5
- data/app/assets/stylesheets/workarea/admin/email/_helpers.scss +16 -5
- data/app/assets/stylesheets/workarea/admin/email/{_settings.scss → _settings.scss.erb} +4 -4
- data/app/controllers/workarea/admin/application_controller.rb +2 -4
- data/app/controllers/workarea/admin/bulk_action_sequential_product_edits_controller.rb +4 -6
- data/app/controllers/workarea/admin/bulk_variant_saving.rb +1 -2
- data/app/controllers/workarea/admin/catalog_products_controller.rb +4 -6
- data/app/controllers/workarea/admin/catalog_variants_controller.rb +2 -3
- data/app/controllers/workarea/admin/comments_controller.rb +9 -0
- data/app/controllers/workarea/admin/configurations_controller.rb +29 -0
- data/app/controllers/workarea/admin/content_assets_controller.rb +3 -1
- data/app/controllers/workarea/admin/content_blocks_controller.rb +1 -7
- data/app/controllers/workarea/admin/create_catalog_products_controller.rb +2 -8
- data/app/controllers/workarea/admin/create_release_undos_controller.rb +43 -0
- data/app/controllers/workarea/admin/create_segments_controller.rb +68 -0
- data/app/controllers/workarea/admin/dashboards_controller.rb +2 -0
- data/app/controllers/workarea/admin/data_file_imports_controller.rb +7 -2
- data/app/controllers/workarea/admin/fulfillment_skus_controller.rb +58 -0
- data/app/controllers/workarea/admin/fulfillment_tokens_controller.rb +56 -0
- data/app/controllers/workarea/admin/guest_browsings_controller.rb +2 -2
- data/app/controllers/workarea/admin/impersonations_controller.rb +3 -4
- data/app/controllers/workarea/admin/orders_controller.rb +3 -0
- data/app/controllers/workarea/admin/pricing_discount_redemptions_controller.rb +13 -0
- data/app/controllers/workarea/admin/pricing_overrides_controller.rb +1 -1
- data/app/controllers/workarea/admin/product_rules_controller.rb +1 -2
- data/app/controllers/workarea/admin/releases_controller.rb +8 -13
- data/app/controllers/workarea/admin/reports_controller.rb +18 -0
- data/app/controllers/workarea/admin/segment_overrides_controller.rb +19 -0
- data/app/controllers/workarea/admin/segment_rules_controller.rb +62 -0
- data/app/controllers/workarea/admin/segments_controller.rb +48 -0
- data/app/controllers/workarea/admin/tax_rates_controller.rb +62 -1
- data/app/controllers/workarea/admin/unsubscribes_controller.rb +40 -0
- data/app/controllers/workarea/admin/users_controller.rb +19 -0
- data/app/helpers/workarea/admin/application_helper.rb +2 -12
- data/app/helpers/workarea/admin/configurations_helper.rb +9 -0
- data/app/helpers/workarea/admin/content_helper.rb +2 -3
- data/app/helpers/workarea/admin/fulfillment_helper.rb +10 -0
- data/app/helpers/workarea/admin/icons_helper.rb +26 -0
- data/app/helpers/workarea/admin/navigation_helper.rb +1 -0
- data/app/helpers/workarea/admin/pricing_overrides_helper.rb +1 -1
- data/app/helpers/workarea/admin/products_helper.rb +13 -0
- data/app/helpers/workarea/admin/releases_helper.rb +5 -21
- data/app/helpers/workarea/admin/segments_helper.rb +68 -0
- data/app/helpers/workarea/admin/settings_helper.rb +11 -3
- data/app/mailers/workarea/admin/comment_mailer.rb +3 -3
- data/app/mailers/workarea/admin/status_report_mailer.rb +19 -6
- data/app/view_models/workarea/admin/bulk_action_product_edit_view_model.rb +5 -0
- data/app/view_models/workarea/admin/changeset_view_model.rb +15 -3
- data/app/view_models/workarea/admin/code_list_view_model.rb +1 -1
- data/app/view_models/workarea/admin/commentable_view_model.rb +4 -0
- data/app/view_models/workarea/admin/content_view_model.rb +2 -0
- data/app/view_models/workarea/admin/dashboards/marketing_view_model.rb +5 -9
- data/app/view_models/workarea/admin/dashboards/reports_view_model.rb +25 -0
- data/app/view_models/workarea/admin/discounts/buy_some_get_some_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/category_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/free_gift_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/order_total_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/product_attribute_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/product_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/quantity_fixed_price_view_model.rb +6 -0
- data/app/view_models/workarea/admin/discounts/shipping_view_model.rb +6 -0
- data/app/view_models/workarea/admin/featured_products_view_model.rb +6 -12
- data/app/view_models/workarea/admin/fulfillment_sku_view_model.rb +22 -0
- data/app/view_models/workarea/admin/fulfillment_token_view_model.rb +15 -0
- data/app/view_models/workarea/admin/fulfillment_view_model.rb +14 -0
- data/app/view_models/workarea/admin/insight_view_model.rb +2 -2
- data/app/view_models/workarea/admin/insights/product_view_model.rb +2 -2
- data/app/view_models/workarea/admin/insights/segment_view_model.rb +25 -0
- data/app/view_models/workarea/admin/order_view_model.rb +4 -0
- data/app/view_models/workarea/admin/pricing_sku_view_model.rb +0 -51
- data/app/view_models/workarea/admin/product_rules_preview_view_model.rb +2 -2
- data/app/view_models/workarea/admin/product_view_model.rb +26 -5
- data/app/view_models/workarea/admin/recommendations_view_model.rb +3 -11
- data/app/view_models/workarea/admin/release_calendar_view_model.rb +4 -9
- data/app/view_models/workarea/admin/release_event_view_model.rb +8 -41
- data/app/view_models/workarea/admin/release_view_model.rb +10 -17
- data/app/view_models/workarea/admin/releases_feed_view_model.rb +5 -13
- data/app/view_models/workarea/admin/reports/customers_view_model.rb +4 -2
- data/app/view_models/workarea/admin/reports/low_inventory_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_category_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_discount_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_product_view_model.rb +2 -5
- data/app/view_models/workarea/admin/reports/sales_by_tender_view_model.rb +13 -0
- data/app/view_models/workarea/admin/reports/timeline_view_model.rb +74 -0
- data/app/view_models/workarea/admin/search_customization_product_rules_view_model.rb +1 -1
- data/app/view_models/workarea/admin/segment_view_model.rb +19 -0
- data/app/view_models/workarea/admin/user_view_model.rb +6 -9
- data/app/view_models/workarea/admin/variant_view_model.rb +8 -0
- data/app/views/layouts/workarea/admin/application.html.haml +1 -1
- data/app/views/layouts/workarea/admin/email.html.haml +35 -41
- data/app/views/workarea/admin/activities/_configuration_admin_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_create.html.haml +12 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_destroy.html.haml +10 -0
- data/app/views/workarea/admin/activities/_fulfillment_sku_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/_segment_create.html.haml +12 -0
- data/app/views/workarea/admin/activities/_segment_destroy.html.haml +10 -0
- data/app/views/workarea/admin/activities/_segment_update.html.haml +10 -0
- data/app/views/workarea/admin/activities/show.html.haml +18 -11
- data/app/views/workarea/admin/bulk_action_product_edits/edit.html.haml +4 -0
- data/app/views/workarea/admin/bulk_action_product_edits/review.html.haml +11 -4
- data/app/views/workarea/admin/bulk_action_sequential_product_edits/product.html.haml +1 -1
- data/app/views/workarea/admin/catalog_categories/_cards.html.haml +3 -1
- data/app/views/workarea/admin/catalog_categories/edit.html.haml +1 -4
- data/app/views/workarea/admin/catalog_categories/index.html.haml +1 -0
- data/app/views/workarea/admin/catalog_product_images/edit.html.haml +1 -1
- data/app/views/workarea/admin/catalog_products/_cards.html.haml +2 -4
- data/app/views/workarea/admin/catalog_products/edit.html.haml +2 -1
- data/app/views/workarea/admin/catalog_products/index.html.haml +4 -2
- data/app/views/workarea/admin/catalog_products/insights.html.haml +2 -0
- data/app/views/workarea/admin/catalog_variants/edit.html.haml +6 -1
- data/app/views/workarea/admin/catalog_variants/index.html.haml +2 -0
- data/app/views/workarea/admin/catalog_variants/new.html.haml +5 -0
- data/app/views/workarea/admin/changesets/fields/_active_segment_ids.html.haml +4 -0
- data/app/views/workarea/admin/comment_mailer/notify.html.haml +27 -19
- data/app/views/workarea/admin/comments/index.html.haml +18 -12
- data/app/views/workarea/admin/configurations/_overridden.html.haml +2 -0
- data/app/views/workarea/admin/configurations/show.html.haml +49 -0
- data/app/views/workarea/admin/configurations/types/_array.html.haml +3 -0
- data/app/views/workarea/admin/configurations/types/_boolean.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_duration.html.haml +2 -0
- data/app/views/workarea/admin/configurations/types/_encrypted.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_float.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_hash.html.haml +17 -0
- data/app/views/workarea/admin/configurations/types/_integer.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_select.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_string.html.haml +1 -0
- data/app/views/workarea/admin/configurations/types/_symbol.html.haml +1 -0
- data/app/views/workarea/admin/content/_edit.html.haml +8 -1
- data/app/views/workarea/admin/content/_form.html.haml +13 -7
- data/app/views/workarea/admin/content/advanced.html.haml +18 -10
- data/app/views/workarea/admin/content_assets/_cards.html.haml +3 -0
- data/app/views/workarea/admin/content_assets/_summary.html.haml +1 -1
- data/app/views/workarea/admin/content_assets/edit.html.haml +6 -0
- data/app/views/workarea/admin/content_assets/index.html.haml +7 -2
- data/app/views/workarea/admin/content_assets/new.html.haml +10 -3
- data/app/views/workarea/admin/content_blocks/_asset.html.haml +8 -1
- data/app/views/workarea/admin/content_pages/_cards.html.haml +1 -0
- data/app/views/workarea/admin/content_pages/edit.html.haml +1 -1
- data/app/views/workarea/admin/content_pages/index.html.haml +1 -0
- data/app/views/workarea/admin/create_catalog_categories/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_catalog_products/content.html.haml +1 -1
- data/app/views/workarea/admin/create_catalog_products/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_content_pages/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_pricing_discounts/publish.html.haml +1 -0
- data/app/views/workarea/admin/create_release_undos/new.html.haml +45 -0
- data/app/views/workarea/admin/create_release_undos/review.html.haml +51 -0
- data/app/views/workarea/admin/create_releases/plan.html.haml +4 -3
- data/app/views/workarea/admin/create_releases/setup.html.haml +8 -12
- data/app/views/workarea/admin/create_segments/rules.html.haml +55 -0
- data/app/views/workarea/admin/create_segments/setup.html.haml +42 -0
- data/app/views/workarea/admin/create_users/admin.html.haml +0 -2
- data/app/views/workarea/admin/dashboards/catalog.html.haml +1 -0
- data/app/views/workarea/admin/dashboards/people.html.haml +1 -1
- data/app/views/workarea/admin/dashboards/reports.html.haml +31 -0
- data/app/views/workarea/admin/dashboards/settings.html.haml +23 -3
- data/app/views/workarea/admin/data_file_imports/new.html.haml +4 -2
- data/app/views/workarea/admin/data_file_mailer/export.html.haml +2 -0
- data/app/views/workarea/admin/data_file_mailer/import.html.haml +2 -0
- data/app/views/workarea/admin/data_file_mailer/import_failure.html.haml +2 -0
- data/app/views/workarea/admin/facets/_applied.html.haml +1 -1
- data/app/views/workarea/admin/featured_products/_selected.html.haml +3 -2
- data/app/views/workarea/admin/featured_products/_unselected.html.haml +3 -1
- data/app/views/workarea/admin/featured_products/edit.html.haml +3 -3
- data/app/views/workarea/admin/featured_products/select.html.haml +0 -1
- data/app/views/workarea/admin/fulfillment_skus/_aux_navigation.html.haml +3 -0
- data/app/views/workarea/admin/fulfillment_skus/_cards.html.haml +57 -0
- data/app/views/workarea/admin/fulfillment_skus/_summary.html.haml +6 -0
- data/app/views/workarea/admin/fulfillment_skus/edit.html.haml +53 -0
- data/app/views/workarea/admin/fulfillment_skus/index.html.haml +75 -0
- data/app/views/workarea/admin/fulfillment_skus/new.html.haml +41 -0
- data/app/views/workarea/admin/fulfillment_skus/show.html.haml +17 -0
- data/app/views/workarea/admin/fulfillment_tokens/index.html.haml +73 -0
- data/app/views/workarea/admin/fulfillments/show.html.haml +41 -6
- data/app/views/workarea/admin/insights/_most_discounted_products.html.haml +4 -4
- data/app/views/workarea/admin/inventory_skus/show.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/_summary.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/edit.html.haml +1 -1
- data/app/views/workarea/admin/navigation_menus/index.html.haml +3 -1
- data/app/views/workarea/admin/navigation_redirects/index.html.haml +0 -5
- data/app/views/workarea/admin/navigation_taxons/index.html.haml +20 -4
- data/app/views/workarea/admin/orders/_cards.html.haml +23 -5
- data/app/views/workarea/admin/orders/attributes.html.haml +4 -1
- data/app/views/workarea/admin/orders/fraud.html.haml +43 -0
- data/app/views/workarea/admin/orders/index.html.haml +1 -0
- data/app/views/workarea/admin/orders/timeline.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_code_lists/_cards.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_code_lists/promo_codes.html.haml +1 -1
- data/app/views/workarea/admin/pricing_discount_redemptions/index.html.haml +44 -0
- data/app/views/workarea/admin/pricing_discounts/_cards.html.haml +22 -0
- data/app/views/workarea/admin/pricing_discounts/conditions/_segments.html.haml +5 -0
- data/app/views/workarea/admin/pricing_discounts/edit.html.haml +5 -15
- data/app/views/workarea/admin/pricing_discounts/index.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_buy_some_get_some.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_category.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_free_gift.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_order_total.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_product.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_product_attribute.html.haml +2 -1
- data/app/views/workarea/admin/pricing_discounts/properties/_quantity_fixed_price.html.haml +1 -0
- data/app/views/workarea/admin/pricing_discounts/properties/_shipping.html.haml +1 -0
- data/app/views/workarea/admin/pricing_skus/_cards.html.haml +7 -7
- data/app/views/workarea/admin/pricing_skus/edit.html.haml +5 -5
- data/app/views/workarea/admin/pricing_skus/index.html.haml +4 -4
- data/app/views/workarea/admin/pricing_skus/new.html.haml +6 -9
- data/app/views/workarea/admin/product_rules/_card.html.haml +2 -2
- data/app/views/workarea/admin/product_rules/_form.html.haml +1 -0
- data/app/views/workarea/admin/product_rules/index.html.haml +2 -0
- data/app/views/workarea/admin/releases/_cards.html.haml +50 -12
- data/app/views/workarea/admin/releases/_publish.html.haml +1 -1
- data/app/views/workarea/admin/releases/edit.html.haml +33 -46
- data/app/views/workarea/admin/releases/index.html.haml +81 -90
- data/app/views/workarea/admin/releases/list.html.haml +107 -0
- data/app/views/workarea/admin/releases/original.html.haml +50 -0
- data/app/views/workarea/admin/releases/show.html.haml +3 -17
- data/app/views/workarea/admin/releases/undo.html.haml +64 -0
- data/app/views/workarea/admin/reports/average_order_value.html.haml +1 -1
- data/app/views/workarea/admin/reports/customers.html.haml +4 -0
- data/app/views/workarea/admin/reports/first_time_vs_returning_sales.html.haml +1 -1
- data/app/views/workarea/admin/reports/reference.html.haml +19 -60
- data/app/views/workarea/admin/reports/sales_by_country.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_product.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_sku.html.haml +6 -0
- data/app/views/workarea/admin/reports/sales_by_tender.html.haml +30 -0
- data/app/views/workarea/admin/reports/sales_over_time.html.haml +5 -1
- data/app/views/workarea/admin/reports/timeline.html.haml +20 -0
- data/app/views/workarea/admin/search_customizations/_cards.html.haml +1 -0
- data/app/views/workarea/admin/search_customizations/edit.html.haml +1 -1
- data/app/views/workarea/admin/search_customizations/index.html.haml +1 -0
- data/app/views/workarea/admin/searches/show.html.haml +6 -5
- data/app/views/workarea/admin/segment_overrides/show.html.haml +29 -0
- data/app/views/workarea/admin/segment_rules/_form.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/fields/_browser_info.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/fields/_geolocation.html.haml +4 -0
- data/app/views/workarea/admin/segment_rules/fields/_last_order.html.haml +3 -0
- data/app/views/workarea/admin/segment_rules/fields/_logged_in.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/fields/_orders.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/fields/_revenue.html.haml +9 -0
- data/app/views/workarea/admin/segment_rules/fields/_sessions.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/fields/_tags.html.haml +4 -0
- data/app/views/workarea/admin/segment_rules/fields/_traffic_referrer.html.haml +13 -0
- data/app/views/workarea/admin/segment_rules/geolocation_options.json.jbuilder +4 -0
- data/app/views/workarea/admin/segment_rules/index.html.haml +25 -0
- data/app/views/workarea/admin/segment_rules/summaries/_browser_info.html.haml +11 -0
- data/app/views/workarea/admin/segment_rules/summaries/_geolocation.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_last_order.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_logged_in.html.haml +5 -0
- data/app/views/workarea/admin/segment_rules/summaries/_orders.html.haml +6 -0
- data/app/views/workarea/admin/segment_rules/summaries/_revenue.html.haml +7 -0
- data/app/views/workarea/admin/segment_rules/summaries/_sessions.html.haml +6 -0
- data/app/views/workarea/admin/segment_rules/summaries/_tags.html.haml +2 -0
- data/app/views/workarea/admin/segment_rules/summaries/_traffic_referrer.html.haml +10 -0
- data/app/views/workarea/admin/segments/_cards.html.haml +81 -0
- data/app/views/workarea/admin/segments/_publish.html.haml +10 -0
- data/app/views/workarea/admin/segments/edit.html.haml +41 -0
- data/app/views/workarea/admin/segments/index.html.haml +64 -0
- data/app/views/workarea/admin/segments/insights.html.haml +52 -0
- data/app/views/workarea/admin/segments/show.html.haml +20 -0
- data/app/views/workarea/admin/shared/_active_field.html.haml +17 -0
- data/app/views/workarea/admin/shared/_bulk_actions.html.haml +10 -8
- data/app/views/workarea/admin/shared/_primary_nav.html.haml +5 -2
- data/app/views/workarea/admin/shared/_toggle_button.html.haml +1 -1
- data/app/views/workarea/admin/shipping_services/edit.html.haml +0 -4
- data/app/views/workarea/admin/shipping_services/new.html.haml +0 -4
- data/app/views/workarea/admin/status_report_mailer/report.html.haml +83 -86
- data/app/views/workarea/admin/style_guides/components/_activity.html.haml +3 -5
- data/app/views/workarea/admin/style_guides/components/_activity_group.html.haml +9 -15
- data/app/views/workarea/admin/style_guides/components/_box.html.haml +12 -7
- data/app/views/workarea/admin/style_guides/components/_checkbox.html.haml +21 -2
- data/app/views/workarea/admin/style_guides/components/_release_changeset.html.haml +3 -5
- data/app/views/workarea/admin/tax_rates/edit.html.haml +64 -0
- data/app/views/workarea/admin/tax_rates/index.html.haml +59 -20
- data/app/views/workarea/admin/tax_rates/new.html.haml +62 -0
- data/app/views/workarea/admin/timeline/show.html.haml +34 -41
- data/app/views/workarea/admin/toolbar/show.html.haml +11 -1
- data/app/views/workarea/admin/trash/index.html.haml +1 -1
- data/app/views/workarea/admin/users/edit.html.haml +60 -57
- data/app/views/workarea/admin/users/index.html.haml +1 -3
- data/app/views/workarea/admin/users/index.json.jbuilder +8 -0
- data/app/views/workarea/admin/users/insights.html.haml +31 -23
- data/app/views/workarea/admin/users/permissions.html.haml +10 -1
- data/app/views/workarea/admin/users/show.html.haml +7 -0
- data/config/locales/en.yml +569 -124
- data/config/routes.rb +57 -5
- data/lib/workarea/mailer_previews/admin/status_report_mailer_preview.rb +3 -1
- data/public/workarea/import_samples/tax_rates.csv +3 -3
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/test/helpers/workarea/admin/application_helper_test.rb +0 -16
- data/test/helpers/workarea/admin/icons_helper_test.rb +9 -0
- data/test/helpers/workarea/admin/products_helper_test.rb +73 -0
- data/test/helpers/workarea/admin/releases_helper_test.rb +0 -49
- data/test/helpers/workarea/admin/settings_helper_test.rb +22 -1
- data/test/integration/workarea/admin/assets_integration_test.rb +2 -5
- data/test/integration/workarea/admin/comments_integration_test.rb +27 -7
- data/test/integration/workarea/admin/configurations_integration_test.rb +21 -0
- data/test/integration/workarea/admin/create_release_undos_integration_test.rb +29 -0
- data/test/integration/workarea/admin/create_segments_integration_test.rb +26 -0
- data/test/integration/workarea/admin/data_file_imports_integration_test.rb +34 -8
- data/test/integration/workarea/admin/fulfillment_skus_integration_test.rb +55 -0
- data/test/integration/workarea/admin/fulfillment_tokens_integration_test.rb +43 -0
- data/test/integration/workarea/admin/guest_browsings_integration_test.rb +8 -32
- data/test/integration/workarea/admin/impersonations_integration_test.rb +13 -57
- data/test/integration/workarea/admin/jump_to_integration_test.rb +0 -29
- data/test/integration/workarea/admin/pricing_overrides_integration_test.rb +11 -0
- data/test/integration/workarea/admin/products_integration_test.rb +0 -13
- data/test/integration/workarea/admin/releases_integration_test.rb +71 -87
- data/test/integration/workarea/admin/segment_overrides_integration_test.rb +28 -0
- data/test/integration/workarea/admin/segment_rules_integration_test.rb +49 -0
- data/test/integration/workarea/admin/segments_integration_test.rb +31 -0
- data/test/integration/workarea/admin/shipping_service_integration_test.rb +1 -3
- data/test/integration/workarea/admin/tax_categories_integration_test.rb +1 -1
- data/test/integration/workarea/admin/unsubscribes_integration_test.rb +32 -0
- data/test/integration/workarea/admin/users_integration_test.rb +32 -0
- data/test/javascripts/fixtures/release_reminder.html.haml +3 -3
- data/test/javascripts/new_navigation_taxons_spec.js +1 -12
- data/test/mailers/workarea/admin/comment_mailer_test.rb +35 -0
- data/test/mailers/workarea/admin/status_report_mailer_test.rb +30 -25
- data/test/system/workarea/admin/alerts_system_test.rb +2 -1
- data/test/system/workarea/admin/bulk_actions_system_test.rb +1 -1
- data/test/system/workarea/admin/comments_system_test.rb +43 -0
- data/test/system/workarea/admin/content_system_test.rb +6 -0
- data/test/system/workarea/admin/dashboard_system_test.rb +8 -9
- data/test/system/workarea/admin/data_files_system_test.rb +1 -1
- data/test/system/workarea/admin/discounts_system_test.rb +18 -0
- data/test/system/workarea/admin/featured_products_system_test.rb +3 -0
- data/test/system/workarea/admin/fulfillment_skus_system_test.rb +48 -0
- data/test/system/workarea/admin/impersonation_system_test.rb +5 -2
- data/test/system/workarea/admin/orders_system_test.rb +32 -21
- data/test/system/workarea/admin/payment_transactions_system_test.rb +34 -32
- data/test/system/workarea/admin/releases_system_test.rb +151 -37
- data/test/system/workarea/admin/reports_system_test.rb +29 -0
- data/test/system/workarea/admin/segments_system_test.rb +124 -0
- data/test/system/workarea/admin/tax_categories_system_test.rb +166 -16
- data/test/system/workarea/admin/users_system_test.rb +15 -0
- data/test/view_models/workarea/admin/changeset_view_model_test.rb +59 -9
- data/test/view_models/workarea/admin/code_list_view_model_test.rb +0 -5
- data/test/view_models/workarea/admin/content_view_model_test.rb +13 -11
- data/test/view_models/workarea/admin/insights/product_view_model_test.rb +4 -4
- data/test/view_models/workarea/admin/insights/segment_view_model_test.rb +73 -0
- data/test/view_models/workarea/admin/product_rules_preview_view_model_test.rb +37 -0
- data/test/view_models/workarea/admin/product_view_model_test.rb +13 -19
- data/test/view_models/workarea/admin/release_calendar_view_model_test.rb +16 -0
- data/test/view_models/workarea/admin/release_view_model_test.rb +13 -56
- data/test/view_models/workarea/admin/releases_feed_view_model_test.rb +8 -21
- data/test/view_models/workarea/admin/reports/timeline_view_model_test.rb +76 -0
- data/test/view_models/workarea/admin/search_analysis_view_model_test.rb +14 -16
- data/test/view_models/workarea/admin/timeline_view_model_test.rb +1 -1
- metadata +128 -17
- data/app/views/workarea/admin/featured_products/_release_preview_warning.html.haml +0 -4
- data/app/views/workarea/admin/releases/calendar.html.haml +0 -54
- data/test/dummy/tmp/screenshots/.keep +0 -0
- data/test/helpers/workarea/admin/content_helper_test.rb +0 -17
- data/test/integration/workarea/admin/index_tracking_integration_test.rb +0 -21
- data/test/javascripts/fixtures/existing_navigation_taxon.html.haml +0 -10
- data/test/view_models/workarea/admin/pricing_sku_view_model_test.rb +0 -84
@@ -6,6 +6,7 @@
|
|
6
6
|
it('initializes select2 on navigable id select', function () {
|
7
7
|
var markup = 'new_navigation_taxon.html',
|
8
8
|
$fixture = $(fixture.load(markup, true)),
|
9
|
+
|
9
10
|
$select = $('[name=navigable_id]', $fixture);
|
10
11
|
|
11
12
|
expect($select.is('.select2-hidden-accessible')).to.not.be.ok;
|
@@ -13,18 +14,6 @@
|
|
13
14
|
WORKAREA.newNavigationTaxons.init($fixture);
|
14
15
|
|
15
16
|
expect($select.is('.select2-hidden-accessible')).to.be.ok;
|
16
|
-
expect($select.val()).to.equal('');
|
17
|
-
});
|
18
|
-
|
19
|
-
it('saves with the existing data', function () {
|
20
|
-
var markup = 'existing_navigation_taxon.html',
|
21
|
-
$fixture = $(fixture.load(markup, true)),
|
22
|
-
$select = $('[name=navigable_id]', $fixture);
|
23
|
-
|
24
|
-
WORKAREA.newNavigationTaxons.init($fixture);
|
25
|
-
|
26
|
-
expect($select.is('.select2-hidden-accessible')).to.be.ok;
|
27
|
-
expect($select.val()).to.equal('bar');
|
28
17
|
});
|
29
18
|
});
|
30
19
|
});
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Admin
|
5
|
+
class CommentMailerTest < MailerTest
|
6
|
+
include TestCase::SearchIndexing
|
7
|
+
include TestCase::Mail
|
8
|
+
|
9
|
+
delegate :t, to: :I18n
|
10
|
+
|
11
|
+
def test_notify
|
12
|
+
Workarea.config.email_from = 'noreply@example.com'
|
13
|
+
user = create_user
|
14
|
+
product = create_product
|
15
|
+
comment = product.comments.create!(body: 'test order comment')
|
16
|
+
|
17
|
+
CommentMailer.notify(user.id, comment.id).deliver_now
|
18
|
+
|
19
|
+
email = ActionMailer::Base.deliveries.last
|
20
|
+
html = email.parts.second.body
|
21
|
+
|
22
|
+
assert_includes(email.to, user.email)
|
23
|
+
assert_includes(email.from, Workarea.config.email_from)
|
24
|
+
assert_includes(html, comment.body)
|
25
|
+
assert_includes(
|
26
|
+
html,
|
27
|
+
t(
|
28
|
+
'workarea.admin.comment_mailer.notify.unsubscribe_from_notifications',
|
29
|
+
commentable_name: product.name
|
30
|
+
)
|
31
|
+
)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -2,36 +2,41 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
module Workarea
|
4
4
|
module Admin
|
5
|
-
class StatusReportMailerTest <
|
5
|
+
class StatusReportMailerTest < MailerTest
|
6
6
|
include TestCase::SearchIndexing
|
7
7
|
include TestCase::Mail
|
8
8
|
|
9
9
|
delegate :t, to: :I18n
|
10
10
|
|
11
|
-
def
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
11
|
+
def test_report
|
12
|
+
# create a Products Missing Images alert
|
13
|
+
create_product(images: [], description: nil)
|
14
|
+
|
15
|
+
Workarea.config.email_from = 'noreply@example.com'
|
16
|
+
user = create_user(email: 'bcrouse@workarea.com')
|
17
|
+
|
18
|
+
StatusReportMailer.report(user.email).deliver_now
|
19
|
+
|
20
|
+
email = ActionMailer::Base.deliveries.last
|
21
|
+
html = email.parts.second.body
|
22
|
+
|
23
|
+
assert_includes(html, Workarea.config.site_name)
|
24
|
+
assert_includes(html, t('workarea.admin.status_report_mailer.orders.total_orders'))
|
25
|
+
assert_includes(html, t('workarea.admin.status_report_mailer.alerts.title'))
|
26
|
+
assert_includes(html, t('workarea.admin.status_report_mailer.unsubscribe'))
|
27
|
+
assert_includes(html, Money.default_currency.symbol)
|
28
|
+
assert_includes(email.to, user.email)
|
29
|
+
assert_includes(email.from, Workarea.config.email_from)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_report_to_many
|
33
|
+
users = [
|
34
|
+
create_user(email: 'bcrouse@workarea.com'),
|
35
|
+
create_user(email: 'tscott@workarea.com')
|
36
|
+
]
|
37
|
+
|
38
|
+
StatusReportMailer.report_to_many(users).map(&:deliver_now)
|
39
|
+
assert_equal(2, ActionMailer::Base.deliveries.count)
|
35
40
|
end
|
36
41
|
end
|
37
42
|
end
|
@@ -17,6 +17,7 @@ module Workarea
|
|
17
17
|
)
|
18
18
|
create_category(product_ids: [], product_rules: [])
|
19
19
|
create_release(name: 'Foo', publish_at: 1.hour.from_now)
|
20
|
+
create_inventory(id: 'NODETAILS', policy: :standard, available: 1)
|
20
21
|
|
21
22
|
visit admin.root_path
|
22
23
|
assert(page.has_content?('9 Alerts'))
|
@@ -28,7 +29,7 @@ module Workarea
|
|
28
29
|
assert(page.has_content?('3 products missing descriptions'))
|
29
30
|
assert(page.has_content?('1 product missing variants'))
|
30
31
|
assert(page.has_content?('3 products missing categories'))
|
31
|
-
assert(page.has_content?('
|
32
|
+
assert(page.has_content?('1 product with low inventory'))
|
32
33
|
assert(page.has_content?('2 products with variants missing details'))
|
33
34
|
assert(page.has_content?('1 product with inconsistent variant details'))
|
34
35
|
assert_match(/Foo publishes on/, page.text)
|
@@ -156,7 +156,7 @@ module Workarea
|
|
156
156
|
assert(page.has_content?(t('workarea.admin.bulk_action_product_edits.review.title')))
|
157
157
|
assert(page.has_content?(t('workarea.admin.bulk_action_product_edits.worflow.selected', label: '2 Products')))
|
158
158
|
|
159
|
-
assert(page.has_content?("#{t('workarea.admin.fields.active')}
|
159
|
+
assert(page.has_content?("#{t('workarea.admin.fields.active')} false"))
|
160
160
|
assert(page.has_content?('add_tag_2, add_tag_3'))
|
161
161
|
assert(page.has_content?('remove_tag_1'))
|
162
162
|
assert(page.has_content?('add_filter_1'))
|
@@ -16,6 +16,49 @@ module Workarea
|
|
16
16
|
|
17
17
|
assert(page.has_content?('Success'))
|
18
18
|
end
|
19
|
+
|
20
|
+
def test_notifying_admins
|
21
|
+
me = create_user(email: 'foo@workarea.com')
|
22
|
+
|
23
|
+
create_user(
|
24
|
+
first_name: 'Bar',
|
25
|
+
last_name: 'Baby',
|
26
|
+
email: 'bar@workarea.com'
|
27
|
+
)
|
28
|
+
|
29
|
+
create_user(
|
30
|
+
first_name: 'Baz',
|
31
|
+
last_name: 'Bat',
|
32
|
+
email: 'baz@workarea.com',
|
33
|
+
admin: true
|
34
|
+
)
|
35
|
+
|
36
|
+
visit admin.user_path(me)
|
37
|
+
|
38
|
+
click_link 'Comments'
|
39
|
+
|
40
|
+
find_field('comment[body]').send_keys(['@'])
|
41
|
+
|
42
|
+
refute(page.has_content?('Bar Baby'))
|
43
|
+
assert(page.has_content?('Baz Bat'))
|
44
|
+
|
45
|
+
find('.tribute-container li', text: 'Baz Bat (baz@workarea.com)').click
|
46
|
+
click_button 'create_comment'
|
47
|
+
|
48
|
+
assert(page.has_content?('Success'))
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_subscribing_to_comments
|
52
|
+
user = create_user(email: 'bcrouse-test@workarea.com')
|
53
|
+
visit admin.user_path(user)
|
54
|
+
|
55
|
+
click_link 'Comments'
|
56
|
+
click_button t('workarea.admin.comments.index.subscribe')
|
57
|
+
assert(page.has_content?('Success'))
|
58
|
+
|
59
|
+
click_button t('workarea.admin.comments.index.unsubscribe')
|
60
|
+
assert(page.has_content?('Success'))
|
61
|
+
end
|
19
62
|
end
|
20
63
|
end
|
21
64
|
end
|
@@ -94,6 +94,12 @@ module Workarea
|
|
94
94
|
click_link 'Advanced', match: :first
|
95
95
|
|
96
96
|
assert_current_path(/#{admin.advanced_content_path(home)}/)
|
97
|
+
|
98
|
+
assert(page.has_selector?('#content_browser_title', visible: false))
|
99
|
+
|
100
|
+
find('.toggle-button__label--positive').click
|
101
|
+
assert(page.has_selector?('#content_browser_title', visible: true))
|
102
|
+
|
97
103
|
fill_in 'content[browser_title]', with: 'Browser Title'
|
98
104
|
click_button 'save'
|
99
105
|
|
@@ -54,18 +54,17 @@ module Workarea
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def test_viewing_the_settings_dashboard
|
57
|
-
Workarea.
|
58
|
-
config.fooconfig = 'barvalue'
|
57
|
+
Workarea.config.fooconfig = 'barvalue'
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
visit admin.settings_dashboards_path
|
60
|
+
assert(page.has_content?('Fooconfig'))
|
61
|
+
assert(page.has_content?('barvalue'))
|
62
|
+
assert(page.has_selector?('.jump-to-menu'))
|
63
63
|
|
64
|
-
|
64
|
+
Workarea.config.hide_from_settings = %i(fooconfig)
|
65
65
|
|
66
|
-
|
67
|
-
|
68
|
-
end
|
66
|
+
visit admin.settings_dashboards_path
|
67
|
+
refute(page.has_content?('Fooconfig'))
|
69
68
|
end
|
70
69
|
end
|
71
70
|
end
|
@@ -101,6 +101,24 @@ module Workarea
|
|
101
101
|
assert(page.has_content?('444'))
|
102
102
|
assert(page.has_content?('555'))
|
103
103
|
end
|
104
|
+
|
105
|
+
def test_discount_redemptions
|
106
|
+
discount = create_category_discount
|
107
|
+
7.times { |i| discount.log_redemption("foo-#{i}@workarea.com") }
|
108
|
+
order = create_placed_order(email: 'foo-1@workarea.com')
|
109
|
+
|
110
|
+
visit admin.pricing_discount_path(discount)
|
111
|
+
within '.card--redemptions' do
|
112
|
+
assert(page.has_content?(7))
|
113
|
+
end
|
114
|
+
|
115
|
+
click_link t('workarea.admin.pricing_discounts.cards.redemptions.header')
|
116
|
+
assert(page.has_content?(7))
|
117
|
+
7.times { |i| assert(page.has_content?("foo-#{i}@workarea.com")) }
|
118
|
+
|
119
|
+
click_link 'foo-1@workarea.com'
|
120
|
+
assert(page.has_content?(order.id))
|
121
|
+
end
|
104
122
|
end
|
105
123
|
end
|
106
124
|
end
|
@@ -8,12 +8,15 @@ module Workarea
|
|
8
8
|
def test_managing_featured_products
|
9
9
|
create_product(name: 'Foo')
|
10
10
|
create_product(name: 'Bar')
|
11
|
+
create_product(name: 'Baz', active: false)
|
11
12
|
category = create_category
|
12
13
|
visit admin.catalog_category_path(category)
|
13
14
|
|
14
15
|
click_link t('workarea.admin.catalog_categories.cards.featured_products.title')
|
15
16
|
assert(page.has_content?('Foo'))
|
16
17
|
assert(page.has_content?('Bar'))
|
18
|
+
assert(page.has_content?('Baz'))
|
19
|
+
assert(page.has_content?(t('workarea.admin.featured_products.statuses.inactive')))
|
17
20
|
|
18
21
|
click_link 'Foo'
|
19
22
|
assert(page.has_content?('Success'))
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Workarea
|
4
|
+
module Admin
|
5
|
+
class FulfillmentSkusSystemTest < SystemTest
|
6
|
+
include Admin::IntegrationTest
|
7
|
+
|
8
|
+
def test_management
|
9
|
+
visit admin.fulfillment_skus_path
|
10
|
+
click_link 'add_fulfillment_sku'
|
11
|
+
|
12
|
+
fill_in 'sku[id]', with: 'SKU1'
|
13
|
+
click_button 'create_sku'
|
14
|
+
|
15
|
+
assert_current_path(admin.fulfillment_sku_path('SKU1'))
|
16
|
+
assert(page.has_content?('Success'))
|
17
|
+
assert(page.has_content?('SKU1'))
|
18
|
+
|
19
|
+
click_link 'Attributes'
|
20
|
+
select 'Download', from: 'sku[policy]'
|
21
|
+
attach_file 'sku[file]', product_image_file_path
|
22
|
+
click_button 'save_sku'
|
23
|
+
|
24
|
+
assert(page.has_content?('Success'))
|
25
|
+
assert_current_path(admin.fulfillment_sku_path('SKU1'))
|
26
|
+
assert(page.has_content?('Download'))
|
27
|
+
|
28
|
+
visit admin.fulfillment_sku_path('SKU1')
|
29
|
+
click_link 'Delete'
|
30
|
+
|
31
|
+
assert_current_path(admin.fulfillment_skus_path)
|
32
|
+
assert(page.has_content?('Success'))
|
33
|
+
assert(page.has_no_content?('SKU1'))
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_accessing_from_variant
|
37
|
+
product = create_product(variants: [{ sku: 'SKU1', regular: 5.to_m }])
|
38
|
+
sku = create_fulfillment_sku(id: 'SKU1', policy: 'ignore')
|
39
|
+
|
40
|
+
visit admin.catalog_product_variants_path(product)
|
41
|
+
assert(page.has_content?('Ignore'))
|
42
|
+
|
43
|
+
click_link 'Ignore'
|
44
|
+
assert_current_path(admin.fulfillment_sku_path('SKU1'))
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -34,9 +34,12 @@ module Workarea
|
|
34
34
|
click_button 'Stop Impersonation'
|
35
35
|
end
|
36
36
|
|
37
|
-
assert_equal(
|
37
|
+
assert_equal(admin.user_path(user), current_path)
|
38
38
|
assert(page.has_content?('Success'))
|
39
39
|
|
40
|
+
find('.view').hover # Ensure tooltipster menu isn't open
|
41
|
+
assert(page.has_content?('bcrouse@workarea.com'))
|
42
|
+
|
40
43
|
visit storefront.users_account_path
|
41
44
|
assert(page.has_no_content?('impersonated@workarea.com'))
|
42
45
|
|
@@ -49,7 +52,7 @@ module Workarea
|
|
49
52
|
click_button 'Stop Impersonation'
|
50
53
|
end
|
51
54
|
|
52
|
-
assert_equal(admin.
|
55
|
+
assert_equal(admin.user_path(user), current_path)
|
53
56
|
assert(page.has_content?('Success'))
|
54
57
|
end
|
55
58
|
end
|
@@ -56,24 +56,35 @@ module Workarea
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def test_payment
|
59
|
-
Workarea.
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
59
|
+
Workarea.config.checkout_payment_action = {
|
60
|
+
not_shipped: 'authorize!',
|
61
|
+
shipped: 'authorize!',
|
62
|
+
mixed: 'authorize!'
|
63
|
+
}
|
64
|
+
|
65
|
+
order = create_placed_order
|
66
|
+
visit admin.order_path(order)
|
67
|
+
click_link t('workarea.admin.orders.attributes.payment.title')
|
68
|
+
|
69
|
+
assert(page.has_content?('Ben Crouse'))
|
70
|
+
assert(page.has_content?('22 S. 3rd St.'))
|
71
|
+
assert(page.has_content?('Philadelphia'))
|
72
|
+
assert(page.has_content?('PA'))
|
73
|
+
assert(page.has_content?('19106'))
|
74
|
+
assert(page.has_content?('Credit Card'))
|
75
|
+
assert(page.has_content?('-1')) # Card Number
|
76
|
+
assert(page.has_content?('Authorize'))
|
77
|
+
assert(page.has_content?('Success'))
|
78
|
+
assert(page.has_content?("#{Money.default_currency.symbol}11.00")) # Auth Amount
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_fraud
|
82
|
+
order = create_fraudulent_order
|
83
|
+
visit admin.order_path(order)
|
84
|
+
click_link t('workarea.admin.orders.attributes.fraud.title')
|
85
|
+
assert(page.has_content?('Declined')) # decision
|
86
|
+
assert(page.has_content?(order.fraud_decision.message))
|
87
|
+
assert(page.has_content?(order.fraud_decision.response))
|
77
88
|
end
|
78
89
|
|
79
90
|
def test_timeline
|
@@ -89,9 +100,9 @@ module Workarea
|
|
89
100
|
)
|
90
101
|
|
91
102
|
visit admin.order_path(order)
|
92
|
-
|
93
|
-
|
94
|
-
|
103
|
+
assert_match(t('workarea.admin.orders.timeline.placed'), page.body)
|
104
|
+
assert_match(shipped_content, page.body)
|
105
|
+
assert_match(auth_content, page.body)
|
95
106
|
|
96
107
|
click_link t('workarea.admin.timeline.card.title')
|
97
108
|
|
@@ -6,38 +6,40 @@ module Workarea
|
|
6
6
|
include Admin::IntegrationTest
|
7
7
|
|
8
8
|
def test_viewing_transactions
|
9
|
-
Workarea.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
9
|
+
Workarea.config.checkout_payment_action = {
|
10
|
+
not_shipped: 'authorize!',
|
11
|
+
shipped: 'authorize!',
|
12
|
+
mixed: 'authorize!'
|
13
|
+
}
|
14
|
+
|
15
|
+
order = create_placed_order(id: 'FOO')
|
16
|
+
payment = Payment.find(order.id)
|
17
|
+
auth = payment.credit_card.transactions.first
|
18
|
+
capture = payment.credit_card.build_transaction(
|
19
|
+
action: 'capture',
|
20
|
+
amount: auth.amount,
|
21
|
+
reference: auth
|
22
|
+
)
|
23
|
+
capture.complete!
|
24
|
+
|
25
|
+
visit admin.payment_transactions_path
|
26
|
+
|
27
|
+
click_button 'Transaction'
|
28
|
+
assert(page.has_content?('Authorize (1)'))
|
29
|
+
assert(page.has_content?('Capture (1)'))
|
30
|
+
click_button 'Transaction' # closes filter dropdown
|
31
|
+
|
32
|
+
click_button 'Auth Status'
|
33
|
+
assert(page.has_content?('Captured (1)'))
|
34
|
+
|
35
|
+
visit admin.payment_transactions_path
|
36
|
+
click_link 'Authorize', match: :first
|
37
|
+
|
38
|
+
assert(page.has_content?('Transaction'))
|
39
|
+
assert(page.has_content?('Credit Card'))
|
40
|
+
assert(page.has_content?("#{Money.default_currency.symbol}11.00"))
|
41
|
+
assert(page.has_content?('Bogus Gateway: Forced success'))
|
42
|
+
assert(page.has_content?('Capture'))
|
41
43
|
end
|
42
44
|
end
|
43
45
|
end
|