diff --git a/.sauce/config1Dimension.yml b/.sauce/config1Dimension.yml index 00d91b076b..f6628e94b6 100644 --- a/.sauce/config1Dimension.yml +++ b/.sauce/config1Dimension.yml @@ -4,7 +4,8 @@ showConsoleLog: true sauce: region: us-west-1 concurrency: 1 # Controls how many suites are executed at the same time. - retries: 3 + # todo fix and enable retries + retries: 0 metadata: tags: - e2e diff --git a/.sauce/config2Dimension.yml b/.sauce/config2Dimension.yml index 2f1dbf1c70..80ebb74ad7 100644 --- a/.sauce/config2Dimension.yml +++ b/.sauce/config2Dimension.yml @@ -3,7 +3,7 @@ kind: testcafe sauce: region: us-west-1 concurrency: 1 # Controls how many suites are executed at the same time. - retries: 3 + retries: 0 metadata: tags: - e2e diff --git a/Classes/Aspects/AugmentationAspect.php b/Classes/Aspects/AugmentationAspect.php index 281e812d1f..1138d150de 100644 --- a/Classes/Aspects/AugmentationAspect.php +++ b/Classes/Aspects/AugmentationAspect.php @@ -114,7 +114,15 @@ public function contentElementAugmentation(JoinPointInterface $joinPoint) $attributes['data-__neos-node-contextpath'] = $node->getContextPath(); $attributes['data-__neos-fusion-path'] = $fusionPath; - return $this->htmlAugmenter->addAttributes($content, $attributes); + // Define all attribute names as exclusive via the `exclusiveAttributes` parameter, to prevent the data of + // two different nodes to be concatenated into the attributes of a single html node. + // This way an outer div is added, if the wrapped content already has node related data-attributes set. + return $this->htmlAugmenter->addAttributes( + $content, + $attributes, + 'div', + array_keys($attributes) + ); } /** diff --git a/README.md b/README.md index 689b0d85c4..1e03152ec4 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ To speed up the e2e-test workflow/feedback loop you can start the system under t * The neos dev instance is available at `localhost:8081` * To enter the container run `docker compose -f Tests/IntegrationTests/docker-compose.neos-dev-instance.yaml exec php bash` * `yarn run testcafe ` - * for example, this runs all tests in chrome: (NOTE starting with Chrome 127, --disable-search-engine-choice-screen is needed) + * for example, this runs all tests in chrome: (NOTE starting with Chrome 127, --disable-search-engine-choice-screen is needed until https://github.com/DevExpress/testcafe/pull/8248 is released) `yarn run testcafe chrome:--disable-search-engine-choice-screen Tests/IntegrationTests/Fixtures/1Dimension` * some helpful optional flags are * `-T 'sidebars'` - grep tests by pattern and only execute those diff --git a/Tests/IntegrationTests/Fixtures/1Dimension/selectBoxes.e2e.js b/Tests/IntegrationTests/Fixtures/1Dimension/selectBoxes.e2e.js index ae67757496..0391dce32b 100644 --- a/Tests/IntegrationTests/Fixtures/1Dimension/selectBoxes.e2e.js +++ b/Tests/IntegrationTests/Fixtures/1Dimension/selectBoxes.e2e.js @@ -23,7 +23,6 @@ test('SelectBox opens below and breaks out of the creation dialog if there\'s en test('SelectBox opens above in creation dialog if there\'s not enough space below.', async t => { await t - .resizeWindow(1200, 768) .click(Selector('#neos-PageTree-AddNode')) .click(ReactSelector('NodeTypeItem').withExactText('SelectBox opens above')) .click(ReactSelector('NodeCreationDialog SelectBox')); diff --git a/Tests/IntegrationTests/SharedNodeTypesPackage/NodeTypes/Document/SelectBoxTestPage/OpensAboveInInspector.yaml b/Tests/IntegrationTests/SharedNodeTypesPackage/NodeTypes/Document/SelectBoxTestPage/OpensAboveInInspector.yaml index 5365e250e1..f89d08f1c3 100644 --- a/Tests/IntegrationTests/SharedNodeTypesPackage/NodeTypes/Document/SelectBoxTestPage/OpensAboveInInspector.yaml +++ b/Tests/IntegrationTests/SharedNodeTypesPackage/NodeTypes/Document/SelectBoxTestPage/OpensAboveInInspector.yaml @@ -10,6 +10,9 @@ groups: test: label: Test + # move it before the general document meta-data so there is + # also space below when opening it in the e2e tests + position: start properties: TextField: type: string diff --git a/Tests/IntegrationTests/e2e.sh b/Tests/IntegrationTests/e2e.sh index d3b5466ae1..4b5c3c9bec 100755 --- a/Tests/IntegrationTests/e2e.sh +++ b/Tests/IntegrationTests/e2e.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +set -ex + # Global variables BROWSER="" USE_SAUCELABS=false @@ -9,7 +11,7 @@ parse_arguments() { while [[ $# -gt 0 ]]; do case "$1" in -h|--help) - usage + print_usage_information exit 0 ;; -s|--saucelabs) @@ -21,7 +23,7 @@ parse_arguments() { ;; *) echo "Unknown option: $1" - usage + print_usage_information exit 1 ;; esac @@ -29,15 +31,14 @@ parse_arguments() { done } -# Function to print usage information -usage() { +print_usage_information() { cat < /dev/null; then echo "saucectl is not installed. Installing saucectl..." @@ -75,7 +75,7 @@ function check_saucectl_installed { fi } -# get dimension from fixture +# parse dimension from fixture file name function get_dimension() { dimension=$(basename "$1") echo "$dimension" @@ -88,7 +88,6 @@ function initialize_neos_site() { ln -s "../${fixture}SitePackage" DistributionPackages/Neos.TestSite - # TODO: optimize this composer reinstall neos/test-nodetypes composer reinstall neos/test-site # make sure neos is installed even if patching led to the removal (bug) @@ -121,11 +120,11 @@ function run_tests() { cd Packages/Application/Neos.Neos.Ui if [[ $BROWSER ]]; then - yarn run testcafe "$BROWSER" "../../../${fixture}*.e2e.js" --selector-timeout=10000 --assertion-timeout=30000 + yarn run testcafe "$BROWSER" "../../../${fixture}*.e2e.js" --selector-timeout=10000 --assertion-timeout=30000 || hasFailure=1 fi if [[ $USE_SAUCELABS ]]; then - saucectl run --config .sauce/config${dimension}.yml + saucectl run --config .sauce/config${dimension}.yml || hasFailure=1 fi # cd back to the root directory and clean up @@ -135,14 +134,16 @@ function run_tests() { rm -rf DistributionPackages mv DummyDistributionPackages DistributionPackages + + if [[ $hasFailure -eq 1 ]] ; then + exit 1 + fi } -# Parse arguments parse_arguments "$@" # check if incoming parameters are correct check_testcafe_browser check_saucelabs_setup -# Run the tests run_tests