// Check that translations cannot be deleted in drafts.
$overview_url = $entity->toUrl('drupal:content-translation-overview'); $this->drupalGet($overview_url); $it_delete_url = $this->getDeleteUrl($it_revision); $it_delete_href = $it_delete_url->toString(); $this->assertSession()->linkByHrefNotExists($it_delete_href); $warning = 'The "Delete translation" action is only available for published translations.'; $this->assertSession()->statusMessageContains($warning, 'warning'); $this->drupalGet($this->getEditUrl($it_revision)); $this->assertSession()->buttonNotExists('Delete translation');
// Publish the translation and verify it can be deleted.
$edit = [ 'title[0][value]' => "Test $index.3 IT", 'moderation_state[0][state]' => 'published', ];