Skip to content
Snippets Groups Projects

Draft: #3486574: Ajax cannot be triggered from within a table row

Open Draft: #3486574: Ajax cannot be triggered from within a table row
2 unresolved threads
Open Scott Euser requested to merge issue/drupal-3486574:3486574-ajax-table-row into 11.x
2 unresolved threads

Closes #3486574

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
48 48 $this->assertNotEmpty($this->assertSession()->waitForElement('xpath', '//div[@id="ajax_datetime_value"]/div[text()="2016-01-01 12:00:00"]'));
49 49 }
50 50
51 /**
52 * Tests if Ajax callback works on table rows.
53 */
54 public function testTableRowAjaxCallbacks(): void {
55
56 // Test Ajax callback when datetime changes.
57 $this->drupalGet('ajax_forms_test_ajax_element_form');
58 $this->assertSame('No table row result', $this->getSession()->getPage()->find('xpath', '//div[@id="ajax_table_row_result"]')->getText());
59
60 // Press the button outside the table to update the table row.
61 $this->getSession()->getPage()->pressButton('edit-outside-table-button');
62 $this->assertSession()->assertWaitOnAjaxRequest();
63 $this->assertSame('Outside table result', $this->getSession()->getPage()->find('xpath', '//div[@id="ajax_table_row_result"]')->getText());
  • 53 */
    54 public function testTableRowAjaxCallbacks(): void {
    55
    56 // Test Ajax callback when datetime changes.
    57 $this->drupalGet('ajax_forms_test_ajax_element_form');
    58 $this->assertSame('No table row result', $this->getSession()->getPage()->find('xpath', '//div[@id="ajax_table_row_result"]')->getText());
    59
    60 // Press the button outside the table to update the table row.
    61 $this->getSession()->getPage()->pressButton('edit-outside-table-button');
    62 $this->assertSession()->assertWaitOnAjaxRequest();
    63 $this->assertSame('Outside table result', $this->getSession()->getPage()->find('xpath', '//div[@id="ajax_table_row_result"]')->getText());
    64
    65 // Press the button inside the table to update the table row.
    66 $this->getSession()->getPage()->pressButton('edit-inside-table-button');
    67 $this->assertSession()->assertWaitOnAjaxRequest();
    68 $this->assertSame('Inside table result', $this->getSession()->getPage()->find('xpath', '//div[@id="ajax_table_row_result"]')->getText());
  • Scott Euser added 1 commit

    added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading