Skip to content

Commit

Permalink
WIP: Try to adjust e2e to work with new Neos workspace metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Oct 1, 2024
1 parent b1c4179 commit 04ab019
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
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('user-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__f676459d-ca77-44bc-aeea-44114814c279', 'After discarding we are back to the main page');
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__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
2 changes: 1 addition & 1 deletion Tests/IntegrationTests/Fixtures/1Dimension/syncing.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ async function chooseDiscardAllAndFinishSynchronization(t) {
// Choose "Discard All" as resolution strategy
//
await t.click(Selector('#neos-SelectResolutionStrategy-SelectBox'));
await t.click(Selector('[role="button"]').withText('Discard workspace "user-admin"'));
await t.click(Selector('[role="button"]').withText('Discard workspace "admin-admington"'));
await t.click(Selector('#neos-SelectResolutionStrategy-Accept'));

//
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('user-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df', 'Node B\'s node address changed');
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__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('user-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__5b0d6ac0-40ab-47e8-b79e-39de6c0700df', 'Node B\'s node address changed');
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__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('user-admin__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__84eb0340-ba34-4fdb-98b1-da503f967121', 'Node C\'s node address changed');
})).eql('admin-admington__eyJsYW5ndWFnZSI6ImVuX1VTIn0=__84eb0340-ba34-4fdb-98b1-da503f967121', 'Node C\'s node address changed');
await t.click(Page.getTreeNodeButton('Home'))
});
4 changes: 4 additions & 0 deletions Tests/IntegrationTests/e2e-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ dc exec -T php bash <<-'BASH'
./flow cr:setup --content-repository onedimension
./flow cr:import --content-repository onedimension --path ./DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content
# Hack to create Neos workspace metadata for the live workspace (Failed to load metadata for workspace "live").
./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService --content-repository onedimension
# Connect to a Neos site, todo the nodeTypeName parameter is obsolete but necessary
./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.HomePage
./flow domain:add neos-test-onedimension onedimension.localhost --port 8081
./flow cr:setup --content-repository twodimensions
./flow cr:import --content-repository twodimensions --path ./DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content
# Hack to create Neos workspace metadata for the live workspace (Failed to load metadata for workspace "live").
./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService --content-repository onedimension
# Connect to a Neos site, todo the nodeTypeName parameter is obsolete but necessary
./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.HomePage
./flow domain:add neos-test-twodimensions twodimensions.localhost --port 8081
Expand Down
4 changes: 4 additions & 0 deletions Tests/IntegrationTests/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ function run_tests() {

./flow cr:setup --content-repository onedimension
./flow cr:import --content-repository onedimension --path ./DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content
# Hack to create Neos workspace metadata for the live workspace (Failed to load metadata for workspace "live").
./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService --content-repository onedimension
# Connect to a Neos site, todo the nodeTypeName parameter is obsolete but necessary
./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.HomePage
./flow domain:add neos-test-onedimension onedimension.localhost --port 8081

./flow cr:setup --content-repository twodimensions
./flow cr:import --content-repository twodimensions --path ./DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content
# Hack to create Neos workspace metadata for the live workspace (Failed to load metadata for workspace "live").
./flow migrateevents:migrateWorkspaceMetadataToWorkspaceService --content-repository onedimension
# Connect to a Neos site, todo the nodeTypeName parameter is obsolete but necessary
./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.HomePage
./flow domain:add neos-test-twodimensions twodimensions.localhost --port 8081
Expand Down

0 comments on commit 04ab019

Please sign in to comment.