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

feat: output video file path on one row during run mode #23915

Merged
merged 5 commits into from
Jan 19, 2023

Conversation

zachz-indeed
Copy link
Contributor

@zachz-indeed zachz-indeed commented Sep 21, 2022

User facing changelog

Moves video output link to it's own line in run mode to make the video output link more easily clickable in the terminal.

Additional details

Improves the user experience to allow users to directly click the recorded link inside the terminal or copy/paste from a CI terminal more easily

Steps to test

Easiest way to see changes locally is to run a single test in cypress run mode. For omitting values under system-tests in the core repo, please run the system tests and compare the snapshot.

How has the user experience changed?

Before

video-link-not-clickable.mp4

After

video-link-clickable.mp4

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 21, 2022

Thanks for taking the time to open a PR!

@CLAassistant
Copy link

CLAassistant commented Sep 21, 2022

CLA assistant check
All committers have signed the CLA.

@mjhenkes
Copy link
Member

@zachz-indeed, This seems like a good change. Could you provide a before and after screenshot for us to compare?

@zachz-indeed zachz-indeed changed the title ISSUE-23913: output video file path on one row fix: ISSUE-23913 output video file path on one row Oct 7, 2022
@zachz-indeed
Copy link
Contributor Author

(Ignore font color differences)

Before:
Screen Shot 2022-10-10 at 12 31 09 PM

After:
Screen Shot 2022-10-10 at 12 29 02 PM

@zachz-indeed
Copy link
Contributor Author

@mjhenkes - I added a before/after screenshot of the behavior.

I'm also getting an 'Unauthorized' status in CircleCI on the build step as of this morning. Do you have any ideas on what may have caused it/how to resolve? Thanks!

@mjhenkes mjhenkes marked this pull request as ready for review October 11, 2022 17:26
@nagash77
Copy link
Contributor

Hello @zachz-indeed ! Thank you for opening a PR to Cypress. We have been reviewing your PR internally and have a few changes we would like before this gets merged:

  1. Please add two spaces and a dash like all the previous lines to the lines you have added.
  2. Change to Finished processing: X seconds (no aligned-right seconds)
  3. Ensure it works with progress lines between ‘Started…’ and ‘Finished…’ lines and please attach screenshots of the larger context in which your changes are displayed.

@zachz-indeed
Copy link
Contributor Author

Hi @nagash77 - thank you for the feedback! I have made the recommended changes. Here is a screenshot of what that looks like now:
Screen Shot 2022-11-04 at 12 56 56 PM

I will work on getting the snapshots updated as well. Please let me know if there's anything else I should update or provide. This is my first open source contribution, so learning a lot as I go :) Thanks again!

@lmiller1990
Copy link
Contributor

Hi @zachz-indeed - I can help you get this merged. It looks like some of the snapshots are not updated or conflicted.

If you want to merge in develop and resolve the conflicts, I can handle updating the snapshots - you just need to run the system test with SNAPSHOT_UPDATE=1, but it takes a really long time, since this PR is basically updating every snapshot (hundreds).

It's probably quicker if someone who works in the repo takes care of that, so if you just want to resolve the conflicts, I can help with the snapshot updates.

@AtofStryker
Copy link
Contributor

@lmiller1990 @zachz-indeed I should be able to take a look at this today and get the snapshots updated. Might take a while though 😅

@@ -508,13 +508,16 @@ export function displayVideoProcessingProgress (opts: { videoName: string, video
table.push([
gray('-'),
gray('Finished processing:'),
`${formatPath(opts.videoName, getWidth(table, 2), 'cyan')}`,
gray(dur),
gray(dur),
])

console.log(table.toString())

console.log('')
Copy link
Member

Choose a reason for hiding this comment

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

Not sure we need a new line between the video details and the video output name.

@AtofStryker
Copy link
Contributor

one of the issues I am running into is that the processing time may/may not vary, which leads to some flakiness within our snapshots. Though I agree that I think the process time is more useful, the lift might be larger here to actually implement within our snapshots. I think for this reason we will likely need to go back to (x second), or possibly put this behind a flag where we can toggle the actual time being printed vs omitting it. This way our snapshots do not flake, and end users get the benefit of seeing the time. How does this sound @emilyrohrbough @lmiller1990 ?

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Dec 30, 2022

@AtofStryker The processing time should be overridden in the snapshots for (x seconds) like you are saying. It looks like these are captured correctly in the snapshot changes. Where are you seeing this at?

NEVERMIND - I see it's in the test failures. Yeah the regex likely needs updated to correctly account for this if this isn't being process correctly.

@astone123
Copy link
Contributor

Snapshots are being correctly processed now. We just need to update the snapshots for all of the system tests

@AtofStryker
Copy link
Contributor

I'm updating the snapshots now and should have this pushed up today

@AtofStryker
Copy link
Contributor

OK I got the snapshots updated 😅 . Took a while to figure it out but everything should now be green in CI

@cypress
Copy link

cypress bot commented Jan 13, 2023

@@ -3,4 +3,21 @@ describe('security', () => {
cy.visit('/fixtures/security.html')
cy.get('div').should('not.exist')
})

Copy link
Contributor

Choose a reason for hiding this comment

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

Was the intentionally merged here?

I think something went wrong during the rebase, it looks like some extra files in proxy and this one got added.

Copy link
Contributor

Choose a reason for hiding this comment

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

something is off as this branch is missing 478407e. What I might do to make this change set simpler is to create a new branch with a single commit of the changes based off develop. @zachz-indeed you would likely need to recreate the branch locally when this happens

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need someone to own this, I think we should just make a new branch and pick the files we need. I can do it if no-one else has bandwidth, but probably not until the first week of Feb.

Copy link
Contributor

Choose a reason for hiding this comment

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

I took care of it. 0843b0a is the commit with files we need with snapshots updated with the CI run in f6aee7c. This should be ready for review, which I don't feel super comfortable reviewing simply because of how many changes I committed.

Copy link
Contributor

Choose a reason for hiding this comment

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

I took a look, I think it looks fine. Any particular change you are concerned with? It's a lot of files, but all the changes are the same and what I'd expect.

Copy link
Contributor

Choose a reason for hiding this comment

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

nothing in particular. I think the two src file updates make sense and the snapshots are G2G and match what is expected

zachz-indeed and others added 2 commits January 17, 2023 11:20
Co-authored-by: Zach <zachz@indeed.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
@AtofStryker
Copy link
Contributor

@lmiller1990 @emilyrohrbough @zachz-indeed I got the necessary change set based on 0843b0a. This should only contain the changes to stdout, printing the run, and any snapshot updates needed

@AtofStryker AtofStryker requested review from emilyrohrbough and lmiller1990 and removed request for AtofStryker January 17, 2023 19:10
Copy link
Contributor

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

One of the snapshots has some unexpected changes (maybe). The rest looks good. I think we should find out about that one snapshot, and see if that was correct.




We detected that the Chrome process just crashed with code 'null' and signal 'SIGTRAP'.
We detected that the Chromium Renderer process just crashed.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why this changed 🤔

Copy link
Contributor

@lmiller1990 lmiller1990 Jan 18, 2023

Choose a reason for hiding this comment

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

Oh I see, I think the snapshots in the file are just in a different order now. It's just confusing now GH shows this as a diff - I guess the order than @AtofStryker ran the updates locally was different to what the previous person who updated the snapshots ran, so the order they were wrote to the file is changed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Getting these snapshots to update correctly was a bit of a challenge 😅 . Sometimes the snapshots do update in a different order but should be the same relative to their export.

I noticed we have a conflict in browser_crash_handling_spec from the improved memory work. I am rebuilding that snapshot now to fix the conflict and will update @zachz-indeed 's branch shortly

@lmiller1990 lmiller1990 self-requested a review January 18, 2023 22:13
@AtofStryker AtofStryker changed the title fix: ISSUE-23913 output video file path on one row feat: ISSUE-23913 output video file path on one row Jan 19, 2023
@AtofStryker AtofStryker changed the title feat: ISSUE-23913 output video file path on one row feat: output video file path on one row during run mode Jan 19, 2023
@AtofStryker AtofStryker requested review from AtofStryker and removed request for AtofStryker January 19, 2023 18:38
@AtofStryker AtofStryker merged commit 05d35f6 into cypress-io:develop Jan 19, 2023
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 24, 2023

Released in 12.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make video file path clickable
10 participants