private function EntityBrowserTrait::selectItem in Lightning Media 8.3
Same name and namespace in other branches
- 8.4 tests/src/Traits/EntityBrowserTrait.php \Drupal\Tests\lightning_media\Traits\EntityBrowserTrait::selectItem()
Selects an item in the current entity browser.
Parameters
\Behat\Mink\Element\NodeElement $item: The item element.
8 calls to EntityBrowserTrait::selectItem()
- CKEditorMediaBrowserTest::testDocumentEmbed in tests/
src/ FunctionalJavascript/ CKEditorMediaBrowserTest.php - Tests that the image embed plugin is not used to embed a document.
- CKEditorMediaBrowserTest::testEditEmbed in tests/
src/ FunctionalJavascript/ CKEditorMediaBrowserTest.php - Tests that the entity embed dialog opens when editing a pre-existing embed.
- CKEditorMediaBrowserTest::testImageEmbed in tests/
src/ FunctionalJavascript/ CKEditorMediaBrowserTest.php - Tests that the image embed plugin is used to embed an image.
- CKEditorMediaBrowserTest::testUnlimitedCardinality in tests/
src/ FunctionalJavascript/ CKEditorMediaBrowserTest.php - Tests that cardinality is never enforced in the media browser.
- EmbeddedMediaTest::testEmbedCodeBasedEmbeddedMedia in tests/
src/ FunctionalJavascript/ EmbeddedMediaTest.php - Tests embedding embed code-based media, with no image options.
File
- tests/
src/ Traits/ EntityBrowserTrait.php, line 90
Class
- EntityBrowserTrait
- Contains methods for interacting with entity browsers in frames.
Namespace
Drupal\Tests\lightning_media\TraitsCode
private function selectItem(NodeElement $item) {
$result = $item
->waitFor(10, function (NodeElement $item) {
$item
->click();
return $item
->hasClass('selected') && $item
->hasCheckedField('Select this item');
});
$this
->assertTrue($result);
}