Skip to content

Commit

Permalink
Add testid into checkable icon, file version rows
Browse files Browse the repository at this point in the history
  • Loading branch information
lethemanh committed Jan 15, 2025
1 parent b64ada8 commit fd84082
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
/>
);
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:version-name">{version.file_metadata.name}</Base>
</div>
<div className="shrink-0 ml-4">
<BaseSmall>{formatDate(version.date_added || 0)}</BaseSmall>
<BaseSmall className="testid:version-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
Expand Down

0 comments on commit fd84082

Please sign in to comment.