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

Update dependencies. #1114

Merged
merged 39 commits into from
May 17, 2024
Merged

Update dependencies. #1114

merged 39 commits into from
May 17, 2024

Conversation

dompuiu
Copy link
Member

@dompuiu dompuiu commented May 16, 2024

Description

The dependencies on this project were not updated in a long time.

Related Issue

Motivation and Context

The dependencies were very old. A lot of dependencies moved to ES modules. TestCafe changed a lot. This project was using a 2 major versions old Prettier. ESLint released a new config format file. So a lot of reasons.

Big changes moving forward:

  • Cannot longer use require;
  • Imports must provide paths with extension.

One know issue is that I cannot make the script test:functional:watch work. Needs more investigation on how to make that work. test:functional:watch seems to have issue when the --esm flag is used. Since we no longer use it, now the watch command works.

Update: It seems that Chrome and Edge are controlled using native automation protocol, while Firefox or Safari are controlled using a reverse proxy (the method that was used to control all the browsers in TestCafe 2.6). Because of that, I was forced to undo or tweak some of the fixes I made initially for Chrome. Examples of differences:

  • The response bodies are automatically unzipped when test are run in Chrome. But that is not true for Safari or Firefox. So in the helper method that handles the responses, I try to unzip the body always. In case the unzip fails, I consider that the body is already a JSON. Yuck, but it works.
  • There is a test where we check that the same ECID is returned when a first party cookie is set. For the test to pass in Chroe, the cookie needs to be set on domain .alloyio.com. In Safari and Firefox it needs to be set on alloyio.com, otherwise the TestCafe reverse proxy ignores it. So the solution I choose is to set one cookie for each domain.

I was forced to add a few tests to the ignore list: C8631576 and C8631577. I talked with Don and he said he will take a look. If he find a way to fix those tests, I will remove them from the ignore list.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

@dompuiu dompuiu requested a review from jonsnyder May 17, 2024 18:55
@dompuiu dompuiu merged commit 119ad1d into main May 17, 2024
4 checks passed
@dompuiu dompuiu deleted the update_dependencies branch May 17, 2024 20:12
@jfkhoury
Copy link
Contributor

Thank you so much, @dompuiu, for taking on this effort!

@jonsnyder jonsnyder added the ignore-for-release Do not include this PR in release notes label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release Do not include this PR in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants