Skip to content

Commit 0eea2d1

Browse files
committed
test: reflect load retry timestamp in image src
1 parent f4ce13a commit 0eea2d1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/Gallery/__tests__/ModalGallery.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,9 @@ describe('ModalGallery', () => {
365365
screen.getByTestId('str-chat__modal-gallery__image-loading-overlay'),
366366
).toBeInTheDocument();
367367
expect(retriedImage).not.toBe(image);
368-
expect(retriedImage).toHaveAttribute('src', 'http://test-image.jpg');
368+
expect(retriedImage.getAttribute('src')).toMatch(
369+
/^http:\/\/test-image\.jpg&retry=\d+$/,
370+
);
369371

370372
fireEvent.load(retriedImage);
371373
fireEvent.click(container.querySelector('.str-chat__modal-gallery__image'));

0 commit comments

Comments
 (0)