-
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
feat: run failures enhancements #25234
Conversation
Thanks for taking the time to open a PR!
|
const variantClasses = computed(() => (VariantClassesTable[props.variant || 'primary'])) | ||
const variantClasses = computed(() => { | ||
return (VariantClassesTable[props.variant || 'primary']).split(' ').filter((css) => { | ||
return css !== 'hocus-default' || !props.disabled |
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.
A button should not have hover states if it is disabled.
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 see how this solves the issue for the button type being used in this issue, but it is not really clear here what it is doing or why. Your comment here in the PR was helpful.
Can you at least separate out the additional functionality and not chain it off the original part so that you can add a good comment to explain why this is being performed?
@@ -71,6 +71,17 @@ const actualPopperClass = computed(() => { | |||
result.push('no-arrow') | |||
} | |||
|
|||
// color takes priority, else fallback to tooltip -> dark, menu -> light |
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.
Refactored so as to allow menu functionality styled with the dark tooltip theme (tooltips don't stay open when the mouse leaves the designated hover element, but the tooltip added in this PR has a call to action).
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.
Overall is great! I love the addition of the types in the DebugMapping.ts file. Makes things much easier to understand. Mostly nit-pick stuff in my comments.
const variantClasses = computed(() => (VariantClassesTable[props.variant || 'primary'])) | ||
const variantClasses = computed(() => { | ||
return (VariantClassesTable[props.variant || 'primary']).split(' ').filter((css) => { | ||
return css !== 'hocus-default' || !props.disabled |
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 see how this solves the issue for the button type being used in this issue, but it is not really clear here what it is doing or why. Your comment here in the PR was helpful.
Can you at least separate out the additional functionality and not chain it off the original part so that you can add a good comment to explain why this is being performed?
@@ -46,7 +46,7 @@ const props = withDefaults(defineProps<{ | |||
instantMove?: boolean | |||
showGroup?: string | |||
}>(), { | |||
color: 'dark', | |||
color: undefined, |
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.
What did the component do with the color
prop originally. It does not look like it was used. I am guessing it just got passed on to the Menu
or Tooltip
components from floating-vue
. I looked at the documentation for that library but could not find any documentation for it. Did you look?
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.
Couldn't find any docs for it and it wasn't being referenced so I hijacked it!
const foundSpec = specs.find((spec) => spec.id === curr.specId) | ||
|
||
spec = { spec: foundSpec } | ||
// console.log('looking for spec', spec) |
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.
Remove this comment?
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 removed this in a previous commit, maybe the PR was stale when you were reviewing?
cy.mount(() => { | ||
return ( | ||
<div class="flex m-100px p-4 w-150px gap-160px"> | ||
{/* @ts-ignore */} |
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.
What is this ts-ignore for?
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.
No idea it was a copy and paste. Let me see if I can remove it without check-ts being pissed.
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.
Looks good for the most part - just had a couple of comments. I also left a comment on one of the Percy snapshots that changed. It looks like that might actually be related to a change that was made here. We should check that out just to make sure 👍🏻
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.
@astone123 I reverted the changes I made to the Button component but the test/snapshot didn't change. Not sure why, I'll check this out on the feature branch. |
|
||
const debugMappingArray = specsList(spec, tests) | ||
const debugMappingArray = specsList({ specs, tests, groups, localSpecs: [], currentTestingType: 'e2e' }) |
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.
Now we are on Vite 4 you should have an easier time adding vitest
to the code base. Not needed for this PR to merge, but I'd like to start using Vitest more for non UI tests - as much as I like dogfooding Cypress, it really doesn't feel like the right tool for this class of test.
I know we are on the same page about this, just noting it here since we couldn't add Vitest before, but now we should be able to. Feel free to add next time you see a chance! It's fast ⚡
@astone123 looks like that button was relying on css class ordering which is not the proper way to apply overrides (there isn't an ideal way to apply overrides but |
User facing changelog
na
Additional details
Working with Ankit revealed we needed to change up
DebugMappings.ts
. We paired on this and the results of the refactor are relevant for his upcoming work (groups).Steps to test
Driven mostly from CT tests, if you want to run it e2e:
feature/CYCLOUD-665-IATR
and runyarn
yarn docker-compose && yarn dev
localhost:3000
and create a projectCYPRESS_INTERNAL_ENV=development yarn cypress:open
projectId
npx cypress run --record --key <RECORD_KEY>
runByNumber(runNumber: 6) {
to whatever run you want to target (not dynamic yet)How has the user experience changed?
Screen.Recording.2022-12-20.at.11.31.21.AM.mov
PR Tasks
cypress-documentation
?type definitions
?