CsvImporter test

When learning about Kernel tests, we wrote a test for the CsvImporter that focused on the importing functionality given an existing Importer configuration entity (which we created programmatically). However, another important angle of this functionality is the process of creating this configuration entity as we are relying on Ajax to dynamically inject form elements related to the selected Importer plugin. So let's write a test for that as well.

Just as before, the test class can start with something like this:

namespace Drupal\Tests\products\FunctionalJavascript; use Drupal\file\Entity\File; use Drupal\FunctionalJavascriptTests\JavascriptTestBase; use Drupal\products\Entity\Importer; use Drupal\products\Entity\ProductType; ...

Get Drupal 8 Module Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.