Problems: auto-fix & problem panel (#541)
Test cases: - [x] create-ts-errors - [x] with auto-fix - [x] without auto-fix - [x] create-unfixable-ts-errors - [x] manually edit file & click recheck - [x] fix all - [x] delete and rename case THINGS - [x] error handling for checkProblems isn't working as expected - [x] make sure it works for both default templates (add tests) - [x] fix bad animation - [x] change file context (prompt/files) IF everything passes in Windows AND defensive try catch... then enable by default - [x] enable auto-fix by default
This commit is contained in:
9
e2e-tests/fixtures/create-ts-errors-complex.md
Normal file
9
e2e-tests/fixtures/create-ts-errors-complex.md
Normal file
@@ -0,0 +1,9 @@
|
||||
Tests delete-rename-write order
|
||||
<dyad-delete path="src/main.tsx">
|
||||
</dyad-delete>
|
||||
<dyad-rename from="src/App.tsx" to="src/main.tsx">
|
||||
</dyad-rename>
|
||||
<dyad-write path="src/main.tsx" description="final main.tsx file.">
|
||||
finalMainTsxFileWithError();
|
||||
</dyad-write>
|
||||
EOM
|
||||
10
e2e-tests/fixtures/create-ts-errors.md
Normal file
10
e2e-tests/fixtures/create-ts-errors.md
Normal file
@@ -0,0 +1,10 @@
|
||||
This will get a TypeScript error.
|
||||
|
||||
<dyad-write path="src/bad-file.ts" description="This will get a TypeScript error.">
|
||||
import NonExistentClass from 'non-existent-class';
|
||||
|
||||
const x = new Object();
|
||||
x.nonExistentMethod();
|
||||
</dyad-write>
|
||||
|
||||
EOM
|
||||
11
e2e-tests/fixtures/create-unfixable-ts-errors.md
Normal file
11
e2e-tests/fixtures/create-unfixable-ts-errors.md
Normal file
@@ -0,0 +1,11 @@
|
||||
This should not get fixed
|
||||
|
||||
<dyad-write path="src/bad-file.ts" description="This will produce 5 TypeScript errors.">
|
||||
import NonExistentClass from 'non-existent-class';
|
||||
import NonExistentClass2 from 'non-existent-class';
|
||||
import NonExistentClass3 from 'non-existent-class';
|
||||
import NonExistentClass4 from 'non-existent-class';
|
||||
import NonExistentClass5 from 'non-existent-class';
|
||||
</dyad-write>
|
||||
|
||||
EOM
|
||||
Reference in New Issue
Block a user