Skip to content

Commit ca41c4e

Browse files
committed
Merge remote-tracking branch 'origin/8.4' into 9.0
2 parents 1ba2db4 + 1835451 commit ca41c4e

File tree

32 files changed

+293
-163
lines changed

32 files changed

+293
-163
lines changed

.circleci/config.yml

+37-30
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2.0
1+
version: 2.1
22

33
aliases:
44
- &workspace_root ~/neos-ui-workspace
@@ -40,6 +40,9 @@ aliases:
4040
paths:
4141
- .
4242

43+
orbs:
44+
gh: circleci/github-cli@2.3.0
45+
4346
jobs:
4447
checkout:
4548
docker:
@@ -90,9 +93,20 @@ jobs:
9093
MYSQL_ROOT_PASSWORD: not_a_real_password
9194
working_directory: *workspace_root
9295
steps:
96+
- checkout
9397
- attach_workspace: *attach_workspace
9498
- restore_cache: *restore_app_cache
9599

100+
- gh/install
101+
- run:
102+
name: Login to GitHub
103+
command: |
104+
echo $AUTH_TOKEN_GITHUB | gh auth login --with-token
105+
- run:
106+
name: Install Sauce Connect
107+
command: |
108+
curl -L -o sauce-connect.deb https://saucelabs.com/downloads/sauce-connect/5.1.3/sauce-connect_5.1.3.linux_amd64.deb
109+
sudo dpkg -i sauce-connect.deb
96110
- run: rm -rf /home/circleci/app/Packages/Application/Neos.Neos.Ui
97111
- run: cd /home/circleci/app/Packages/Application && mv ~/neos-ui-workspace Neos.Neos.Ui
98112
- run: |
@@ -110,6 +124,27 @@ jobs:
110124
- run: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
111125
- run: chmod +x ~/.nvm/nvm.sh
112126
- run:
127+
name: Start Sauce Connect
128+
background: true
129+
command: sc run --username ${SAUCE_USERNAME} --access-key ${SAUCE_ACCESS_KEY} --tunnel-name "circleci-tunnel" --region "us-west-1" --proxy-localhost allow
130+
- run:
131+
name: Define target branch
132+
command: |
133+
# Get the target branch of the PR but when we are not one a PR, use the current branch
134+
if [ -n "$CIRCLE_PULL_REQUEST" ]; then
135+
TARGET_BRANCH=$(gh pr view $CIRCLE_PULL_REQUEST --json baseRefName --jq '.baseRefName')
136+
else
137+
TARGET_BRANCH=$CIRCLE_BRANCH
138+
fi
139+
echo "Target Branch: $TARGET_BRANCH"
140+
# Save the variable to BASH_ENV to be able to access it in the next steps
141+
echo "export TARGET_BRANCH=$TARGET_BRANCH" >> $BASH_ENV
142+
- run:
143+
name: Use target branch
144+
command: |
145+
echo "Using target branch: $TARGET_BRANCH"
146+
- run:
147+
name: Prepare and run e2e tests
113148
no_output_timeout: 30m
114149
command: |
115150
export NVM_DIR="$HOME/.nvm"
@@ -119,39 +154,14 @@ jobs:
119154
nvm use
120155
echo 127.0.0.1 onedimension.localhost | sudo tee -a /etc/hosts
121156
echo 127.0.0.1 twodimensions.localhost | sudo tee -a /etc/hosts
122-
make test-e2e-saucelabs > /home/circleci/app/Data/Logs/AcceptanceTesting.log
157+
make test-e2e-saucelabs
123158
- store_artifacts:
124159
path: /home/circleci/app/Data/Logs
125160
- persist_to_workspace:
126161
root: /home/circleci/app/Data/Logs
127162
paths:
128163
- .
129164

130-
post-acceptance-tests-recordings:
131-
environment:
132-
FLOW_CONTEXT: Production
133-
docker:
134-
- image: cimg/php:8.2-node
135-
136-
steps:
137-
- attach_workspace:
138-
at: /home/circleci/app
139-
- run:
140-
name: Install GitHub CLI and jq
141-
command: |
142-
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
143-
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
144-
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
145-
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
146-
&& sudo apt update \
147-
&& sudo apt install gh -y
148-
- run:
149-
name: Run Script
150-
command: |
151-
JOB_IDS=$(cat /home/circleci/app/AcceptanceTesting.log | grep -o 'https://app.saucelabs.com/tests/[a-zA-Z0-9]\+' | sed 's/.*\///')
152-
echo "Job IDs: $JOB_IDS"
153-
/home/circleci/app/Build/comment-acceptance-tests.sh "$JOB_IDS" "$(basename "$CIRCLE_PULL_REQUEST")"
154-
155165
php-unittests:
156166
environment:
157167
FLOW_CONTEXT: Production
@@ -204,9 +214,6 @@ workflows:
204214
- e2e:
205215
requires:
206216
- build_flow_app
207-
- post-acceptance-tests-recordings:
208-
requires:
209-
- e2e
210217
- php-unittests:
211218
requires:
212219
- build_flow_app

.sauce/config.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
apiVersion: v1alpha
2+
kind: testcafe
3+
showConsoleLog: true
4+
sauce:
5+
region: us-west-1
6+
concurrency: 1 # Controls how many suites are executed at the same time.
7+
# todo fix and enable retries
8+
retries: 0
9+
metadata:
10+
tags:
11+
- e2e
12+
- $TARGET_BRANCH
13+
build: $TARGET_BRANCH
14+
tunnel:
15+
name: "circleci-tunnel"
16+
testcafe:
17+
version: 3.6.2
18+
# Controls what files are available in the context of a test run (unless explicitly excluded by .sauceignore).
19+
rootDir: ./
20+
suites:
21+
- name: "Tests in Firefox on Windows"
22+
browserName: "firefox"
23+
src:
24+
- "Tests/IntegrationTests/Fixtures/*/*.e2e.js"
25+
platformName: "Windows 10"
26+
screenResolution: "1280x1024"
27+
- name: "Tests in Firefox on MacOS"
28+
# todo use chrome here and fix ci https://github.com/neos/neos-ui/issues/3591
29+
browserName: "firefox"
30+
src:
31+
- "Tests/IntegrationTests/Fixtures/*/*.e2e.js"
32+
platformName: "macOS 13"
33+
screenResolution: "1440x900"
34+
npm:
35+
dependencies:
36+
- testcafe-react-selectors
37+
38+
# Controls what artifacts to fetch when the suites have finished.
39+
artifacts:
40+
download:
41+
match:
42+
- neosui-test-report.json
43+
- console.log
44+
- sauce-test-report.json
45+
when: always
46+
allAttempts: true
47+
directory: ../../Data/Logs/saucelabs-artifacts/
48+
49+
reporters:
50+
json:
51+
enabled: true
52+
filename: neosui-test-report.json

.sauceignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file instructs saucectl to not package any files mentioned here.
2+
.git/
3+
.github/
4+
.DS_Store
5+
.hg/
6+
.vscode/
7+
.idea/
8+
.gitignore
9+
.hgignore
10+
.gitlab-ci.yml
11+
.npmrc
12+
*.gif

Build/Jenkins/update-neos-ui-compiled.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export NODE_OPTIONS="--max-old-space-size=4096"
3535

3636
nvm install && nvm use
3737
make clean && make setup
38-
NEOS_UI_VERSION="${GIT_TAG:-${GIT_BRANCH}-dev}" make build-production
38+
NEOS_UI_VERSION="${GIT_TAG:-${GIT_BRANCH#*/}-dev}" make build-production
3939

4040
rm -Rf tmp_compiled_pkg
4141
git clone git@github.com:neos/neos-ui-compiled.git tmp_compiled_pkg

Build/comment-acceptance-tests.sh

-71
This file was deleted.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ test:
108108

109109
## Executes integration tests on saucelabs.
110110
test-e2e-saucelabs:
111-
bash Tests/IntegrationTests/e2e.sh "saucelabs:Firefox@latest:Windows 10"
111+
bash Tests/IntegrationTests/e2e.sh --saucelabs
112112

113113
## Executes integration tests locally.
114114
test-e2e:
115-
bash Tests/IntegrationTests/e2e.sh chrome:--disable-search-engine-choice-screen
115+
bash Tests/IntegrationTests/e2e.sh --browser chrome:--disable-search-engine-choice-screen
116116

117117
## Executes integration tests locally in a docker-compose setup.
118118
#

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ To speed up the e2e-test workflow/feedback loop you can start the system under t
175175
* The neos dev instance is available at `localhost:8081`
176176
* To enter the container run `docker compose -f Tests/IntegrationTests/docker-compose.neos-dev-instance.yaml exec php bash`
177177
* `yarn run testcafe <browser> <testFile> <optional flags>`
178-
* for example, this runs all tests in chrome: (NOTE starting with Chrome 127, --disable-search-engine-choice-screen is needed)
178+
* 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)
179179
`yarn run testcafe chrome:--disable-search-engine-choice-screen Tests/IntegrationTests/Fixtures/1Dimension`
180180
* some helpful optional flags are
181181
* `-T 'sidebars'` - grep tests by pattern and only execute those

Tests/IntegrationTests/Fixtures/1Dimension/selectBoxes.e2e.js

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ test('SelectBox opens below and breaks out of the creation dialog if there\'s en
2323

2424
test('SelectBox opens above in creation dialog if there\'s not enough space below.', async t => {
2525
await t
26-
.resizeWindow(1200, 768)
2726
.click(Selector('#neos-PageTree-AddNode'))
2827
.click(ReactSelector('NodeTypeItem').withExactText('SelectBox opens above'))
2928
.click(ReactSelector('NodeCreationDialog SelectBox'));

Tests/IntegrationTests/TestDistribution/DistributionPackages/Neos.TestNodeTypes/NodeTypes/Document/SelectBoxTestPage/OpensAboveInInspector.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
groups:
1111
test:
1212
label: Test
13+
# move it before the general document meta-data so there is
14+
# also space below when opening it in the e2e tests
15+
position: start
1316
properties:
1417
TextField:
1518
type: string

0 commit comments

Comments
 (0)