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

US152271 - Cleanup appropriate folders in the plugin during runs #36

Merged
merged 8 commits into from
Jun 22, 2023

Conversation

svanherk
Copy link
Contributor

Option 2 - alternative to #32.

After using both I prefer this one - the things that get cleared "make sense" and feel intuitive, whereas the other solution has some compromises.

Comment on lines 64 to 107
const goldenFileName = `${join(rootDir, '.vdiff', testPath, 'golden', browser, dir, newName)}.png`;
const passFileName = `${join(rootDir, '.vdiff', testPath, 'pass', browser, dir, newName)}.png`;
const screenshotFileName = `${join(rootDir, '.vdiff', testPath, 'fail', browser, dir, newName)}.png`;
const newPath = join(rootDir, '.vdiff', testPath, dir);
const goldenFileName = `${join(newPath, 'golden', browser, newName)}.png`;
const passFileName = `${join(newPath, 'pass', browser, newName)}.png`;
const screenshotFileName = `${join(newPath, 'fail', browser, newName)}.png`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This switches to the new directory structure we settled on in slack


const isCI = !!env['CI'];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this to make CI as quick as possible, but we could leave it out if we'd rather keep things simple. It'll just search for fail, pass, and reports that won't exist.

Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

I agree that this one feels better somehow... like the code responsible for creating the mess is also cleaning it up. Except that the reporter makes the report.html files.

src/server/visual-diff-plugin.js Outdated Show resolved Hide resolved
src/server/visual-diff-plugin.js Outdated Show resolved Hide resolved
@svanherk
Copy link
Contributor Author

I agree that this one feels better somehow... like the code responsible for creating the mess is also cleaning it up. Except that the reporter makes the report.html files.

And I think we'll need some kind of info manager to pass things between the plugin and the reporter for that, and that manager can own the name for report.html

svanherk and others added 3 commits June 22, 2023 09:38
@svanherk svanherk marked this pull request as ready for review June 22, 2023 14:08
@svanherk svanherk requested a review from a team as a code owner June 22, 2023 14:08
@svanherk svanherk merged commit ab1e09d into main Jun 22, 2023
1 check passed
@svanherk svanherk deleted the US152271_Cleanup_Folders_Option_2 branch June 22, 2023 19:41
@ghost
Copy link

ghost commented Jun 22, 2023

🎉 This PR is included in version 0.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants