Closed pogster closed 6 years ago
Hi @pogster do you think you can have a look over the travis failures and see if you can solve them? If you have any issues fixing these feel free to drop me a message.
@dmanners managed to. Yaay! I'm impressed by the unit tests actually.
Could you also take a look at the static tests:
1) Magento\Test\Php\LiveCodeTest::testCodeStyle
PHP Code Sniffer detected 1 violation(s):
FILE: ...provements/app/code/Magento/CustomerImportExport/Model/Import/Customer.php
--------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------
598 | ERROR | Line exceeds maximum limit of 120 characters; contains 133
| | characters
599 | ERROR | Line exceeds maximum limit of 120 characters; contains 125
| | characters
--------------------------------------------------------------------------------
Yeah my refactoring screwed them up. I will look for something to support the M2 coding standards. And run the functional tests.
@dmanners it seems the integration tests are timing out? is that a known issue or something?
@pogster let me check on those timing out tests for you.
@pogster thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.
Description
As the issue describes, when on customer import the first name or last name are supplied with a whitespace value, validation will not fail as opposed to editing a customer on the backend. The file succeeds to validate and import. This should not be the case. Furthermore, when both first and last name are invalidated, both validation failures should show on the import messages.
As a solution, I moved the required field validation before the attribute validation and added a check for empty strings after trimming.
Additionally, with that solution, only a validation error for the first failed field would show. This is caused by the error code valueIsRequired / line 1 (for example) is used for each field, but the ProcessingErrorAggregator only allows one error of the same code per line. I did not find out in which scenario this would be relevant and removed the code, undoing an earlier commit.
Fixed Issues (if relevant)
Manual testing scenarios
Test data for csv:
Steps to reproduce
Contribution checklist