-
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: prevent overwriting of video files #30673
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Yashodhan Joshi <[email protected]>
|
Not sure why semantic CI is failing, I have added changelog entry. I don't think this will make to the next release so might have to update it later. btw, this PR is ready for review. |
The previous PR introduced an unwanted blank line 2 which is causing your failure. Lines 1 to 3 in 12df40e
The blank line should be removed.
|
Signed-off-by: Yashodhan Joshi <[email protected]>
Hey @MikeMcC399 , thanks for the help! I have fixed the changelog and pushed. |
@YJDoc2 Thanks for the contribution. Can you write a test that verifies the change in behavior? |
Signed-off-by: Yashodhan Joshi <[email protected]>
Signed-off-by: Yashodhan Joshi <[email protected]>
Hey @jennifer-shehane , I have added a system test for this change. Also I synced the branch using develop-merge, if you want me to rebase instead, I'll do it and push. Thanks :) |
@YJDoc2 Thanks! We'll give it a look over as soon as we can. |
Hey I'm facing some issues while syncing my branch with develop. There were some conflicts because develop has changed the |
@YJDoc2 We haven't forgotten about this PR! We're working hard on getting Cypress 14 out first because we don't want to add any more scope to that release, so this will go in a release after that if approved. We can take a look at the conflicts - indeed a lot changed. |
I didn't know that, makes sense to wait for release before adding this then.
Yep, I'm still interested in following this PR, so when the release is done and you all have bandwidth for this, ping me and we can figure out the problem together. I'll pause any update on this in the meantime, as because the pre-commit hook itself is failing, I cannot push any updates at all. Thanks for your response and follow-up! |
Co-authored-by: Mike McCready <[email protected]>
I have the conflicts fixed in my branch, but I need to get these eslint fixes in first because the repo is in a weird place without that. d9550ad |
Additional details
Why was this change necessary?
Currently multiple runs of cypress in same dir (with trashAssetsBeforeRuns=false) will keep the screenshots files across runs, but will overwrite the video file. For more details, please check the issue discussion.
What is affected by this change?
The videos dir will now retain existing video files if trashAssetsBeforeRuns=false is set
Any implementation details to explain?
Nothing much, I have moved the getPath function used for generating screenshot paths into
fs.ts
fromscreenshot.js
and did some minor modifications to accommodate both screenshots and videos. There is one "hack" which I'm not sure how to fix, help appreciated :-compressed
suffix even if video compression is off.Steps to test
For current
develop
branch,spec1 -- testCase1 (failed).png
and other with namespec1 -- testCase1 (failed) (1).png
spec1.cy.js.mp4
For this branch,
spec1 -- testCase1 (failed).png
and other with namespec1 -- testCase1 (failed) (1).png
spec1.cy.js.mp4
andspec1.cy.js (1).mp4
How has the user experience changed?
They will keep the videos from previous runs if any.
PR Tasks
cypress-documentation
: This is a bug fix, I don't think this is applicable,type definitions
: I don't think this is applicable.