-
Notifications
You must be signed in to change notification settings - Fork 247
issue #685 - point 8 - Allow disabling the follow-up auto-select timer #1214
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
0688f25
04aa5fa
9411e41
ca2ed95
d763846
d4023d1
c35f6e8
13cc3fe
c4daefc
63634be
f7239c8
193c2f2
732651f
e064cf0
d52f659
73602a9
52da89d
43c865b
c427ecb
c9ebb87
1f99585
8cac2ac
61cad5b
3901fec
dfc839e
9081dde
5b6a506
3e8144a
dbad4af
38d5ee0
959826b
775f565
eac2f0c
05f8a3e
b7f78f8
252c69b
afdede5
63aca68
21d35c4
871bb98
39bdfb1
1ad8f52
db52d7f
3dcac60
6ad8a6e
fec4e13
3aacd91
351d9f3
a9e9462
7da96a1
2aa8138
7f3a22a
301d8ae
aeeec15
20d1987
8e01947
dfc2c63
04698d2
e815e91
19a7e3d
8f08b2b
989d451
a5f2a42
835d680
e9a3103
8705bfc
907f420
c8c69b3
a16d6e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* v8 ignore file -- Playwright component fixture is covered by the visual test. */ | ||
| import React from "react" | ||
|
|
||
| import { TranslationContext } from "@/i18n/TranslationContext" | ||
| import i18next from "@/i18n/setup" | ||
| import { ExtensionStateContextProvider } from "@/context/ExtensionStateContext" | ||
| import { AutoApproveSettings } from "../AutoApproveSettings" | ||
|
|
||
| export const AutoApproveSettingsFixture = () => ( | ||
| <TranslationContext.Provider | ||
| value={{ | ||
| t: (key) => (key === "settings:autoApprove.followupQuestions.timeoutDisabled" ? "Disabled" : key), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This |
||
| i18n: i18next, | ||
| }}> | ||
| <ExtensionStateContextProvider | ||
| initialState={{ autoApprovalEnabled: false, alwaysAllowFollowupQuestions: true }}> | ||
| <div className="w-[680px] bg-vscode-editor-background p-4 text-vscode-foreground"> | ||
| <AutoApproveSettings | ||
| alwaysAllowFollowupQuestions | ||
| followupAutoApproveTimeoutMs={0} | ||
| setCachedStateField={() => {}} | ||
| /> | ||
| </div> | ||
| </ExtensionStateContextProvider> | ||
| </TranslationContext.Provider> | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import React from "react" | ||
|
|
||
| import { expect, test } from "../../../../playwright/coverage-fixture" | ||
| import { AutoApproveSettingsFixture } from "./AutoApproveSettings.visual.fixture" | ||
|
|
||
| test("renders follow-up timeout row with disabled state label in the VS Code dark theme", async ({ mount, page }) => { | ||
| // The full settings bundle can leave a bare Zod reference after CT tree-shaking. | ||
| await page.evaluate(() => Object.assign(globalThis, { z: undefined })) | ||
|
|
||
| const component = await mount(<AutoApproveSettingsFixture />) | ||
|
|
||
| await component.evaluate(async () => { | ||
| await document.fonts.ready | ||
| await new Promise<void>((resolve) => requestAnimationFrame(() => resolve())) | ||
| }) | ||
|
|
||
| await expect(component).toHaveScreenshot("auto-approve-followup-timeout-disabled-dark.png") | ||
| }) |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this doesnt look right
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redid the snapshots. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.