Skip to content

Commit 7a2fccd

Browse files
committed
fix e2e label
1 parent 44b44a9 commit 7a2fccd

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

apps/remix-ide-e2e/src/commands/assistantAddContext.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ function selectCtx(browser: NightwatchBrowser, ctx: string, done: VoidFunction)
2121
locateStrategy: 'xpath',
2222
selector: '//*[@data-id="composer-ai-add-context"]'
2323
})
24-
.click({
25-
locateStrategy: 'xpath',
26-
selector: '//*[@data-id="currentFile-context-option"]'
27-
})
28-
.pause()
24+
.waitForElementVisible('*[data-id="currentFile-context-option"]')
2925
.perform(async ()=> {
3026
switch (ctx) {
3127
case 'currentFile':

libs/remix-ui/remix-ai-assistant/src/components/prompt.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,12 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
5656
type="radio"
5757
id="ctx-none"
5858
checked={contextChoice === 'none'}
59-
data-id="none-context-option"
6059
onChange={() => {
6160
setContextChoice('none')
6261
setShowContextOptions(false)
6362
}}
6463
/>
65-
<label className="form-check-label custom-control-label" htmlFor="ctx-none">
64+
<label className="form-check-label custom-control-label" data-id="none-context-option" htmlFor="ctx-none">
6665
None
6766
</label>
6867
</div>
@@ -71,7 +70,6 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
7170
className="custom-control-input"
7271
type="radio"
7372
id="ctx-current"
74-
data-id="currentFile-context-option"
7573
checked={contextChoice === 'current'}
7674
onChange={() => {
7775
setContextChoice('current')
@@ -87,7 +85,6 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
8785
className="custom-control-input"
8886
type="radio"
8987
id="ctx-opened"
90-
data-id="allOpenedFiles-context-option"
9188
checked={contextChoice === 'opened'}
9289
onChange={() => {
9390
setContextChoice('opened')
@@ -103,7 +100,6 @@ export const PromptArea: React.FC<PromptAreaProps> = ({
103100
className="custom-control-input"
104101
type="radio"
105102
id="ctx-workspace"
106-
data-id="workspace-context-option"
107103
checked={contextChoice === 'workspace'}
108104
onChange={() => {
109105
setContextChoice('workspace')

0 commit comments

Comments
 (0)