Resolve #3445469 "Added test coverage for DialogRenderer::getTitleAsStringable()"
3 unresolved threads
Merge request reports
Activity
Filter activity
145 145 _controller: Drupal\ajax_test\Controller\AjaxTestController::httpMethodsDialog 146 146 requirements: 147 147 _access: 'TRUE' 148 149 ajax_test.link_page.dialog: 150 path: '/ajax-test/link-page-dialog' 151 defaults: 152 _title: 'AJAX link page' 153 _controller: '\Drupal\ajax_test\Controller\AjaxTestController::linkPageDialog' 154 requirements: 155 _access: 'TRUE' 156 157 ajax_test.link_page.dialog_contents: 457 457 return ['#markup' => 'Modal dialog contents']; 458 458 } 459 459 460 /** 461 * Provides an Ajax link that open in dialog. 462 * 463 * @return array 464 * The AJAX link. 465 */ 466 public function linkPageDialog(): array { 467 return [ 468 '#type' => 'link', 469 '#title' => 'Modal link', 470 '#url' => Url::fromRoute('ajax_test.link_page.dialog_contents'), "ajax_test.link_page.dialog_contents" route has been used here, that 'll be open in modal when Modal link is clicked
Edited by Pooja Sharma
216 216 217 217 $form_title = $dialog_add->find('css', "span.ui-dialog-title:contains('Add contact form')"); 218 218 $this->assertNotNull($form_title, 'The add form title is as expected.'); 219 220 // Test: dialog link opener with title callback. 221 $page = $this->getSession()->getPage(); 222 $assert_session = $this->assertSession(); 223 $this->drupalGet("/ajax-test/link-page-dialog"); 224 $page->clickLink('Modal link'); 225 $this->assertEquals('Dialog link page title', $assert_session->waitForElement('css', '.ui-dialog-title')->getText()); added 77 commits
-
6a70c63e...37d8ea5c - 74 commits from branch
project:11.x
- 339d463a - issue/3445469: Added route in ajax_test.routing file.
- b93c51a2 - issue/3445469: Updated AjaxTestController
- aabfebe7 - issue/3445469: Added test in DialogTest
Toggle commit list-
6a70c63e...37d8ea5c - 74 commits from branch
Please register or sign in to reply