$this->
drupalGet($manage_form);
$assert_session->
elementNotExists('css', '.tabledrag-changed-warning'
);
$assert_session->
elementNotExists('css', 'abbr.tabledrag-changed'
);
$page->
selectFieldOption('fields[uid][type]', 'options_buttons'
);
$this->
assertNotNull($changed_warning =
$assert_session->
waitForElementVisible('css', '.tabledrag-changed-warning'
));
$this->
assertNotNull($assert_session->
waitForElementVisible('css', ' #uid abbr.tabledrag-changed'
));
$this->
assertSame('* You have unsaved changes.',
$changed_warning->
getText());
// Form display, change widget settings.
$this->
drupalGet($manage_form);
$edit_widget_button =
$assert_session->
waitForElementVisible('css', '[data-drupal-selector="edit-fields-uid-settings-edit"]'
);
$edit_widget_button->
press();
$assert_session->
waitForText('3rd party formatter settings form'
);
// Confirm the AJAX operation of opening the form does not result in the row
// being set as changed. New settings must be submitted for that to happen.
$assert_session->
elementNotExists('css', 'abbr.tabledrag-changed'
);
$cancel_button =
$assert_session->
waitForElementVisible('css', '[data-drupal-selector="edit-fields-uid-settings-edit-form-actions-cancel-settings"]'
);
$cancel_button->
press();
$assert_session->
assertNoElementAfterWait('css', '[data-drupal-selector="edit-fields-uid-settings-edit-form-actions-cancel-settings"]'
);
$assert_session->
elementNotExists('css', '.tabledrag-changed-warning'
);
$assert_session->
elementNotExists('css', 'abbr.tabledrag-changed'
);
$edit_widget_button =
$assert_session->
waitForElementVisible('css', '[data-drupal-selector="edit-fields-uid-settings-edit"]'
);