mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 06:14:51 +00:00
Name the file in the remove button's failure description
The remove button's label is "Remove attachment" and doesn't say which file. Its failure description now reads "<file>: <reason>", the same text as the tooltip.
This commit is contained in:
1 parent
7e990d4384
commit
3a156ff21d
2 files changed
+3
-2
No files matched your search
@@ -106,8 +106,9 @@ describe('AttachmentChipList failed chip', () => {
|
||||
)!;
|
||||
const describedBy = remove.getAttribute('aria-describedby');
|
||||
expect(describedBy).toBeTruthy();
|
||||
// Named, since the button's own label doesn't say which file.
|
||||
expect(document.getElementById(describedBy!)?.textContent).toBe(
|
||||
'Upload failed. The file could not be read.',
|
||||
'scan.pdf: Upload failed. The file could not be read.',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ export default function AttachmentChipList({
|
||||
</span>
|
||||
{failureReason && (
|
||||
<span id={reasonId} hidden>
|
||||
{failureReason}
|
||||
{attachment.fileName}: {failureReason}
|
||||
</span>
|
||||
)}
|
||||
|
||||
|
||||
Reference in new issue
Block a user