Draft: #3486574: Ajax cannot be triggered from within a table row
2 unresolved threads
Closes #3486574
Merge request reports
Activity
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());
Please register or sign in to reply