This commit is contained in:
2025-07-14 15:21:37 +00:00
parent 66493f793f
commit 23592f3a15
5 changed files with 878 additions and 15 deletions

View File

@@ -46,4 +46,34 @@ tap.test('render fab component', async () => {
document.body.removeChild(fab);
});
tap.test('render image lightbox component', async () => {
// Create and add lightbox
const lightbox = new socialioCatalog.SioImageLightbox();
document.body.appendChild(lightbox);
await lightbox.updateComplete;
expect(lightbox).toBeInstanceOf(socialioCatalog.SioImageLightbox);
// Check main elements
const overlay = lightbox.shadowRoot.querySelector('.overlay');
expect(overlay).toBeTruthy();
const container = lightbox.shadowRoot.querySelector('.container');
expect(container).toBeTruthy();
// Test opening with an image
await lightbox.open({
url: 'https://picsum.photos/800/600',
name: 'Test Image',
size: 123456
});
await lightbox.updateComplete;
expect(lightbox.isOpen).toEqual(true);
console.log('Image lightbox component rendered successfully');
document.body.removeChild(lightbox);
});
tap.start();