microsoft / inshellisense

IDE style command line auto complete
MIT License
8.21k stars 179 forks source link

fix: for filepaths/folders templates, the icon type of the suggestion… #207

Closed alanhe421 closed 3 months ago

alanhe421 commented 3 months ago

For filepaths / folder templates, the icon type of the suggestion needs to be specified to avoid going to the default icon.

thanks for the review. @cpendery

image
alanhe421 commented 3 months ago

Can you add a test that covers this case, something like ls sr and just take the first item so we know it has a folder icon and then do something like ls READ to capture that it has the file icon?

Trying to have all PRs adding tests for the behavior they fix moving forward

@cpendery

Thank you very much for the suggestion, I've added the corresponding test case.

image

image

I verified that it was already OK. But I found a problem with the other test cases.

Do you want to fix it immediately or skip it first?

image

cpendery commented 3 months ago

Can you add a test that covers this case, something like ls sr and just take the first item so we know it has a folder icon and then do something like ls READ to capture that it has the file icon? Trying to have all PRs adding tests for the behavior they fix moving forward

@cpendery

Thank you very much for the suggestion, I've added the corresponding test case.

image

image

I verified that it was already OK. But I found a problem with the other test cases.

Do you want to fix it immediately or skip it first?

image

If it continues to be an issue, feel free to skip it. I'll address it later

cpendery commented 3 months ago

@alanhg Looks like you'll need to update the e2e tests too since they also run into those icon issues

alanhe421 commented 3 months ago

@cpendery Hi. I realized that e2e tests don't check icons or anything like that, this PR just changed the icon of the question, the e2e interaction test itself doesn't need to change, right? Or do you want to add the corresponding test case, but we have already added the check in the unit test.

Also, I found a lot of failures in e2e tests.

image

cpendery commented 3 months ago

@cpendery Hi. I realized that e2e tests don't check icons or anything like that, this PR just changed the icon of the question, the e2e interaction test itself doesn't need to change, right? Or do you want to add the corresponding test case, but we have already added the check in the unit test.

Also, I found a lot of failures in e2e tests.

image

The test generator results lead suggestions in src\tests\ui\autocomplete.test.ts does use the icon of ls which needs updated. That's the only test that's failing in the jobs. The e2e framework is definitely still a work in progress tui-test. If you could open any issues there, that would be great.

alanhe421 commented 3 months ago

@cpendery Hi. I realized that e2e tests don't check icons or anything like that, this PR just changed the icon of the question, the e2e interaction test itself doesn't need to change, right? Or do you want to add the corresponding test case, but we have already added the check in the unit test. Also, I found a lot of failures in e2e tests. image

The test generator results lead suggestions in src\tests\ui\autocomplete.test.ts does use the icon of ls which needs updated. That's the only test that's failing in the jobs. The e2e framework is definitely still a work in progress tui-test. If you could open any issues there, that would be great.

I have updated the test, thank you.

image