Conversation
Contributor
benfdking
commented
Jul 11, 2025
- also refactored the openProblemsView
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new end-to-end test for the “noselectstar” quickfix and centralizes opening the Problems panel via a shared helper.
- Introduce
openProblemsViewutility inutils.ts - Replace inline
runCommand(page, 'View: Focus Problems')calls withopenProblemsViewacross tests - Add
quickfix.spec.tsto validate the quickfix replacesSELECT *with explicit columns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| vscode/extension/tests/utils.ts | Added openProblemsView helper with JSDoc |
| vscode/extension/tests/quickfix.spec.ts | New test for the noselectstar quickfix |
| vscode/extension/tests/diagnostics.spec.ts | Swapped runCommand for openProblemsView |
| vscode/extension/tests/broken_project.spec.ts | Replaced a single runCommand call with openProblemsView |
Comments suppressed due to low confidence (1)
vscode/extension/tests/utils.ts:89
- [nitpick] The JSDoc for
openProblemsViewis missing a@paramannotation forpage; adding parameter documentation improves clarity for users of this helper.
/**
| .first() | ||
| .click() | ||
|
|
||
| await page.waitForTimeout(1_000) |
There was a problem hiding this comment.
Avoid using a fixed timeout for waiting; prefer waiting on a specific condition (e.g., expect.poll or waitForFunction) to detect when the file has been updated.
Suggested change
| await page.waitForTimeout(1_000) | |
| await page.waitForFunction(async () => { | |
| const content = await fs.readFile(modelPath, 'utf8'); | |
| return content.includes('SELECT id, customer_id, waiter_id, start_ts, end_ts, event_date') && !content.includes('SELECT *'); | |
| }); |
Comment on lines
+74
to
+76
| const readUpdatedFile = await fs.readFile(modelPath) | ||
| expect(readUpdatedFile.toString()).not.toContain('SELECT *') | ||
| expect(readUpdatedFile.toString()).toContain( |
There was a problem hiding this comment.
[nitpick] The file is read and converted to string multiple times for assertions; consider reading once and storing the string in a variable to simplify and clarify the checks.
Suggested change
| const readUpdatedFile = await fs.readFile(modelPath) | |
| expect(readUpdatedFile.toString()).not.toContain('SELECT *') | |
| expect(readUpdatedFile.toString()).toContain( | |
| const readUpdatedFile = (await fs.readFile(modelPath)).toString() | |
| expect(readUpdatedFile).not.toContain('SELECT *') | |
| expect(readUpdatedFile).toContain( |
7a9e20c to
b0aad03
Compare
b0aad03 to
7fd1a44
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.