import 'jest-puppeteer'; import { gotoStory } from '../../../../helpers/test'; describe('MessageBubble rendering', () => { it('should render the component', async() => { await gotoStory(page, 'rendering/render'); expect(await page.waitForSelector('[data-ods="message-bubble"]')).not.toBeNull(); }); describe('custom style', () => { it('should render with custom style applied', async() => { await gotoStory(page, 'rendering/custom-style'); const messageBubble = await page.waitForSelector('[data-ods="message-bubble"]'); const color = await messageBubble?.evaluate((el: Element) => getComputedStyle(el).getPropertyValue('color')); expect(color).toBe('rgb(255, 0, 0)'); }); }); });