Skip to content

Commit

Permalink
chore: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Jul 8, 2024
1 parent a174103 commit 92cd7af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions e2e/playground.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import { TEST_IDS } from '../src/client/testIDs';
const TEST_ID = TEST_IDS.playground;

const getAgentResponse = async (page: Page) => {
const agentResponse =
(await (await page.getByTestId(TEST_ID.agentResponseJSON)).textContent()) ?? 'Agent response not found';
return agentResponse;
const agentResponse = await page.getByTestId(TEST_ID.agentResponseJSON);
const agentResponseText = await agentResponse.textContent();
return agentResponseText ?? 'Agent response not found';
};

const getServerResponse = async (page: Page) => {
const serverResponse =
(await (await page.getByTestId(TEST_ID.serverResponseJSON)).textContent()) ?? 'Server response not found';
return serverResponse;
const serverResponse = await page.getByTestId(TEST_ID.serverResponseJSON);
const serverResponseText = await serverResponse.textContent();
return serverResponseText ?? 'Server response not found';
};

function parseRequestId(inputString: string) {
Expand All @@ -22,9 +22,8 @@ function parseRequestId(inputString: string) {

if (match && match[1]) {
return match[1];
} else {
return null;
}
return null;
}

const clickPlaygroundRefreshButton = async (page: Page) => {
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/common/CodeSnippet/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface CodeSnippetProps {
}

const PRISM_LINE_NUMBER_STYLE = { minWidth: 28 };
const PRISM_CODE_TAG_PROPS = { style: { color: '#c92c2c', font: 'inherit' as const } };

/**
* Provides a syntax-highlighted code block
Expand All @@ -42,7 +43,6 @@ export function CodeSnippet({
marginLeft: '0',
marginRight: '0',
};
const PRISM_CODE_TAG_PROPS = { style: { color: '#c92c2c', font: 'inherit' as const } };

return (
<div className={styles.snippetContainer}>
Expand Down

0 comments on commit 92cd7af

Please sign in to comment.