Address code review feedback - improve import consistency and screenshot uniqueness

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-08 15:25:49 +00:00
parent 4136f3c50d
commit 88b90d3266
4 changed files with 15 additions and 9 deletions

View File

@@ -12,10 +12,7 @@ import {
MenuItem,
Select,
} from '../atoms';
import Button from '../atoms/Button';
import TextField from '../atoms/TextField';
import Typography from '../atoms/Typography';
import IconButton from '../atoms/IconButton';
import { Button, TextField, Typography, IconButton } from '../atoms';
type Column = {
name: string;

View File

@@ -10,7 +10,7 @@ import {
TableRow,
Tooltip,
} from '../atoms';
import IconButton from '../atoms/IconButton';
import { IconButton } from '../atoms';
type DataGridProps = {
columns: Array<{ name: string; label?: string }>;

View File

@@ -9,8 +9,7 @@ import {
MenuItem,
Select,
} from '../atoms';
import Button from '../atoms/Button';
import Typography from '../atoms/Typography';
import { Button, Typography } from '../atoms';
type DropTableDialogProps = {
open: boolean;

View File

@@ -66,10 +66,20 @@ export async function executeStep(page: Page, step: PlaywrightStep, variables: R
break;
case 'screenshot':
// Generate unique filename with timestamp and random component
const timestamp = Date.now();
const random = Math.random().toString(36).substring(2, 8);
const uniqueId = `${timestamp}-${random}`;
if (selector) {
await page.locator(selector).screenshot({ path: `screenshots/${Date.now()}-${selector.replace(/[^a-z0-9]/gi, '_')}.png` });
const safeSelector = selector.replace(/[^a-z0-9]/gi, '_');
await page.locator(selector).screenshot({
path: `screenshots/${uniqueId}-${safeSelector}.png`
});
} else {
await page.screenshot({ path: `screenshots/${Date.now()}-page.png` });
await page.screenshot({
path: `screenshots/${uniqueId}-page.png`
});
}
break;