Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TASK: Backport the end to end tests from 8.4 #3855

Merged
merged 15 commits into from
Sep 27, 2024
Merged

Conversation

markusguenther
Copy link
Member

@markusguenther markusguenther commented Sep 24, 2024

Related: #3850
Related: #3851

In the 8.4 branch, we worked on improving the acceptance test setup. Since we are supporting both Neos 8.3 and 8.4 simultaneously, the new test setup includes updated versions of TestCafe and SauceLabs.

This PR just backports the functionality.

The e2e.sh got some new parameters to be able to run local tests and saucelabs. Additionally, we introduce a help parameter to get more details on the usage.

e2e.sh --help
Screenshot 2024-09-24 at 20 58 25

For the saucelabs usage we need the environment variables SAUCE_USERNAME and SAUCE_ACCESS_KEY
e2e.sh --saucelabs

Local usage with e.g. the chrome browser works like that
e2e.sh --browser chrome

skurfuerst and others added 3 commits September 24, 2024 15:08
8.4: fix e2e tests
# Conflicts:
#	packages/neos-ui-redux-store/src/CR/Nodes/selectors.ts
TASK: Use saucectl with configuration
@markusguenther
Copy link
Member Author

As I got the feedback that we have too many shell scripts for the tasks, I would try to unify the scripts somehow.
So that we have on script that can be run saucelabs by a parameter and local if it is not set.

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank youuuuuuu so muuuuch :) <3

… positioning

When the inspector tab panel is scrolled just enough, so that there\'s enough space, SelectBox contents jump below the SelectBox.

Would fail otherwise because "document" would be before "tests"
 ✖ Select Boxes - SelectBox opens above in creation dialog if there's not enough space below.

   1) Unable to resize the window because the specified size exceeds the screen size. On macOS, a window cannot be larger than the screen.

      Browser: Chrome 129.0.0.0 / Ventura 13

         21 |        .gt(await ReactSelector('NodeCreationDialog SelectBox').getBoundingClientRectProperty('top'));
         22 |});
         23 |
         24 |test('SelectBox opens above in creation dialog if there\'s not enough space below.', async t => {
         25 |    await t
       > 26 |        .resizeWindow(1200, 768)
> WRN Suite errored. error="job start failed (404): Misconfigured -- Resolution you specified is not available for this OS/browser/version/device combo: OS: 'Mac 13', Browser: 'googlechrome', Version: '129.0.6668.59', Device: 'unspecified', Screen Resolution: '1920x1080'; available resolutions: '1024x768', '1152x864', '1280x960', '1376x1032', '1440x900', '1600x1200', '1920x1440', '2048x1536'"
The retrys just fail:

Sauce TestCafe Runner 3.9.0
2Running TestCafe 3.6.2

8Error: Cannot find module '/Volumes/Sauce/node/20.14.0/node-v20.14.0-darwin-x64/bin/node_modules/npm/bin/npm-cli.js'

25
26Error: Cannot find module '/Volumes/Sauce/node/20.14.0/node-v20.14.0-darwin-x64/bin/node_modules/npm/bin/npm-cli.js'

56ERROR No tests match your filter.
57See https://testcafe.io/documentation/402638/reference/configuration-file#filter.
58
59Type "testcafe -h" for help.
60JUnit file generation skipped: no test suites detected.
@mhsdesign
Copy link
Member

With testcafe 3 we can use native cdp automation for chromium. So to ensure that our tests also work on chromium based browsers locally we should add chrome to the test matrix. Thats why i change the test to run on chrome on mac os.

Additionally i added exit code handling to the bash script to signal if a test failed.

@mhsdesign mhsdesign merged commit cb36295 into 8.3 Sep 27, 2024
9 checks passed
@mhsdesign mhsdesign deleted the backport-e2e-tests branch September 27, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants