Skip to content
Snippets Groups Projects

Resolve #3445469 "Added test coverage for DialogRenderer::getTitleAsStringable()"

Closed Resolve #3445469 "Added test coverage for DialogRenderer::getTitleAsStringable()"
3 unresolved threads
3 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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'),
  • 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());
    • Comment on lines +224 to +225

      Here click on "Modal link" , route "ajax_test.link_page.dialog_contents" is called . compared the modal title text to verify that modal opened or not

    • Please register or sign in to reply
  • Pooja Sharma added 77 commits

    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

    Compare with previous version

  • Please register or sign in to reply
    Loading