You are here

WebformElementSignatureTest.php in Webform 8.5

Same filename and directory in other branches
  1. 6.x tests/src/Functional/Element/WebformElementSignatureTest.php

File

tests/src/Functional/Element/WebformElementSignatureTest.php
View source
<?php

namespace Drupal\Tests\webform\Functional\Element;

use Drupal\webform\Entity\Webform;
use Drupal\webform\Entity\WebformSubmission;

/**
 * Tests for signature element.
 *
 * @group webform
 */
class WebformElementSignatureTest extends WebformElementBrowserTestBase {

  /**
   * Webforms to load.
   *
   * @var array
   */
  protected static $testWebforms = [
    'test_element_signature',
  ];

  /**
   * Test signature element.
   */
  public function testSignature() {
    $this
      ->drupalLogin($this->rootUser);
    $webform = Webform::load('test_element_signature');
    $signature_path = '/webform/test_element_signature/signature';
    $signature_directory = 'public://webform/test_element_signature/signature';

    // Check signature display.
    $this
      ->drupalGet('/webform/test_element_signature');
    $this
      ->assertRaw('<input data-drupal-selector="edit-signature" aria-describedby="edit-signature--description" type="hidden" name="signature" value="" class="js-webform-signature form-webform-signature" data-drupal-states="{&quot;disabled&quot;:{&quot;.webform-submission-test-element-signature-add-form :input[name=\\u0022disable\\u0022]&quot;:{&quot;checked&quot;:true}},&quot;readonly&quot;:{&quot;.webform-submission-test-element-signature-add-form :input[name=\\u0022readonly\\u0022]&quot;:{&quot;checked&quot;:true}}}" />');
    $this
      ->assertRaw('<input type="submit" name="op" value="Reset" class="button js-form-submit form-submit" />');
    $this
      ->assertRaw('<canvas></canvas>');
    $this
      ->assertRaw('</div>');
    $this
      ->assertRaw('<div id="edit-signature--description" class="webform-element-description">Sign above</div>');

    // Check signature preview image.
    $this
      ->postSubmissionTest($webform, [], 'Preview');
    $this
      ->assertRaw("{$signature_path}/signature-");
    $this
      ->assertRaw(' alt="Signature" class="webform-signature-image" />');
    $this
      ->assertCount(1, \Drupal::service('file_system')
      ->scanDirectory($signature_directory, '/^signature-.*\\.png$/'));

    // Check signature saved image.
    $sid = $this
      ->postSubmissionTest($webform);
    $webform_submission = WebformSubmission::load($sid);
    $this
      ->assertRaw("{$signature_path}/{$sid}/signature-");
    $this
      ->assertFileExists("{$signature_directory}/{$sid}");
    $this
      ->assertCount(1, \Drupal::service('file_system')
      ->scanDirectory($signature_directory, '/^signature-.*\\.png$/'));

    /**************************************************************************/

    // Validation.

    /**************************************************************************/

    // Check valid signature.
    $this
      ->assertSignature('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqkAAADjCAYAAACmeo3kAAAgAElEQVR4Xu19CfA3RXnmEw9QDlkRUTxwA8aoIKzitfHaNasYFUlKN4paIet9JOUmkUI3HokmitHo5lAxEYlZCVaihQca1C1dD7a8ool4lEZgVYJGVBIREY+49cB08n7v1/Obnp7umT7eqbL8+P/6fLqn5+n3/AnYYwgYAoaAIdAyAj8P4McA3tryJG1uhoAh0B4CP9HelGxGhoAhYAgYAgMClwC45fDvbwI4xJAxBAwBQ6AWBIyk1rJSNk5DwBAwBOYh8B8AfFJVuVSQ1nmtWWlDwBAwBFZGwEjqyoBbd4aAIWAIrITAkwC8xtPXnQH87UpjsG4MAUPAEIhGwEhqNHRW0RAwBAyBohF4AoA/9YzwrwE8uOiR2+AMAUPAEABgJNW2gSFgCBgCbSLwKABnj0ztvgA+2Oa0bVaGgCHQCgJGUltZSZuHIWAIGAJ7IvDvAVw8AsrrAfyyAWYIGAKGQMkIGEkteXVsbIaAIWAILEPgbQBO8DTxAwD7LGvaahsChoAhkBcBI6l58bXWDQFDwBDYGoELABztGcQvAHjL1oOz/g0BQ8AQGEPASKrtDUPAEDAE2kaAwfzP8UzxtwH8VttTt9kZAoZAzQgYSa159WzshoAhYAiEIfCfAPwugJ8Rxb8G4LCw6lbKEDAEDIH1ETCSuj7m1qMhYAgYAlsg4Iub+pMA/t8Wg7E+DQFDwBCYQsBI6hRC9rshYAgYAm0g4MtA9d8A/Fkb07NZGAKGQGsIGEltbUVtPoaAIWAIjCPwY/WThaKy3WIIGALFImAktdilsYEZAoaAIZAcgSsB7CdafT8A2qvaszcC/w7AicOf3wrgnwwkQ8AQWBcBI6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7ONpkOp/Svio2renXARIQv8cwJ3UEKni5+UihvSWO1sb2R4IGEm1DWEIGAKGgCHQAgI+W8WxedHJ5kkmPS122Sk5PXkgoVpSyqD/vFjQqc2exhEwktr4Atv0DAFDwBDoAAGqgc8JmCcJDsmNSU8DwNqoCNfyDAAHe/q3y8VGi7JVt0ZSt0Le+jUEDAFDwBBYisCDAJy2Ixe8bJ8ONjQHMNvTpajnq+9zjHK90fGN5hmm3s+Hf3EtG0ktbklsQIaAIWAIGAITCFAd/B4Adw1AihmNfslSmAYgtW0RH0H9FoDfGLJKGTnddn026d1I6iawW6eGgCFgCBgCCxD4MoBbT9Snat85RhnBWQD2ClV9ERkstNQKwJfehZHU0lfIxmcIGAKGgCEgEdiVwYjl6M3/4sH21MhpuXuHQf4pEf+ZIe3sfmKoJKi0TbX1K3f9VhmZkdRVYLZODAFDwBAwBBIhMJbB6EODw81bjNwkQjpfM1yjE0eaZ+xTElQLzp8P/2paNpJazVLZQA0BQ8AQMAQGBGQGI/6JdqeHGzpVIDB2yeDgLwTwCHNuq2IdVxmkkdRVYLZODAFDwBAwBBIjQFUxiem3TeqWGNn8zVGNf5DqxmxQ8+NeXQ9GUqtbMhuwIWAIGAKGgCFQNQJMvEBvfj43BHA6gFdUPSMbfBYEjKRmgdUaNQQMAUPAEDAEDAFDwBBYgoCR1CXoWV1DwBAwBAwBQ8AQMAQMgSwIGEnNAqs1aggYAoaAIWAIGAKGgCGwBAEjqUvQs7qGgCFgCBgChoAhYAgYAlkQMJKaBVZr1BAwBAwBQ8AQMAQMAUNgCQJGUpegZ3UNAUPAEDAEDAFDwBAwBLIg8P8B48hP42lVITQAAAAASUVORK5CYII=', TRUE);

    // Check invalid when PNG is not submitted.
    $this
      ->assertSignature('not a png', FALSE);

    // Check invalid when PNG has color.
    $image = file_get_contents(drupal_get_path('module', 'webform') . '/tests/files/sample.png');
    $this
      ->assertSignature('data:image/png;base64,' . base64_encode($image), FALSE);

    /**************************************************************************/

    // Delete.

    /**************************************************************************/

    // Check deleting the submission deletes submission's signature directory.
    $webform_submission
      ->delete();
    $this
      ->assertFileExists("{$signature_directory}");
    $this
      ->assertFileNotExists("{$signature_directory}/{$sid}");
    $this
      ->assertCount(1, \Drupal::service('file_system')
      ->scanDirectory($signature_directory, '/^signature-.*\\.png$/'));

    // Check deleting the webform deletes webform's signature directory.
    $webform
      ->delete();
    $this
      ->assertFileNotExists("{$signature_directory}");
  }

  /**
   * Assert valid or invalid signature.
   *
   * @param string $value
   *   Signature value.
   * @param bool $is_valid
   *   Is Signature valid.
   */
  protected function assertSignature($value, $is_valid = TRUE) {

    // Must manually set hidden values because ::submitForm only set visible
    // element values and ignores hidden elements.
    // @see \Drupal\Tests\UiHelperTrait::submitForm
    $this
      ->drupalGet('/webform/test_element_signature');
    $field = $this
      ->assertSession()
      ->hiddenFieldExists('signature');
    $field
      ->setValue($value);
    $this
      ->submitForm([], 'Submit');
    if ($is_valid) {
      $this
        ->assertNoRaw('signature contains an invalid signature.');
    }
    else {
      $this
        ->assertRaw('signature contains an invalid signature.');
    }
  }

}

Classes

Namesort descending Description
WebformElementSignatureTest Tests for signature element.