diff --git a/tests/src/FunctionalJavascript/ParagraphsTestBaseTrait.php b/tests/src/FunctionalJavascript/ParagraphsTestBaseTrait.php
new file mode 100644
index 0000000..7e94fd3
--- /dev/null
+++ b/tests/src/FunctionalJavascript/ParagraphsTestBaseTrait.php
@@ -0,0 +1,99 @@
+<?php
+
+namespace Drupal\Tests\paragraphs\FunctionalJavascript;
+use Drupal\Core\Entity\Entity\EntityFormDisplay;
+use Drupal\Core\Entity\Entity\EntityViewDisplay;
+use Drupal\field\Entity\FieldConfig;
+use Drupal\field\Entity\FieldStorageConfig;
+use Drupal\node\Entity\NodeType;
+use Drupal\paragraphs\Entity\ParagraphsType;
+
+/**
+ * Test trait for Paragraphs JS tests.
+ */
+trait ParagraphsTestBaseTrait {
+
+  /**
+   * Adds a content type with a Paragraphs field.
+   *
+   * @param string $content_type_name
+   *   Content type name to be used.
+   * @param string $paragraphs_field_name
+   *   Paragraphs field name to be used.
+   */
+  protected function addParagraphedContentType($content_type_name, $paragraphs_field_name) {
+    // Create the content type.
+    $node_type = NodeType::create([
+      'type' => $content_type_name,
+      'name' => $content_type_name,
+    ]);
+    $node_type->save();
+
+    $this->addParagraphsField($content_type_name, $paragraphs_field_name, 'node');
+  }
+
+  /**
+   * Adds a Paragraphs field to a given $entity_type.
+   *
+   * @param string $entity_type_name
+   *   Entity type name to be used.
+   * @param string $paragraphs_field_name
+   *   Paragraphs field name to be used.
+   * @param string $entity_type
+   *   Entity type where to add the field.
+   */
+  protected function addParagraphsField($entity_type_name, $paragraphs_field_name, $entity_type) {
+    // Add a paragraphs field.
+    $field_storage = FieldStorageConfig::create([
+      'field_name' => $paragraphs_field_name,
+      'entity_type' => $entity_type,
+      'type' => 'entity_reference_revisions',
+      'cardinality' => '-1',
+      'settings' => [
+        'target_type' => 'paragraph',
+      ],
+    ]);
+    $field_storage->save();
+    $field = FieldConfig::create([
+      'field_storage' => $field_storage,
+      'bundle' => $entity_type_name,
+      'settings' => [
+        'handler' => 'default:paragraph',
+        'handler_settings' => ['target_bundles' => NULL],
+      ],
+    ]);
+    $field->save();
+
+    $form_display = EntityFormDisplay::create([
+      'targetEntityType' => $entity_type,
+      'bundle' => $entity_type_name,
+      'mode' => 'default',
+      'status' => TRUE,
+    ])
+      ->setComponent($paragraphs_field_name, ['type' => 'paragraphs']);
+    $form_display->save();
+
+    $view_display = EntityViewDisplay::create([
+      'targetEntityType' => $entity_type,
+      'bundle' => $entity_type_name,
+      'mode' => 'default',
+      'status' => TRUE,
+    ])->setComponent($paragraphs_field_name, ['type' => 'entity_reference_revisions_entity_view']);
+    $view_display->save();
+  }
+
+  /**
+   * Adds a Paragraphs type.
+   *
+   * @param string $paragraphs_type_name
+   *   Paragraph type name used to create.
+   */
+  protected function addParagraphsType($paragraphs_type_name) {
+    $paragraphs_type = ParagraphsType::create([
+      'id' => $paragraphs_type_name,
+      'label' => $paragraphs_type_name,
+    ]);
+    $paragraphs_type->save();
+  }
+
+}
