Add testid into checkable icon, file version rows
This commit is contained in:
@@ -33,7 +33,7 @@ export const CheckableIcon = ({
|
||||
<div className={className}>
|
||||
{show && (
|
||||
<div className="w-6 text-center">
|
||||
<Checkbox value={checked} onChange={onCheck} />
|
||||
<Checkbox value={checked} onChange={onCheck} testClassId="checkable-icon" />
|
||||
</div>
|
||||
)}
|
||||
{!show && <div className="w-6 flex flew-row justify-center">{fallback}</div>}
|
||||
|
||||
@@ -135,7 +135,7 @@ export const CreateModal = ({
|
||||
onClick={() =>
|
||||
addFromUrl(app.emptyFile.url, app.emptyFile.filename || app.emptyFile.name)
|
||||
}
|
||||
testClassId={app.emptyFile.name}
|
||||
testClassId={app.emptyFile.name.replaceAll(' ' ,'-').toLocaleLowerCase()}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -99,17 +99,18 @@ const VersionModalContent = ({ id }: { id: string }) => {
|
||||
className={
|
||||
'flex flex-row items-center border -mt-px px-4 py-3 cursor-pointer hover:bg-zinc-500 hover:bg-opacity-10 ' +
|
||||
(index === 0 ? 'rounded-t-md ' : '') +
|
||||
(index === (versions || []).length - 1 ? 'rounded-b-md ' : '')
|
||||
(index === (versions || []).length - 1 ? 'rounded-b-md ' : '') +
|
||||
'testid:version-row'
|
||||
}
|
||||
>
|
||||
<div className="grow text-ellipsis whitespace-nowrap overflow-hidden">
|
||||
<Base>{version.file_metadata.name}</Base>
|
||||
<Base className="testid:name">{version.file_metadata.name}</Base>
|
||||
</div>
|
||||
<div className="shrink-0 ml-4">
|
||||
<BaseSmall>{formatDate(version.date_added || 0)}</BaseSmall>
|
||||
<BaseSmall className="testid:date-added">{formatDate(version.date_added || 0)}</BaseSmall>
|
||||
</div>
|
||||
<div className="shrink-0 ml-4">
|
||||
<BaseSmall>{formatBytes(version.file_metadata.size || 0)}</BaseSmall>
|
||||
<BaseSmall className="testid:file-size">{formatBytes(version.file_metadata.size || 0)}</BaseSmall>
|
||||
</div>
|
||||
<div className="shrink-0 ml-4">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user