Skip to content

Commit 9c765b7

Browse files
committed
TASK: Remove usages to NodeAddressFactory
TASK: Assert new json node address in e2e
1 parent 5d0b5e7 commit 9c765b7

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Classes/Controller/BackendServiceController.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -780,22 +780,22 @@ public function reloadNodesAction(array $query): void
780780
$query['ancestorsOfDocumentIds'] = array_map(
781781
fn (string $nodeAddress) =>
782782
NodeAddress::fromJsonString(
783-
$nodeAddress
784-
)->aggregateId->value,
783+
$nodeAddress
784+
)->aggregateId->value,
785785
$query['ancestorsOfDocumentIds']
786786
);
787787
$query['toggledNodesIds'] = array_map(
788788
fn (string $nodeAddress) =>
789789
NodeAddress::fromJsonString(
790-
$nodeAddress
791-
)->aggregateId->value,
790+
$nodeAddress
791+
)->aggregateId->value,
792792
$query['toggledNodesIds']
793793
);
794794
$query['clipboardNodesIds'] = array_map(
795795
fn (string $nodeAddress) =>
796796
NodeAddress::fromJsonString(
797-
$nodeAddress
798-
)->aggregateId->value,
797+
$nodeAddress
798+
)->aggregateId->value,
799799
$query['clipboardNodesIds']
800800
);
801801
$query = ReloadNodesQuery::fromArray($query);

Tests/IntegrationTests/Fixtures/1Dimension/discarding.e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ test('Discarding: create multiple nodes nested within each other and then discar
3838
.expect(ReactSelector('Provider').getReact(({props}) => {
3939
const reduxState = props.store.getState();
4040
return reduxState.cr.nodes.documentNode;
41-
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__f676459d-ca77-44bc-aeea-44114814c279', 'After discarding we are back to the main page');
41+
})).eql(JSON.stringify({contentRepositoryId:"onedimension",workspaceName:"admin-admington",dimensionSpacePoint:{"language":"en_US"},aggregateId:"f676459d-ca77-44bc-aeea-44114814c279"}), 'After discarding we are back to the main page');
4242
});
4343

4444
test('Discarding: create a document node and then discard it', async t => {

Tests/IntegrationTests/Fixtures/1Dimension/treeMultiselect.e2e.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test('Move multiple nodes via toolbar', async t => {
2626
.expect(ReactSelector('Provider').getReact(({props}) => {
2727
const reduxState = props.store.getState();
2828
return reduxState.cr.nodes.documentNode;
29-
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df', 'Node B\'s node address changed');
29+
})).eql(JSON.stringify({contentRepositoryId:"onedimension",workspaceName:"admin-admington",dimensionSpacePoint:{"language":"en_US"},aggregateId:"5b0d6ac0-40ab-47e8-b79e-39de6c0700df"}), 'Node B\'s node address changed');
3030
await t.click(Page.getTreeNodeButton('Home'))
3131
});
3232

@@ -43,7 +43,7 @@ test('Move multiple nodes via DND, CMD-click', async t => {
4343
.expect(ReactSelector('Provider').getReact(({props}) => {
4444
const reduxState = props.store.getState();
4545
return reduxState.cr.nodes.documentNode;
46-
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df', 'Node B\'s node address changed');
46+
})).eql(JSON.stringify({contentRepositoryId:"onedimension",workspaceName:"admin-admington",dimensionSpacePoint:{"language":"en_US"},aggregateId:"5b0d6ac0-40ab-47e8-b79e-39de6c0700df"}), 'Node B\'s node address changed');
4747
await t.click(Page.getTreeNodeButton('Home'))
4848
});
4949

@@ -60,6 +60,6 @@ test('Move multiple nodes via DND, SHIFT-click', async t => {
6060
.expect(ReactSelector('Provider').getReact(({props}) => {
6161
const reduxState = props.store.getState();
6262
return reduxState.cr.nodes.documentNode;
63-
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__84eb0340-ba34-4fdb-98b1-da503f967121', 'Node C\'s node address changed');
63+
})).eql(JSON.stringify({contentRepositoryId:"onedimension",workspaceName:"admin-admington",dimensionSpacePoint:{"language":"en_US"},aggregateId:"84eb0340-ba34-4fdb-98b1-da503f967121"}), 'Node C\'s node address changed');
6464
await t.click(Page.getTreeNodeButton('Home'))
6565
});

0 commit comments

Comments
 (0)