|
|
|
@ -73,6 +73,7 @@ final class TwigTweakTest extends BrowserTestBase {
|
|
|
|
|
|
|
|
|
|
$node_values = [ |
|
|
|
|
'title' => 'Alpha', |
|
|
|
|
'uuid' => 'ad1b902a-344f-41d1-8c61-a69f0366dbfa', |
|
|
|
|
'field_image' => [ |
|
|
|
|
'target_id' => $image_file->id(), |
|
|
|
|
'alt' => 'Alt text', |
|
|
|
@ -161,6 +162,16 @@ final class TwigTweakTest extends BrowserTestBase {
|
|
|
|
|
$xpath .= '/h2/a/span[text() = "Alpha"]'; |
|
|
|
|
$this->assertXpath($xpath); |
|
|
|
|
|
|
|
|
|
// -- Entity by UUID. |
|
|
|
|
$xpath = '//div[@class = "tt-entity-uuid"]'; |
|
|
|
|
$xpath .= '/article[contains(@class, "node")]'; |
|
|
|
|
$xpath .= '/h2/a/span[text() = "Alpha"]'; |
|
|
|
|
$this->assertXpath($xpath); |
|
|
|
|
|
|
|
|
|
// -- Entity by UUID (missing). |
|
|
|
|
$xpath = '//div[@class = "tt-entity-uuid-missing" and . = ""]'; |
|
|
|
|
$this->assertXpath($xpath); |
|
|
|
|
|
|
|
|
|
// -- Entity add form (unprivileged user). |
|
|
|
|
$xpath = '//div[@class = "tt-entity-add-form"]/form'; |
|
|
|
|
$this->assertSession()->elementNotExists('xpath', $xpath); |
|
|
|
|