clean
This commit is contained in:
parent
9070e954d3
commit
988b278c9e
|
|
@ -36,7 +36,6 @@ test.describe('New Todo', () => {
|
||||||
await expect(page.getByTestId('todo-title')).toHaveText([
|
await expect(page.getByTestId('todo-title')).toHaveText([
|
||||||
TODO_ITEMS[0],
|
TODO_ITEMS[0],
|
||||||
TODO_ITEMS[1],
|
TODO_ITEMS[1],
|
||||||
"faux"
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await checkNumberOfTodosInLocalStorage(page, 2);
|
await checkNumberOfTodosInLocalStorage(page, 2);
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,23 @@ const PromptButton: React.FC<{
|
||||||
}, [actions]);
|
}, [actions]);
|
||||||
|
|
||||||
const gitCommitInfo = React.useContext(GitCommitInfoContext);
|
const gitCommitInfo = React.useContext(GitCommitInfoContext);
|
||||||
console.log({ gitCommitInfo })
|
const prompt = React.useMemo(
|
||||||
const prompt = React.useMemo(() => fixTestPrompt(error, gitCommitInfo?.['pull.diff'] ?? gitCommitInfo?.['revision.diff'], pageSnapshot), [error, gitCommitInfo, pageSnapshot]);
|
() => fixTestPrompt(
|
||||||
|
error,
|
||||||
|
gitCommitInfo?.['pull.diff'] ?? gitCommitInfo?.['revision.diff'],
|
||||||
|
pageSnapshot
|
||||||
|
),
|
||||||
|
[error, gitCommitInfo, pageSnapshot]
|
||||||
|
);
|
||||||
|
|
||||||
return <CopyToClipboardTextButton value={prompt} description='Fix with AI' copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>} style={{ width: '90px', justifyContent: 'center' }} />;
|
return (
|
||||||
|
<CopyToClipboardTextButton
|
||||||
|
value={prompt}
|
||||||
|
description='Fix with AI'
|
||||||
|
copiedDescription={<>Copied <span className='codicon codicon-copy' style={{ marginLeft: '5px' }}/></>}
|
||||||
|
style={{ width: '90px', justifyContent: 'center' }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ErrorDescription = {
|
export type ErrorDescription = {
|
||||||
|
|
@ -109,7 +122,6 @@ export const ErrorsTab: React.FunctionComponent<{
|
||||||
<PromptButton error={message} actions={actions} />
|
<PromptButton error={message} actions={actions} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ErrorMessage error={message} />
|
<ErrorMessage error={message} />
|
||||||
</div>;
|
</div>;
|
||||||
})}
|
})}
|
||||||
|
|
|
||||||
|
|
@ -399,8 +399,6 @@ export const UIModeView: React.FC<{}> = ({
|
||||||
});
|
});
|
||||||
}, [closeInstallDialog, testServerConnection]);
|
}, [closeInstallDialog, testServerConnection]);
|
||||||
|
|
||||||
const gitCommitInfo = React.useMemo(() => testModel?.config.metadata['git.commit.info'] as GitCommitInfo | undefined, [testModel]);
|
|
||||||
|
|
||||||
return <div className='vbox ui-mode'>
|
return <div className='vbox ui-mode'>
|
||||||
{!hasBrowsers && <dialog ref={dialogRef}>
|
{!hasBrowsers && <dialog ref={dialogRef}>
|
||||||
<div className='title'><span className='codicon codicon-lightbulb'></span>Install browsers</div>
|
<div className='title'><span className='codicon codicon-lightbulb'></span>Install browsers</div>
|
||||||
|
|
@ -434,7 +432,7 @@ export const UIModeView: React.FC<{}> = ({
|
||||||
<XtermWrapper source={xtermDataSource}></XtermWrapper>
|
<XtermWrapper source={xtermDataSource}></XtermWrapper>
|
||||||
</div>
|
</div>
|
||||||
<div className={clsx('vbox', isShowingOutput && 'hidden')}>
|
<div className={clsx('vbox', isShowingOutput && 'hidden')}>
|
||||||
<GitCommitInfoContext.Provider value={gitCommitInfo}>
|
<GitCommitInfoContext.Provider value={testModel?.config.metadata['git.commit.info']}>
|
||||||
<TraceView
|
<TraceView
|
||||||
pathSeparator={queryParams.pathSeparator}
|
pathSeparator={queryParams.pathSeparator}
|
||||||
item={selectedItem}
|
item={selectedItem}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue