#68

Idea: Attach Tests to file changes

OpenJohannesKlaussopened 6d ago

PR Lens is great, we use it daily even without AI generated code and its a tremendous help.

One thing that I thought might be a very nice addition is attaching tests to the relevant component changes.

I.e. If a component changed a few lines within the implementation it would be nice to see the test names that are covering these line changes alongside the diff (maybe expandable, so one can see the test implementation). I think it makes it easier to reason about the changes when you see the expected behaviour in prose provided by the test names.

It also would help to assess if tests could be more expressive, more focued or are missing at all.

Activity

3
ohansemmanuel4d ago

@JohannesKlauss If i understand the issue clearly, you're suggesting show the components and related tests in the code panel, correct?

Right now we already group multiple changes related to a "component" on the canvas.

if I get this correctly, it'd also mean having the test files show up in the rail, correct?

if yes, I can think of a nice way to display this so it feels cohesive - as part of a single "component' in the system

JohannesKlauss4d ago

Yes. In the left compinent view I think the test file names showing up would be nice. On the right side I'm not sure how this would be visually pleasing, but I'm looking for a way to have the test names alongside the line changes that those tests cover. Something like "changes in line 62-113 are covered by tests x, y and z". But visually connected. Does this male sense?

ohansemmanuel4d ago

AH, I get it now! I'll have a look and share a proposal