Mercurial > hg > isophonics-drupal-site
view core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
line wrap: on
line source
<?php namespace Drupal\FunctionalJavascriptTests\Ajax; use Drupal\FunctionalJavascriptTests\WebDriverTestBase; /** * Tests the Ajax image buttons work with key press events. * * @group Ajax */ class AjaxFormImageButtonTest extends WebDriverTestBase { /** * {@inheritdoc} */ public static $modules = ['ajax_forms_test']; /** * Tests image buttons can be operated with the keyboard ENTER key. */ public function testAjaxImageButtonKeypressEnter() { // Get a Field UI manage-display page. $this->drupalGet('ajax_forms_image_button_form'); $assertSession = $this->assertSession(); $session = $this->getSession(); $button = $session->getPage()->findButton('Edit'); $button->keyPress(13); $this->assertNotEmpty($assertSession->waitForElementVisible('css', '#ajax-1-more-div'), 'Page updated after image button pressed'); } }