Skip to content

Releases: subhojit777/dc_ajax_add_cart

Ajaxify the update cart button

08 Feb 07:00
Compare
Choose a tag to compare

New features:

  • Issue [#2910741] by subhojit777: Ajaxify the Update cart button
    • Changes made in the other test view, so that the test helper functions can be reused, without changing CSS class.
    • Fixed random failing test. The fix is done by removing the randomness in the test.
    • I was unable to find the reason why quantity didn't get updated in case of the first product variation. The test failed asserting that for the first product variation the quantity is updated. The test was passing when second product variation was randomly chosen to be updated. Even in the test screenshots it clearly showed that the quantity is updated for the first product variation.
    • Added more tests: Test whether the update cart button is indeed ajaxified. Test whether the order total is correct after quantity update.
  • Known issues:
    • [#2941531]
    • [#2941532]

Test improvements:

  • Issue [#2935858] by subhojit777: [Test Improvement] Move common setup tasks to the views base test class
  • Issue [#2910746] by subhojit777: Fixed incorrect xpath query in the test
  • TravisCI changes:
    • Notify on test failures.
    • Drupal core version lowered in TravisCI tests. This is done to suppress deprecation warnings.
    • Removed PHP 7 support. The tests which checked whether the ajax features are working, those were failing in case of Drupal 8.5 and PHP 7.
    • Drupal 8.5 support has been removed earlier. You can see it here.

Ajaxify the Remove from cart button

10 Jan 07:07
Compare
Choose a tag to compare
  • Issue [#2910740] by subhojit777: Ajaxify the Remove from cart button
  • The ajaxified remove button as a views field. This field is available after enabling dc_ajax_add_cart_views module. This is available as a sub-module.

    Tests included:

    • Test the ajax product remove button.
    • Test whether the product remove button is indeed ajaxified.
    • Test whether the product total on cart is correct after ajax remove of a product.
    • Tests are updated so that it checks both the front-end and back-end.
  • by subhojit777: Fix stalling tests on TravisCI
    • Run functional JavaScript tests separately. Borrowed the idea from drupalcommerce/commerce. Thanks to Matt Glaman.
    • Restrict drupal-ti to particular commit.
    • Remove xdebug in TravisCI builds.
    • Lower Ubuntu version on TravisCI
      • This fixes the stalling tests on TravisCI.
      • Earlier I thought that the problem is in the tests itself, but later confirmed that the problem is with PhantomJS.
      • The issue was due to PhantomJS. PhantomJS 2.1.1 + Ubuntu Trusty is the reason the tests were stalling. But recently, after Googling and debugging I was quite sure that the stalling problem is due to PhantomJS 2.1.1. There I have also restricted PhantomJS version to 2.0.0.
      • I was able to replicate this in my local also. Tests in local never worked if PhantomJS and the tests are run in the same window.
      • How the tests worked earlier is still unknown. And for the sake of progress, I have decided not to spend more time on investigating this. I have already spent a month trying to get it work.
      • Thanks to [Pasi Kauraniemi](https://github.com/mitrpaka) for confirming the problem. https://github.com/drupalcommerce/commerce/pull/765#issuecomment-355888268
  • by subhojit777: TravisCI test improvements
    • Added Drupal code standard checks.

    Ajaxify the update of cart block

    23 Nov 06:53
    Compare
    Choose a tag to compare
    • Issue [#2925451] by subhojit777: Update the module as per latest the Drupal Commerce
    • Issue [#2923410] by subhojit777: [Code Improvement] dc_ajax_add_cart.refresh_page_elements_helper should be responsible for updating add to cart form
    • Issue [#2919633] by subhojit777: [Code Improvement] Use container for loading services in RefreshPageElementsHelper
      • Fixed a problem with Symfony ContainerInterface.
      • Made `refreshAddToCartForm()` non-static so that it has access to the current form object. Thanks to https://api.drupal.org/comment/62339#comment-62339.
      • Using `dc_ajax_add_cart.refresh_page_elements_helper` inside AjaxAddToCartForm.
      • Updated tests.
    • Issue [#2915360] by subhojit777: Review the approach of showing confirmation messages
    • Issue [#2920694] by subhojit777: [Code Improvement] Unhardcode status message block id inside RefreshPageElementsHelper
    • Issue [#2921187]: [Test Improvement] Check return type of RefreshPageElementsHelper update methods
    • Issue #2910746 by subhojit777: Ajaxify the update of cart block
      • Kernel tests for `getCartBlock()`, `updateCart()`, `updatePageElements()`.
      • Update of cart block implemented.
      • Tests updated.
    • Issue [#2919191] by subhojit777: [Code Improvement] Remove the static usages of methods in RefreshPageElementsHelper
    • Issue [#2917569] by subhojit777: [Code Improvement] Move methods for refreshing page elements into a helper class
      • Negative tests added.
      • Code updated as per the definition of `updateStatusMessages()`.
      • Since `updateStatusMessages()` returns an object, `refreshAddToCartForm()` is updated so that it returns the output from `updateStatusMessages()`, rather than returning the updated response.
    • Issue [#2910738] by subhojit777: Code improvements
      • Added test message.
      • Added notes for further improvements.

    Ajaxify the confirmation message

    11 Oct 06:36
    Compare
    Choose a tag to compare

    Bug fixes:

    • Add to cart form not ajaxified
    • Issue #2905814 by subhojit777: Multiple ajax submit

    New features:

    • Issue #2910738 by subhojit777: Ajaxify the confirmation message

    QA

    • TravisCI integration