DropzoneContext.behat.inc in Lightning Media 8
File
tests/contexts/DropzoneContext.behat.inc
View source
<?php
namespace Acquia\LightningExtension\Context;
use Drupal\DrupalExtension\Context\DrupalSubContextBase;
use Drupal\DrupalExtension\Context\MinkContext;
class DropzoneContext extends DrupalSubContextBase {
public function attachFileToDropzone($file) {
$this
->getSession()
->executeScript('Dropzone.instances[0].hiddenFileInput.name = "file"');
$this
->getContext(MinkContext::class)
->attachFileToField('file', $file);
sleep(3);
}
}
Classes
Name |
Description |
DropzoneContext |
Contains step definitions for interacting with DropzoneJS widgets. |