Skip to content

Commit

Permalink
TASK: Adjust e2e.sh script to match new unified test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
grebaldi committed Jul 11, 2023
1 parent c43bb47 commit 895ca5c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 36 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ jobs:
cd /home/circleci/app/Packages/Application/Neos.Neos.Ui
nvm install
nvm use
echo 127.0.0.1 onedimension.localhost | sudo tee -a /etc/hosts
echo 127.0.0.1 twodimensions.localhost | sudo tee -a /etc/hosts
make test-e2e-saucelabs
- store_artifacts:
path: /home/circleci/app/Data/Logs
Expand Down
55 changes: 19 additions & 36 deletions Tests/IntegrationTests/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,29 @@ fi

cd ../../..

rm -rf DummyDistributionPackages || true
mv DistributionPackages DummyDistributionPackages
mkdir DistributionPackages
./flow cr:setup --content-repository onedimension
./flow site:create neos-test-onedimension Neos.Test.OneDimension Neos.TestNodeTypes:Document.Page
./flow domain:add neos-test-onedimension onedimension.localhost --port 8081
# TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one
printf "y\n" | ./flow cr:prune --content-repository onedimension
./flow cr:import --content-repository onedimension --path ./DistributionPackages/Neos.Test.OneDimension/Resources/Private/Content

ln -s "../Packages/Application/Neos.Neos.Ui/Tests/IntegrationTests/SharedNodeTypesPackage" DistributionPackages/Neos.TestNodeTypes
./flow cr:setup --content-repository twodimensions
./flow site:create neos-test-twodimensions Neos.Test.TwoDimensions Neos.TestNodeTypes:Document.Page
./flow domain:add neos-test-twodimensions twodimensions.localhost --port 8081
# TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one
printf "y\n" | ./flow cr:prune --content-repository twodimensions
./flow cr:import --content-repository twodimensions --path ./DistributionPackages/Neos.Test.TwoDimensions/Resources/Private/Content

for fixture in Packages/Application/Neos.Neos.Ui/Tests/IntegrationTests/Fixtures/*/; do
./flow resource:publish

cd Packages/Application/Neos.Neos.Ui

for fixture in Tests/IntegrationTests/Fixtures/*/; do
echo "$fixture"

ln -s "../${fixture}SitePackage" DistributionPackages/Neos.TestSite

# TODO: optimize this
composer reinstall neos/test-nodetypes
composer reinstall neos/test-site
./flow flow:cache:flush --force
./flow flow:cache:warmup
./flow configuration:show --path Neos.ContentRepositoryRegistry.contentRepositories.default.contentDimensions

if ./flow site:list | grep -q 'Node name'; then
# TODO: Remove "|| true" - This is currently only needed to prevent CircleCI from exiting
./flow site:prune '*' || true
fi

./flow cr:setup
# TODO: Remove "|| true" - This is currently only needed to prevent CircleCI from exiting
./flow site:create neos-test-site Neos.TestSite Neos.TestNodeTypes:Document.Page || true
# TODO: Replace with "--assume-yes" flag once "./flow cr:prune" has one
printf "y\n" | ./flow cr:prune
echo ./flow cr:import --path ./DistributionPackages/Neos.TestSite/Resources/Private/Content
./flow cr:import --path ./DistributionPackages/Neos.TestSite/Resources/Private/Content
echo Done
./flow resource:publish

cd Packages/Application/Neos.Neos.Ui
yarn run testcafe "$1" "../../../${fixture}*.e2e.js" \
yarn run testcafe "$1" "${fixture}*.e2e.js" \
--selector-timeout=10000 --assertion-timeout=30000
cd ../../..
rm -f DistributionPackages/Neos.TestSite

done

rm -rf DistributionPackages
mv DummyDistributionPackages DistributionPackages
cd ../../..

0 comments on commit 895ca5c

Please sign in to comment.