-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: don't cut off a long runUrl in console #22619
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
renderTables will cut off longer urls which "renders" the url unusable
Thanks for the PR! Looks like we've still got some fails. If you go into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, just need to get CI green - see my comment.
Thanks for the hint. It was extremly hard to find some sort of hint in the CI runs/logs that would point to the error. So I just searched for the string "Recorded Run" I have to pray that it runs on my private computer though. I got quite a few weird error messages.. probably because I don't have Linux Subsystem installed on Windows (at some point it tries to execute a bash command?). When I ran yarn or read the README I couldn't find anything specific about the prerequisites for the development setup. I just installed yarn and ran the yarn command. And the examples of running tests are probably wrong.. I also don't know if the tests would be run with Cypress that includes my changes (do I need to build a Cypress.exe with "binary-build"?) |
For linux/mac should be just
Yeah this seems incorrect - we should update the docs. The system test looks inside
Most tests run against the source code, not the bundled binary. We do have binary tests, but running those locally (except on linux) is a little annoying, so I generally recommend people just push to CI for those. |
I think we can simplify this, pushed a commit, let's see how it goes. |
Ok got this working but we don't actually have a test for a really long URL. I'd like to add one. @mirobo please wait a little, or if you'd like to try and add one, that'd be great, too. I have no idea how to approach adding this, though. If you'd like to grab my commits and at least verify it's still working as you expect, that'd be fine, too. |
Thanks for your additions/fixes! I'll check for a long real-life example later.. I fixed some other issues in package.json and README.MD.. I wonder what the CI builds say to this :D
First I needed to install Yarn globally for Windows and I needed to add the yarn binary dir (i.e. C:\Program Files (x86)\Yarn\bin) to the PATH env variable. Building the binary is somehow required for the system-test. When I run the a system-test:
But I got this error when running "yarn binary-build":
Then I started to fiddle around with installing Lerna via NPM globally and also via Yarn globally. I was loosing my mind, I tried stuff for over an hour, googled at least half an hour and it still failed with the same error. It was a real pain! In the end I uninstalled Lerna globally via NPM and installed it globally via Yarn. And then suddenly it started... but the joy was not for long. "yarn binary-build" got further and produced a Cypress binary in "C:\Dev\mirobo\cypress\packages\electron\dist". But still with the following error..
Then I try to run the record_spec.js.. not a single test completes which may have to do with the fact that Cypress 10 gets hung on my PC after some usage. Need to gather some memory dumps for this.. |
You should not need to build the binary for most system tests. Some run with the binary, but the majority do not. Are you just doing yarn
cd system-tests
yarn test record This should execute the record_spec.js against the real code - NOT the binary. I can fire up windows later to verify this, you might have found a bug, but I'm really surprised since I'm sure people have developed Cypress on windows in the past. |
|
I'm sorry I couldn't look at this today, I will try to give you another review and also check the state of windows + system tests before the end of the week. |
I added a test for you: 100db79 This should be ready to ship, assuming CI passes! Thanks for the contribution.
|
@@ -99,6 +99,53 @@ const snapshotConsoleLogs = function (name) { | |||
return snapshot(name, stripAnsi(args)) | |||
} | |||
|
|||
function mockEE () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moved duplicated code to this function. The implementation was not changed.
Looks good. I'll get one more 👀 from the e2e team, this should be able to make it into the next release. Thanks @mirobo! |
Thanks! I've checked the failing tests but I really, really couldn't figure out what my changes would have to do with those failures. I guess they were present on the develop branch anyway? |
renderTables will cut off longer urls which "renders" the url unusable
User facing changelog
After a recorded run, a long runUrl would cut off which made it unusable
Recorded Run: https://......................../run/3806241066d18ec315b3a8f… ****
Additional details
Steps to test
How has the user experience changed?
Whenever the runUrl is displayed in Gitlab CI log, the URL to the run will be clickable and it will open the according run
See this incomplete URL:

PR Tasks
cypress-documentation
?type definitions
?