-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEATURE: Adjust disabled feature to work with NodeMutator architecture
- introduce $showDisabledNodesInSubgraph in tests to show disabled created nodes - introduce `NodeMutator::setDisabled` - updated all snapshots to include `"disabled": false,`
- Loading branch information
Showing
27 changed files
with
149 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Tests/Functional/Features/ChildNodes/Snapshots/AllowedChildNodes.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flowpack\NodeTemplates\Tests\Functional\Features\Disabled; | ||
|
||
use Flowpack\NodeTemplates\Tests\Functional\AbstractNodeTemplateTestCase; | ||
|
||
class DisabledTest extends AbstractNodeTemplateTestCase | ||
{ | ||
protected static bool $showDisabledNodesInSubgraph = true; | ||
|
||
/** @test */ | ||
public function itMatchesSnapshot1(): void | ||
{ | ||
$createdNode = $this->createNodeInto( | ||
$this->homePageMainContentCollectionNode, | ||
'Flowpack.NodeTemplates:Content.Disabled', | ||
[] | ||
); | ||
|
||
$this->assertLastCreatedTemplateMatchesSnapshot('Disabled'); | ||
|
||
$this->assertNoExceptionsWereCaught(); | ||
$this->assertNodeDumpAndTemplateDumpMatchSnapshot('Disabled', $createdNode); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
'Flowpack.NodeTemplates:Content.Disabled': | ||
superTypes: | ||
'Neos.Neos:Content': true | ||
options: | ||
template: | ||
disabled: true |
3 changes: 3 additions & 0 deletions
3
Tests/Functional/Features/Disabled/Snapshots/Disabled.nodes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"isDisabled": true | ||
} |
5 changes: 5 additions & 0 deletions
5
Tests/Functional/Features/Disabled/Snapshots/Disabled.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"disabled": true, | ||
"properties": [], | ||
"childNodes": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'{nodeTypeName}': | ||
options: | ||
template: [] |
1 change: 1 addition & 0 deletions
1
Tests/Functional/Features/Exceptions/Snapshots/OnlyExceptions.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"disabled": false, | ||
"properties": [], | ||
"childNodes": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.