Skip to content

Commit

Permalink
TASK: Remove usages to NodeAddressFactory
Browse files Browse the repository at this point in the history
TASK: Assert new json node address in e2e
  • Loading branch information
mhsdesign committed Oct 14, 2024
1 parent 5d0b5e7 commit 9c765b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Classes/Controller/BackendServiceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -780,22 +780,22 @@ public function reloadNodesAction(array $query): void
$query['ancestorsOfDocumentIds'] = array_map(
fn (string $nodeAddress) =>
NodeAddress::fromJsonString(
$nodeAddress
)->aggregateId->value,
$nodeAddress
)->aggregateId->value,
$query['ancestorsOfDocumentIds']
);
$query['toggledNodesIds'] = array_map(
fn (string $nodeAddress) =>
NodeAddress::fromJsonString(
$nodeAddress
)->aggregateId->value,
$nodeAddress
)->aggregateId->value,
$query['toggledNodesIds']
);
$query['clipboardNodesIds'] = array_map(
fn (string $nodeAddress) =>
NodeAddress::fromJsonString(
$nodeAddress
)->aggregateId->value,
$nodeAddress
)->aggregateId->value,
$query['clipboardNodesIds']
);
$query = ReloadNodesQuery::fromArray($query);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('Discarding: create multiple nodes nested within each other and then discar
.expect(ReactSelector('Provider').getReact(({props}) => {
const reduxState = props.store.getState();
return reduxState.cr.nodes.documentNode;
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__f676459d-ca77-44bc-aeea-44114814c279', 'After discarding we are back to the main page');
})).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');
});

test('Discarding: create a document node and then discard it', async t => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('Move multiple nodes via toolbar', async t => {
.expect(ReactSelector('Provider').getReact(({props}) => {
const reduxState = props.store.getState();
return reduxState.cr.nodes.documentNode;
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df', 'Node B\'s node address changed');
})).eql(JSON.stringify({contentRepositoryId:"onedimension",workspaceName:"admin-admington",dimensionSpacePoint:{"language":"en_US"},aggregateId:"5b0d6ac0-40ab-47e8-b79e-39de6c0700df"}), 'Node B\'s node address changed');
await t.click(Page.getTreeNodeButton('Home'))
});

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

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

0 comments on commit 9c765b7

Please sign in to comment.