Mercurial > hg > isophonics-drupal-site
annotate core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxFormImageButtonTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\FunctionalJavascriptTests\Ajax; |
Chris@0 | 4 |
Chris@17 | 5 use Drupal\FunctionalJavascriptTests\WebDriverTestBase; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Tests the Ajax image buttons work with key press events. |
Chris@0 | 9 * |
Chris@0 | 10 * @group Ajax |
Chris@0 | 11 */ |
Chris@17 | 12 class AjaxFormImageButtonTest extends WebDriverTestBase { |
Chris@0 | 13 |
Chris@0 | 14 /** |
Chris@0 | 15 * {@inheritdoc} |
Chris@0 | 16 */ |
Chris@0 | 17 public static $modules = ['ajax_forms_test']; |
Chris@0 | 18 |
Chris@0 | 19 /** |
Chris@0 | 20 * Tests image buttons can be operated with the keyboard ENTER key. |
Chris@0 | 21 */ |
Chris@18 | 22 public function testAjaxImageButtonKeypressEnter() { |
Chris@0 | 23 // Get a Field UI manage-display page. |
Chris@0 | 24 $this->drupalGet('ajax_forms_image_button_form'); |
Chris@0 | 25 $assertSession = $this->assertSession(); |
Chris@0 | 26 $session = $this->getSession(); |
Chris@0 | 27 |
Chris@18 | 28 $button = $session->getPage()->findButton('Edit'); |
Chris@18 | 29 $button->keyPress(13); |
Chris@0 | 30 |
Chris@0 | 31 $this->assertNotEmpty($assertSession->waitForElementVisible('css', '#ajax-1-more-div'), 'Page updated after image button pressed'); |
Chris@0 | 32 } |
Chris@0 | 33 |
Chris@0 | 34 } |