From f7f8c136ac8807eb74c0ffcbd08ccd09b23909c6 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:24:10 +0200 Subject: [PATCH 1/5] TASK: Use more specific selector to match exact nodeType --- .../Fixtures/1Dimension/discarding.e2e.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Tests/IntegrationTests/Fixtures/1Dimension/discarding.e2e.js b/Tests/IntegrationTests/Fixtures/1Dimension/discarding.e2e.js index 40aa73ad75..db382f1d70 100644 --- a/Tests/IntegrationTests/Fixtures/1Dimension/discarding.e2e.js +++ b/Tests/IntegrationTests/Fixtures/1Dimension/discarding.e2e.js @@ -18,7 +18,7 @@ test('Discarding: create multiple nodes nested within each other and then discar await t .click(Selector('#neos-PageTree-AddNode')) .click(ReactSelector('InsertModeSelector').find('#into')) - .click(ReactSelector('NodeTypeItem')) + .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Page_Test')) .typeText(Selector('#neos-NodeCreationDialog-Body input'), pageTitleToCreate) .click(Selector('#neos-NodeCreationDialog-CreateNew')); await Page.waitForIframeLoading(); @@ -27,7 +27,7 @@ test('Discarding: create multiple nodes nested within each other and then discar await t .click(Selector('#neos-PageTree-AddNode')) .click(ReactSelector('InsertModeSelector').find('#into')) - .click(ReactSelector('NodeTypeItem')) + .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Page_Test')) .typeText(Selector('#neos-NodeCreationDialog-Body input'), pageTitleToCreate) .click(Selector('#neos-NodeCreationDialog-CreateNew')); await Page.waitForIframeLoading(); @@ -46,7 +46,7 @@ test('Discarding: create a document node and then discard it', async t => { subSection('Create a document node'); await t .click(Selector('#neos-PageTree-AddNode')) - .click(ReactSelector('NodeTypeItem')) + .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Page_Test')) .typeText(Selector('#neos-NodeCreationDialog-Body input'), pageTitleToCreate) .click(Selector('#neos-NodeCreationDialog-CreateNew')) .expect(Page.treeNode.withText(pageTitleToCreate).exists).ok('Node with the given title appeared in the tree') @@ -102,7 +102,7 @@ test('Discarding: create a content node and then discard it', async t => { .click(Selector('#neos-ContentTree-ToggleContentTree')) .click(Page.treeNode.withText('Content Collection (main)')) .click(Selector('#neos-ContentTree-AddNode')) - .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Headline')); + .click(ReactSelector('NodeTypeItem').find('button>span>span').withText('Headline_Test')); await Page.waitForIframeLoading(t); await t .switchToIframe('[name="neos-content-main"]') From aba554346a5693c1701c8a58f44cb73bebf72079 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:26:59 +0200 Subject: [PATCH 2/5] TASK: Use `admin` `admin` as login --- .circleci/config.yml | 2 +- .../Fixtures/2Dimension/switchingSites.e2e.js | 4 ++-- Tests/IntegrationTests/e2e-docker.sh | 2 +- Tests/IntegrationTests/start-neos-dev-instance.sh | 2 +- Tests/IntegrationTests/utils.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index faba746390..bbcb37a3b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,7 +100,7 @@ jobs: ./flow flow:cache:flush ./flow flow:cache:warmup ./flow doctrine:migrate - ./flow user:create --username=admin --password=password --first-name=John --last-name=Doe --roles=Administrator + ./flow user:create --username=admin --password=admin --first-name=John --last-name=Doe --roles=Administrator - run: name: Start flow server command: /home/circleci/app/flow server:run --port 8081 diff --git a/Tests/IntegrationTests/Fixtures/2Dimension/switchingSites.e2e.js b/Tests/IntegrationTests/Fixtures/2Dimension/switchingSites.e2e.js index 90ad6bf98b..f323f54eb2 100644 --- a/Tests/IntegrationTests/Fixtures/2Dimension/switchingSites.e2e.js +++ b/Tests/IntegrationTests/Fixtures/2Dimension/switchingSites.e2e.js @@ -13,7 +13,7 @@ test('Switching from Neos.Test.OneDimension to Neos.Test.TwoDimensions and back' await t.navigateTo('http://onedimension.localhost:8081/neos'); await t .typeText('#username', 'admin') - .typeText('#password', 'password') + .typeText('#password', 'admin') .click('button.neos-login-btn'); await waitForReact(30000); await Page.goToPage('Home'); @@ -38,7 +38,7 @@ test('Switching from Neos.Test.TwoDimensions to Neos.Test.OneDimension and back' await t.navigateTo('http://twodimensions.localhost:8081/neos'); await t .typeText('#username', 'admin') - .typeText('#password', 'password') + .typeText('#password', 'admin') .click('button.neos-login-btn'); await waitForReact(30000); await Page.goToPage('Home'); diff --git a/Tests/IntegrationTests/e2e-docker.sh b/Tests/IntegrationTests/e2e-docker.sh index bcec06b019..ec2895235d 100755 --- a/Tests/IntegrationTests/e2e-docker.sh +++ b/Tests/IntegrationTests/e2e-docker.sh @@ -53,7 +53,7 @@ dc exec -T php bash <<-'BASH' ./flow flow:cache:flush ./flow flow:cache:warmup ./flow doctrine:migrate - ./flow user:create --username=admin --password=password --first-name=John --last-name=Doe --roles=Administrator || true + ./flow user:create --username=admin --password=admin --first-name=John --last-name=Doe --roles=Administrator || true ./flow cr:setup --content-repository onedimension ./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.Page diff --git a/Tests/IntegrationTests/start-neos-dev-instance.sh b/Tests/IntegrationTests/start-neos-dev-instance.sh index 600f27eaa9..c018e135a8 100644 --- a/Tests/IntegrationTests/start-neos-dev-instance.sh +++ b/Tests/IntegrationTests/start-neos-dev-instance.sh @@ -40,7 +40,7 @@ dc exec -T php bash <<-'BASH' ./flow flow:cache:flush ./flow flow:cache:warmup ./flow doctrine:migrate - ./flow user:create --username=admin --password=password --first-name=John --last-name=Doe --roles=Administrator || true + ./flow user:create --username=admin --password=admin --first-name=John --last-name=Doe --roles=Administrator || true BASH echo "" diff --git a/Tests/IntegrationTests/utils.js b/Tests/IntegrationTests/utils.js index 86f3289b9e..09597b7ed7 100644 --- a/Tests/IntegrationTests/utils.js +++ b/Tests/IntegrationTests/utils.js @@ -5,7 +5,7 @@ import {PublishDropDown, Page} from './pageModel'; export const subSection = name => console.log('\x1b[33m%s\x1b[0m', ' - ' + name); const adminUserName = 'admin'; -const adminPassword = 'password'; +const adminPassword = 'admin'; export const getUrl = ClientFunction(() => window.location.href); From 0186a20e104024c423b861e8e0bbb2ec8ae61a5f Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 25 Sep 2023 08:27:15 +0200 Subject: [PATCH 3/5] TASK: Remove outdated `setup.sh` --- .../TestDistribution/setup.sh | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100755 Tests/IntegrationTests/TestDistribution/setup.sh diff --git a/Tests/IntegrationTests/TestDistribution/setup.sh b/Tests/IntegrationTests/TestDistribution/setup.sh deleted file mode 100755 index 58d012cdbd..0000000000 --- a/Tests/IntegrationTests/TestDistribution/setup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# This script setups the Neos Test Distribution in order to be able to run E2E tests -# Please make sure to adjust the database settings in Configuration/Settings.yaml - -composer install -cd Packages/Application/Neos.Neos.Ui -make setup -cd ../../.. -./flow doctrine:migrate -./flow flow:cache:flush -./flow user:create --username=admin --password=password --first-name=John --last-name=Doe --roles=Administrator || true - -echo "" -echo "The setup is complete!" -echo "To run E2E test suite execute:" -echo " cd Packages/Application/Neos.Neos.Ui && make test-e2e" -echo "" - -./flow server:run --port 8081 From 0f1df5f90cf1c663401efb88436200002b2ba62e Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 25 Sep 2023 09:50:05 +0200 Subject: [PATCH 4/5] TASK: Fix test `Move multiple nodes` by enforcing correct "loadingDepth" --- .../Neos.Test.OneDimension/Configuration/Settings.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Configuration/Settings.yaml b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Configuration/Settings.yaml index 6bbebddb15..6f86420877 100644 --- a/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Configuration/Settings.yaml +++ b/Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.Test.OneDimension/Configuration/Settings.yaml @@ -30,3 +30,10 @@ Neos: contentDimensions: resolver: factoryClassName: Neos\Neos\FrontendRouting\DimensionResolution\Resolver\AutoUriPathResolverFactory + + userInterface: + navigateComponent: + nodeTree: + # must be at least 3, so when moving document nodes into each other + # they will still be shown and we can assert this + loadingDepth: 3 From ffd39ab2f5c1238b3ce49aa44df11a49c8163c6b Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:21:43 +0200 Subject: [PATCH 5/5] TASK: Redo 3592 the fix reappeared in the 9.0 branch #3592 --- Tests/IntegrationTests/utils.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Tests/IntegrationTests/utils.js b/Tests/IntegrationTests/utils.js index 09597b7ed7..c865e8e4aa 100644 --- a/Tests/IntegrationTests/utils.js +++ b/Tests/IntegrationTests/utils.js @@ -39,10 +39,6 @@ export async function checkPropTypes() { if (error[0] && error[0].search('Warning: Unsafe legacy lifecycles') >= 0) { delete error[0]; } - // Quick fix to be able to use node 16 with testcafe @see https://github.com/DevExpress/testcafe/issues/7097 - if (error[0] && error[0].search('hammerhead.js') >= 0) { - delete error[0]; - } if (error[0]) { console.log('These console errors were the cause of the failed test:', error); }