private function MediaBrowserContext::uploadJS in Lightning Media 8.2
Same name and namespace in other branches
- 8.3 tests/contexts/MediaBrowserContext.behat.inc \Acquia\LightningExtension\Context\MediaBrowserContext::uploadJs()
Uploads a file in the media browser using JavaScript.
Parameters
string $file: The path to the file, relative to the test files directory.
1 call to MediaBrowserContext::uploadJS()
- MediaBrowserContext::upload in tests/
contexts/ MediaBrowserContext.behat.inc - Uploads a file in the media browser.
File
- tests/
contexts/ MediaBrowserContext.behat.inc, line 175
Class
- MediaBrowserContext
- Contains step definitions for interacting with Lightning's media browser.
Namespace
Acquia\LightningExtension\ContextCode
private function uploadJS($file) {
$this
->assertSession()
->elementExists('named', [
'link',
'Upload',
])
->click();
$this
->getContext(MinkContext::class)
->attachFileToField('File', $file);
$this
->awaitExpression('jQuery("#entity").children().length');
}