diff --git a/src/Tests/ParagraphsAccessTest.php b/tests/src/Functional/ParagraphsAccessTest.php
similarity index 81%
rename from src/Tests/ParagraphsAccessTest.php
rename to tests/src/Functional/ParagraphsAccessTest.php
index 3a2a6d2..1aa6851 100644
--- a/src/Tests/ParagraphsAccessTest.php
+++ b/tests/src/Functional/ParagraphsAccessTest.php
@@ -1,10 +1,10 @@
 <?php
 
-namespace Drupal\paragraphs\Tests;
+namespace Drupal\Tests\paragraphs\Functional;
 
 use Drupal\Core\Entity\Entity;
 use Drupal\field_ui\Tests\FieldUiTestTrait;
-use Drupal\simpletest\WebTestBase;
+use Drupal\Tests\BrowserTestBase;
 use Drupal\user\RoleInterface;
 use Drupal\user\Entity\Role;
 
@@ -13,7 +13,7 @@ use Drupal\user\Entity\Role;
  *
  * @group paragraphs
  */
-class ParagraphsAccessTest extends WebTestBase {
+class ParagraphsAccessTest extends BrowserTestBase {
 
   use FieldUiTestTrait;
 
@@ -82,37 +82,36 @@ class ParagraphsAccessTest extends WebTestBase {
     $this->drupalGet('node/add/paragraphed_content_demo');
 
     // Add a new paragraphs images item.
-    $this->drupalPostForm(NULL, NULL, t('Add Images'));
+    $this->drupalPostForm(NULL, array(), t('Add Images'));
 
     // Create a file, upload it.
-    $text = 'Trust me I\'m an image';
-    file_put_contents('temporary://privateImage.jpg', $text);
+    $black_pixel = base64_decode('R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=');
+    file_put_contents('temporary://privateImage.jpg', $black_pixel);
     $file_path = $this->container->get('file_system')
       ->realpath('temporary://privateImage.jpg');
 
     // Create a file, upload it.
-    $text = 'Trust me I\'m an image 2';
-    file_put_contents('temporary://privateImage2.jpg', $text);
+    file_put_contents('temporary://privateImage2.jpg', $black_pixel);
     $file_path_2 = $this->container->get('file_system')
       ->realpath('temporary://privateImage2.jpg');
 
     $edit = array(
+      'files[field_paragraphs_demo_0_subform_field_images_demo_0][]' => $file_path,
+    );
+    $this->drupalPostForm(NULL, $edit, t('Upload'));
+
+    $edit = array(
       'title[0][value]' => 'Security test node',
-      'files[field_paragraphs_demo_0_subform_field_images_demo_0][]' => [$file_path, $file_path_2],
+      'files[field_paragraphs_demo_0_subform_field_images_demo_1][]' => $file_path_2,
     );
 
     $this->drupalPostForm(NULL, $edit, t('Preview'));
     $img1_url = file_create_url(\Drupal::token()->replace('private://privateImage.jpg'));
     $image_url = file_url_transform_relative($img1_url);
     $this->assertRaw($image_url, 'Image was found in preview');
+
     $this->clickLink(t('Back to content editing'));
-    $edit = [
-      'field_paragraphs_demo[0][subform][field_images_demo][0][width]' => 100,
-      'field_paragraphs_demo[0][subform][field_images_demo][0][height]' => 100,
-      'field_paragraphs_demo[0][subform][field_images_demo][1][width]' => 100,
-      'field_paragraphs_demo[0][subform][field_images_demo][1][height]' => 100,
-    ];
-    $this->drupalPostForm(NULL, $edit, 'Save and publish');
+    $this->drupalPostForm(NULL, array(), 'Save and publish');
 
     $node = $this->drupalGetNodeByTitle('Security test node');
 
@@ -141,7 +140,7 @@ class ParagraphsAccessTest extends WebTestBase {
     $this->drupalLogin($admin_user);
     // Create a new demo node.
     $this->drupalGet('node/add/paragraphed_content_demo');
-    $this->drupalPostForm(NULL, NULL, t('Add Text'));
+    $this->drupalPostForm(NULL, array(), t('Add Text'));
     $this->assertText('Type: Text');
     $edit = [
       'title[0][value]' => 'delete_permissions',
@@ -153,8 +152,8 @@ class ParagraphsAccessTest extends WebTestBase {
     // Check the remove button is present.
     $this->assertNotNull($this->xpath('//*[@name="field_paragraphs_demo_0_remove"]'));
     // Delete the Paragraph and save.
-    $this->drupalPostAjaxForm(NULL, [], 'field_paragraphs_demo_0_remove');
-    $this->drupalPostAjaxForm(NULL, [], 'field_paragraphs_demo_0_confirm_remove');
+    $this->drupalPostForm(NULL, [], 'field_paragraphs_demo_0_remove');
+    $this->drupalPostForm(NULL, [], 'field_paragraphs_demo_0_confirm_remove');
     $this->drupalPostForm(NULL, [], t('Save and keep published'));
     $node = $this->getNodeByTitle('delete_permissions');
     $this->assertUrl('node/' . $node->id());
