Fixes Same-Day Date Filtering in Admin
Workarea 3.0.6 fixes search queries where the start and end dates are set to the same value by adding
Workarea::Search::DateFilterTest and modifying the implementations of
Workarea::Search::AdminOrders#filters to use instances of the new
DateFilter instead of
The change also modifies the following integration test methods.
If your application is extending either of the above
filters methods or the associated test methods, update your application code accordingly.
Fixes Parameters in Admin Dashboard Links
Workarea 3.0.6 fixes the link to Today's Signups on the Admin's People dashboard and fixes the links to Today's Orders and Yesterday's Orders on the Orders dashboard.
The change modifies the workarea/admin/dashboards/people.html.haml Admin view and the following helper methods.
If your applications is extending any of the above methods or overriding the above view, review the pull requests and update your application code accordingly.
Fix Empty Country & Region Fields in Storefront
Workarea 3.0.6 fixes country and region fields within Storefront address forms. Prior to this fix, the fields could appear empty on page load or after choosing a saved address, despite the data being present in the model. The change also removes client-side validation on the region field since some countries don't have regions.
The following sections summarize the changes to Core and Storefront.
The changes modify
Workarea::Address#region_name and add
Also added are
Workarea::AddressValidationTest#test_as_json. The following instance methods are also moved from
Workarea::AddressValidationTest due to a module name being corrected.
The changes modify the implementation of the following helper methods.
The changes modify the workarea/storefront/shared/_address_fields.html.haml view and the
Workarea::Storefront::LoggedInCheckoutSystemTest#test_preselecting_addresses_from_saved_addresses helper method. The following helper methods are added.
Fixes Async Add to Cart
Async add to cart in the Storefront can fail due to an XHR race condition causing the cookie with the current order id to be replaced after the item is added to cart. Workarea 3.0.6 makes the following changes within the Storefront to mitigate this and similar problems.
Workarea::Storefront::HttpCaching#cache_pageto disable session on pages with HTTP caching.
- Modify workarea/storefront/modules/product_details_sku_selects.js to disable the add to cart button while a SKU change request is pending.
cache_page, you should update your application code to ensure this patch is applied correctly.
Fixes Mobile Navigation Behavior
Prior to 3.0.6, clicking a menu within the Storefront's mobile navigation could reload the page instead of asynchronously loading the menu's content. Workarea 3.0.6 fixes this problem by modifying the workarea/storefront/menus/index.html.haml Storefront view, binding the behavior to the presence of the menu's content rather than the taxon's children (which is irrelevant in this context). The change also modifies the
Workarea::Storefront::NavigationSystemTest#test_mobile_navigation_menus system test method.
If your application is overriding this view, you should apply this change in your copy of the file to apply the fix.
Fix Workarea Configuration within System Tests
Workarea 3.0.6 changes
Workarea.with_config to use instance variables rather than thread variables since Capybara runs its server in a separate thread.
If your application is extending these methods, update your application code accordingly to prevent unexpected behavior in the Test environment.
Fixes Fulfillment Quantities in Admin
Workarea 3.0.6 fixes incorrect fulfillment quantities in the Admin when multiple fulfillment events affect a fulfillment item (such as shipping an order, then canceling it).
The change renames
Workarea::Fulfillment::Package#events_by_item and modifies implementation details within the following methods.
If your application is decorating any of these APIs, review the pull request and update your application code accordingly.
In the test environment, Workarea loads workarea/core/feature_spec_helper.js in the Storefront to explicitly fail various browser feature tests (such as animations and touch support) that are undesirable or incorrectly reported in the test environment (PhantomJS). Prior to 3.0.6, this file also removes from the
html element several class values that represent successful browser feature tests. However, a race condition may occur, causing the class values to be added after the code to remove them has run. The inclusion of those classes can cause intermittent test failures.
Workarea 3.0.6 re-orders the contents of the Storefront's workarea/storefront/head.js.erb manifest to avoid this race condition. The change also removes code that is no longer needed after changing the load order.
If your application is overriding this manifest, you must update your copy of the file to avoid intermittent test failures.
Fixes Storefront Error Dialog
Workarea 3.0.6 fixes the Storefront error dialog by correcting the value of
Allows Plugins to Extend Test Setup & Configuration
Workarea Testing 3.0.6 allows each Workarea plugin to provide additional test support files within its test/support/ directory. These files may be used to add or extend the test setup and configuration as needed for the plugin.
require these files from each installed plugin when running tests.
# workarea-testing/lib/workarea/test_help.rb # ... Workarea::Plugin.installed.each do |plugin| Dir[plugin.root.join('test', 'support', '**', '*.rb')].each do |support_file| require support_file end end