-
-
Notifications
You must be signed in to change notification settings - Fork 308
feat(test-runner-visual-regression): add testName to GetNameArgs #1657
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(test-runner-visual-regression): add testName to GetNameArgs #1657
Conversation
🦋 Changeset detectedLatest commit: fa6f894 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
packages/test-runner-visual-regression/src/visualRegressionPlugin.ts
Outdated
Show resolved
Hide resolved
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.
In general the approach looks good to me 👍 By the way, I was previously asking for this in #1040
Please consider implementing my suggestion about changing visualDiff command arguments.
And also please add a changeset for this PR using npx changeset
to trigger a version bump.
If you think that my suggestion does make sense, I think the bump cab be minor.
But technically it seems to be a non-breaking change so it can be a patch during 0.x
packages/test-runner-visual-regression/src/visualRegressionPlugin.ts
Outdated
Show resolved
Hide resolved
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.
Please rebase as there are merge conflicts now, also please check my comment.
@web-padawan yeah i'll rebase now and make the changes you suggested |
By supplying test name to each of the extensibility points, it becomes easier to store images relative to the test itself. Clean up param list for visual diff command, add new VisualDiffCommandContext type
81a23dd
to
80a3f36
Compare
Added changeset, made changes you suggested, rebased, squashed. I went with exactly the changes you suggested instead of further tweaking things. Let me know if it's all good |
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.
I have updated the changeset to use patch
as this does not affect public API of a plugin.
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.
LGTM 💯
Waiting for CI to pass and then I will merge and release a new version.
Thank you for your valuable contributions to this project, I really appreciate it.
CI failure is unrelated, see #1577. Restarted, hopefully this time it passes 🤞 |
Another unrelated failure, sigh. This also happens from time to time:
Restarted again 🙏 |
It felt like a new feature (of sorts) to me, that's why i went for a minor version. But that's your call
No worries. Thanks for reviewing and merging so quickly! I will probably continue to contribute fixes and improvements as needs arise :) Thanks again |
According to semver, during 0.x we use minor versions to indicate breaking changes so I decided to change it. Sure, keep these fixes coming if you find something that needs improvement 🙇♂️ |
Didn't realise that subtlety of v0.x! Good to know. |
by supplying test name to each of the extensibility points, it becomes easier to store images relative to the test itself.
For example, this will store snapshot images in a directory adjacent to the test file:
What I did
testFile
property toGetNameArgs
session.testFile
from plugin through to extensibility points likegetBaselineName
etc