protected function MenuLinkModalTest::checkModalFunctionality in Menu Link Modal 8
Same name and namespace in other branches
- 8.2 tests/src/FunctionalJavascript/MenuLinkModalTest.php \Drupal\Tests\menu_link_modal\FunctionalJavascript\MenuLinkModalTest::checkModalFunctionality()
Click on the menu link to check if it's opened in modal.
Parameters
object $node: The node object.
string $title: The title fo the Menu link to click.
Throws
\Behat\Mink\Exception\DriverException
\Behat\Mink\Exception\UnsupportedDriverActionException
1 call to MenuLinkModalTest::checkModalFunctionality()
- MenuLinkModalTest::testMenuLinkModal in tests/
src/ FunctionalJavascript/ MenuLinkModalTest.php - Tests if the link added in menu item opens with modal.
File
- tests/
src/ FunctionalJavascript/ MenuLinkModalTest.php, line 135
Class
- MenuLinkModalTest
- Tests link added in menu opens in modal with this module.
Namespace
Drupal\Tests\menu_link_modal\FunctionalJavascriptCode
protected function checkModalFunctionality($node, $title) {
// Get Mink stuff.
$assert = $this
->assertSession();
$this
->clickLink($title);
$this
->assertNotEmpty($assert
->waitForElementVisible('css', '.ui-dialog'));
// Check that we have a result modal.
$assert
->elementContains('css', 'span.ui-dialog-title', $node
->label());
}