apigee / apigee-m10n-drupal

Add monetization features to a Drupal developer portal
https://www.drupal.org/project/apigee_m10n
GNU General Public License v2.0
13 stars 13 forks source link

Test and Lint errors for Apigee m10n add credit testcases #473

Closed kedarkhaire closed 7 months ago

kedarkhaire commented 8 months ago

Description

Test cases are failing from Apigee m10n add credit module

Error Details

Behat\Mink\Exception\DriverException: Only string values can be used for a input element.

Expected Behavior

Testcases should pass successfully

kedarkhaire commented 7 months ago

The changes are made in testcases because in commerce module it takes all the integer, float, decimal, string values as a string only - https://docs.drupalcommerce.org/commerce2/developer-guide/pricing/prices Boolean values True & False are accepted, they don't need to be converted.

kedarkhaire commented 7 months ago

Changes made in AddCreditAddToCartForm.php file is made as per the recent changes made in AddtoCart.php file from Commerce Cart module v2.36 to v2.37. Instead of redefining the variables and missing any other, we use parent::create($container), this has all the required things for AddtoCart commerce cart functionality. Additional variables & objects can be defined in create using container and defining it to the instance created.