Commit Graph
50 Commits
Author SHA1 Message Date
Akash Jain 121634f8f3 Improved: Unit test case for service - createProductConfigOption (OFBIZ-9090)
Thanks, Pradhan Yash Sharma for your contribution
2020-08-22 23:21:57 +05:30
Akash Jain bc95f057f2 Improved: Convert ProductTest.xml to Groovy (OFBIZ-11852) 2020-08-04 21:52:08 +05:30
Jacques Le Roux 782cd7da63 Improved: Convert ProductTagTest.xml to Groovy (OFBIZ-11857)
This can be tested using

./gradlew "ofbiz --test component=product --test suitename=producttagtests"

Thanks: Akash Jain for report, Anushi Gupta for the patch
2020-07-28 11:54:48 +02:00
Pawan Verma 5799c7e5e4 Improved: Convert CostTests.xml to Groovy(OFBIZ-11859)
Thanks, Akash for report and Anushi for the Patch.
2020-07-25 17:25:42 +05:30
Pawan Verma a779bdc5f0 Improved: Convert ProductPriceTests.xml to Groovy(OFBIZ-11856)
Thanks, Akash for report and Anushi for patch.
2020-07-25 11:49:28 +05:30
Akash Jain e111f194b3 Improved: Convert InventoryTests.xml to Groovy (OFBIZ-11851) 2020-07-08 11:47:35 +05:30
Akash Jain cb3b99b9d5 Improved: Convert ShipmentTests.xml to Groovy (OFBIZ-11850) 2020-07-07 11:37:45 +05:30
Pawan Verma ff53e54a4e Improved: Groovy DSL test case for service addProductCategoryToCategory and getProductCategoryAndLimitedMembers (#111)
* Improved: Groovy DSL test case for service addProductCategoryToCategory and getProductCategoryAndLimitedMembers
(OFBIZ-9088)

Thanks: Pradhan Yash Sharma for report and initial patch and Suraj and Jacques for the review.
2020-05-06 11:33:44 +05:30
Jacques Le Roux 649614507b Fixed: The producttests test suite is brooken
(OFBIZ-11620)

It was initially broken by OFBIZ-9905 so only trunk was concerned.
The fix is simple: there should be no space at the beginning of the file.

But then, when running the test suite, other issues raise.
I guess they  were hidden because of the initial issue.

OFBIZ-10231 introduced 2 issues
A syntax error:
product.removeRelated("ProductKeyword", product)
instead of
product.removeRelated("ProductKeyword")

A wrong usage of storeByCondition

This fixes the 3 issues, to test:
gradlew "ofbiz --test component=product --test suitename=producttests"

Thanks: Pawan for initial report
2020-04-29 10:02:07 +02:00
Mathieu Lirzin 9b68a55d64 Improved: Compile groovy integration tests
(OFBIZ-11165)

Since there is no need for dynamic reload for integration tests,
it is better to compile Groovy tests.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865786 13f79535-47bb-0310-9956-ffa450edef68
2019-08-23 18:00:01 +00:00
Jacques Le Roux 4d646ce052 Improved: Use "Create" instead of "Create New" on the various screens of all
components
(OFBIZ-9905)

As the title says + removes now useless labels

Thanks: Aayush Jain for report, Sourabh Jain for the fix, Pierre Smits and 
Rishi Solanki for comments

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858291 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 17:56:44 +00:00
Aditya Sharma eaa00b8c25 Added: Unit test case for service - createProductFeatureType
(OFBIZ-9089)
Slightly modified patch. Improved class name and file name.
Thanks Pradhan Yash Sharma for reporting and initial patch & Yogesh Naroliya for providing updated patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856613 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 09:37:07 +00:00
Suraj Khurana f3fd5ad42a Added: Unit test case for service - updateProductCategory.
(OFBIZ-8579)
Thanks Akash Jain for reporting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856608 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 06:57:58 +00:00
Nicolas Malin a3c1177bc8 Improved: Migrate product promotion condition and action rule on SOA
(OFBIZ-10370)

Currently promotion rule engine works with :
    entities ProductPromoCond et ProductPromoAction
    java linear function ProductPromoWorker.checkCondition() (ProductPromoWorker:910) and ProductPromoWorker.performAction (ProductPromoWorker:1423)
    Enumeration list to indicate on java function what piece of code to activate the control or action

The problem with this structure is when you want to create a new case of condition or action, you need to modify the framework code base.

We convert the 2 big java leaner function to service representation with one service by case. To realize it we introduce a relation with CustomMethod :
  ProductPromoRule --> ProductPromoCond   -> CustomMethod
                    -> ProductPromoAction -> CustomMethod
Each functions's case are converted to service with a related CustomMethod.
With this pattern now you can write your own condition rule and action rule on your plugin and link it on the promo engine

For backward compatibility purpose, current "PPIP" enumeration entries receive in enumCode data the new corresponding customMethodId reference, to ensure that old data works fine with the new engine
on EntityData
 <CustomMethod customMethodId="PPC_PRODUCT_AMOUNT" customMethodTypeId="PRODUCT_PROMO_COND" customMethodName="productPromoCondProductAmount" description="Product amount"/>
 <Enumeration enumId="PPIP_PRODUCT_AMOUNT" enumCode="PPC_PRODUCT_AMOUNT"/><!--link enumeration with customMethod for backward compatibility-->
on Java
 //for backward compatibility resolve customMethodId from enumCode
 GenericValue condEnum = EntityQuery.use(delegator).from("Enumeration").where("enumId", inputParamEnumId).cache().queryOne();
 if (condEnum != null) {
     customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", condEnum.get("enumCode")).cache().queryOne();
     if (customMethod == null) {
         Debug.logWarning("The oldest enumeration " + inputParamEnumId + " for promo " + productPromoCond.getPkShortValueString() + " haven't the new customMethod to use, please check your data or load seed data", module);
         return false;
     }
     serviceName = customMethod.getString("customMethodName");
 }

Many thanks to Ziri Khalifa and Leila Mekika for their helping work

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831783 13f79535-47bb-0310-9956-ffa450edef68
2018-05-17 14:03:46 +00:00
Rishi Solanki cfef87d6f1 Improved: Remove empty field values from xml data files so that it will not override existing data with empty values. Removed all empty data fields from data files.
(OFBIZ-10282)
Thanks to Arun Patidar for reporting and review.
Thanks to Suraj Khurana for providing patch for the improvement.
Thanks to Jacques for discussion and finalizing the work.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830545 13f79535-47bb-0310-9956-ffa450edef68
2018-04-30 10:52:55 +00:00
Deepak Dixit acbeffc9df Improved: Added unit test case for following product related services
- createProduct, updateProduct
- duplicateProduct
- quickAddVariant
- deleteProductKeywords
- discontinueProductSales
- createProductReview
- updateProductReview
- findProductById
- createProductPrice, updateProductPrice, deleteProductPrice
- createProductCategory
(OFBIZ-8412)(OFBIZ-8506)(OFBIZ-8571)(OFBIZ-8654)(OFBIZ-8572)(OFBIZ-8573)(OFBIZ-8574)
(OFBIZ-8656)(OFBIZ-8575)(OFBIZ-8576)(OFBIZ-8577)(OFBIZ-8578)(OFBIZ-8655)

Thanks Akash Jain and Yash Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767977 13f79535-47bb-0310-9956-ffa450edef68
2016-11-03 21:16:42 +00:00
Mridul Pathak b5ca6bddfb [OFBIZ-7904] Remove system generated fields from data files of Product component. Thanks Suraj Khurana for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755299 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:01:52 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Jacques Le Roux ec66e361e1 A big but straightforward commit for "Move minilang scripts from component://componentname/script/org/ofbiz to component://componentname/minilang" - https://issues.apache.org/jira/browse/OFBIZ-7267
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)

I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix 

I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to 
  "The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 14:04:30 +00:00
Jacques Le Roux 240ad839a4 A patch from Youssef Khaye to finally fix "Incorrect quantityNotAvailable for OrderItemShipGrpInvRes when issuing items to shipments" https://issues.apache.org/jira/browse/OFBIZ-5364
This patch fixes the problem from a functional point of view and consequently the JUnit test in question.

In fact, functionally speaking, The previous patch is not good in measure or it does not take into account that an OrderItem might use several lines of stock InventoryItem.
orderId     orderItemSeqId  orderItemShipGrpSeqId   InvetoryItemId
10000       000001              10000                               000001
10000       000001              10001                               000001

So by making a stock exit (ItemIssuance) we can afford to cancel the reservation lines for the line of stock in question but not all the lines of stock.
That's why I added the lines in the inventoryItemId research question and then cancel a reservation!

While at it I reverted r1653056 since testMultipleInventoryItemIssuance now passes

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1656185 13f79535-47bb-0310-9956-ffa450edef68
2015-01-31 11:37:14 +00:00
Jacques Le Roux 1a6dfc2dce Temporary removes this test (testMultipleInventoryItemIssuance) after r1649408 and r1650455
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1653056 13f79535-47bb-0310-9956-ffa450edef68
2015-01-19 17:16:52 +00:00
Erwan de Ferrieres 33307ddd39 missing ASL2 license headers
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230981 13f79535-47bb-0310-9956-ffa450edef68
2012-01-13 10:33:22 +00:00
Hans Bakker 0b2921ed6d - Fix 2 log warnings when checking the entity definitions.
- Using iterate for each keyword type forms.
- Create a screen for display when the tags is created.
- Create junit test for product tag.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1224689 13f79535-47bb-0310-9956-ffa450edef68
2011-12-26 07:42:42 +00:00
Hans Bakker 758b8c69d9 first version of the implementation of group orders
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1204805 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 04:10:55 +00:00
Jacques Le Roux 60161e2d26 A patch from Paul Foxworthy "Order not completed when filled from more than one InventoryItem" https://issues.apache.org/jira/browse/OFBIZ-4386
There is a nasty bug in IssuanceServices in the situation where the order is filled from more than one InventoryItem. When the order is created, there are OrderItemShipGrpInvRes reservations created for all the inventory items needed to fill the order.
In the simple method issueOrderItemShipGrpInvResToShipment in IssuanceServices, at line 173 (https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?hb=true#to173), there is an assumption that if the OrderShipment already exists, we are some sort of adjustment, and we should adjust the OrderShipment quantity by the difference between the old OrderShipment quantity and the new one. This all works fine in the situation where there is only one InventoryItem needed to fill the order. However, if there are two or more InventoryItems, the simple method is called twice, and an incorrect quantity is calculated.

The crux of the problem is that OrderShipment doesn't care about InventoryItems, so there will be only one OrderShipment row for a given product. In contrast, ItemIssuance does care about InventoryItems, so there will be more than one if the product is supplied from more than one InventoryItem. The ItemIssuance code doesn't take account of this distinction.

I have provided two patches. One is a new unit test that exemplifies the bug. If you just apply this patch to trunk, the unit test will fail with an OrderShipment quantity of 4 when it ought to be 6.

The other patch is my fix for IssuanceServices, which now looks for a relevant ItemIssuance to decide if we are adjusting quantities, or creating a new ItemIssuance (and possibly a new OrderShipment).

jleroux: only the test part (not backported)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1185188 13f79535-47bb-0310-9956-ffa450edef68
2011-10-17 14:07:41 +00:00
Adam Heath b273b52dad Finally created a script to find and fix tons of missing final newlines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@982870 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 04:46:48 +00:00
Jacopo Cappellato 8db8db7ae8 Automated test for the product standard cost algorithm.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@909331 13f79535-47bb-0310-9956-ffa450edef68
2010-02-12 10:12:37 +00:00
Vikas Mayur 55ffa688b7 A test case for service getProductCategoryAndLimitedMembers
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907450 13f79535-47bb-0310-9956-ffa450edef68
2010-02-07 17:01:23 +00:00
Vikas Mayur 6c333706b6 Since test data files were kept under testdef/data folder so moving the file to correct location.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907437 13f79535-47bb-0310-9956-ffa450edef68
2010-02-07 15:57:38 +00:00
Vikas Mayur 1c9b1e7f2d Added a bunch of test case related to product price.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907202 13f79535-47bb-0310-9956-ffa450edef68
2010-02-06 11:49:07 +00:00
Vikas Mayur ed5a077b19 Added a test case to check QOH and ATP for a product in a facility. Also removed a comment for the test definition file that is no longer valid.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907179 13f79535-47bb-0310-9956-ffa450edef68
2010-02-06 07:03:38 +00:00
Vikas Mayur 7c288085ff Minor cleanup. Removed unnecessary log statements, improved test case name etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907178 13f79535-47bb-0310-9956-ffa450edef68
2010-02-06 06:46:07 +00:00
Vikas Mayur c850c4ebf8 Correction over last commit. Actually the place was not appropriate when I again have a look. Also changed the name of the test file to be more specific rather then a generic name since the file supposed to contain test case on inventory system.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907177 13f79535-47bb-0310-9956-ffa450edef68
2010-02-06 06:06:54 +00:00
Vikas Mayur 8d7087a128 Moved test case to more appropriate place.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@907176 13f79535-47bb-0310-9956-ffa450edef68
2010-02-06 05:52:40 +00:00
Scott Gray e556c70ca1 Changed all test suites (where appropriate) containing simple method tests to use the new location only definition so that all tests from a given simple methods document are automatically included
Required changing the names of a couple of inline methods in PartyTests.xml

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893665 13f79535-47bb-0310-9956-ffa450edef68
2009-12-24 00:41:27 +00:00
Scott Gray 78feba344c Removed ProductTest.xml, it only contained tests that were already present in FacilityTest.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@893663 13f79535-47bb-0310-9956-ffa450edef68
2009-12-24 00:40:30 +00:00
Scott Gray 7507a2663e Removed a commented test case for which the class didn't exist, add two missing cases
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826316 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 22:24:55 +00:00
Scott Gray 4493e9d3fc third time lucky, corrected location path
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826235 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 11:33:37 +00:00
Scott Gray 916f959c9c Missed changing the location file name
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826226 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 11:11:19 +00:00
Scott Gray 4f640fddbb Moved a shipment test definition out of the product tests def and into the shipments.
Also moved the test itself out of ShipmentServices.xml and into ShipmentTests.xml

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826220 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 10:37:32 +00:00
Scott Gray ec77643ba7 Removed "Services" from the simple method test script file names, they aren't service implementations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826219 13f79535-47bb-0310-9956-ffa450edef68
2009-10-17 10:21:03 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Vikas Mayur 92409d82a9 Applied a modified patch for testing the process of Receive Inventory (Non-Serialized items) from Jira Issue OFBIZ-1675(https://issues.apache.org/jira/browse/OFBIZ-1675).
Thanks Parimal Gain, Sumit Pandit and Ratnesh Upadhyay for working on this issue.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@667391 13f79535-47bb-0310-9956-ffa450edef68
2008-06-13 07:15:41 +00:00
Vikas Mayur 554dec4b98 Removed duplicate test cases for testing UserLogin in database - There is already one in example component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@667067 13f79535-47bb-0310-9956-ffa450edef68
2008-06-12 13:04:12 +00:00
Vikas Mayur 4948aac287 Applied patch for testing shipment process from Jira Issue OFBIZ-1759 (https://issues.apache.org/jira/browse/OFBIZ-1759), Thanks Ratnesh Upadhyay and Brajesh Patel for the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@654836 13f79535-47bb-0310-9956-ffa450edef68
2008-05-09 14:56:05 +00:00
Vikas Mayur 5fd3f401fa Applied patch for testing packing process from Jira OFBIZ-1680 (https://issues.apache.org/jira/browse/OFBIZ-1680), Thanks Ratnesh Upadhyay for providing the patch and also thanks to Mridul Pathak and Alok Agnihotri for their help in review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@651818 13f79535-47bb-0310-9956-ffa450edef68
2008-04-26 12:07:41 +00:00
Marco Risaliti 329326c7e5 A patch from Shubham Goyal "JUnit Test Case for Physical Inventory Adjustment" (OFBIZ-1466)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@642370 13f79535-47bb-0310-9956-ffa450edef68
2008-03-28 20:40:44 +00:00
Marco Risaliti af61b954de A patch from Shubham Goyal "JUnit Test Case for Receive Other Shipment" (OFBIZ-1465)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@642365 13f79535-47bb-0310-9956-ffa450edef68
2008-03-28 20:17:57 +00:00
Vikas Mayur e0b97ce8f2 Test case for Inventory Item Transfer
Applied patch from Jira issue OFBIZ-1471 (https://issues.apache.org/jira/browse/OFBIZ-1471)
With modification to the class name.
Thanks to Ratnesh Upadhyay for testing and posting a improved patch 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@631895 13f79535-47bb-0310-9956-ffa450edef68
2008-02-28 08:58:54 +00:00
Vikas Mayur 42946c06bd Applied patch from Jira Issue OFBIZ-1470 (https://issues.apache.org/jira/browse/OFBIZ-1470)
This issue is about a test case relating to Stock Moves functionality in facility.

Thanks to Alok Agnihotri for testing this patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@631224 13f79535-47bb-0310-9956-ffa450edef68
2008-02-26 14:25:53 +00:00