Skip to content

Commit 2cd17b4

Browse files
talissoncostaclaude
andcommitted
fix(e2e): move data-test from hidden input to visible wrapper in EnvironmentSelect
React Select puts rest props on the hidden <input>, making data-test="switch-environment-*-active" invisible to Playwright's waitForElementVisible. Move it to the wrapping <div> so the selector resolves to a visible element. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9a4aa64 commit 2cd17b4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

frontend/web/components/EnvironmentSelect.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export type EnvironmentSelectType = Partial<Omit<Props, 'value'>> & {
1616
}
1717

1818
const EnvironmentSelect: FC<EnvironmentSelectType> = ({
19+
'data-test': dataTestProp,
1920
idField = 'api_key',
2021
ignore,
2122
label,
@@ -54,7 +55,7 @@ const EnvironmentSelect: FC<EnvironmentSelectType> = ({
5455
return <div className='mb-2'>{foundValue?.label}</div>
5556
}
5657
return (
57-
<div>
58+
<div data-test={dataTestProp}>
5859
<Select
5960
{...rest}
6061
className='react-select select-xsm'

0 commit comments

Comments
 (0)