Back to .net8.0 api/v4/InfinityQS ApiExplorerSettings Wafer Counter Color Sorting
24 lines
1.1 KiB
JavaScript
24 lines
1.1 KiB
JavaScript
import { newE2EPage } from "@stencil/core/testing";
|
|
describe('Link', () => {
|
|
it('should render', async () => {
|
|
const page = await newE2EPage();
|
|
await page.setContent('<ifx-link href="https://example.com">Example Link</ifx-link>');
|
|
const linkElement = await page.find('ifx-link');
|
|
const anchorElement = await page.find('ifx-link >>> a');
|
|
expect(linkElement).toHaveClass('hydrated');
|
|
expect(anchorElement).toHaveClass('link');
|
|
expect(anchorElement.getAttribute('href')).toBe('https://example.com');
|
|
expect(anchorElement.getAttribute('target')).toBe('_self');
|
|
});
|
|
it('should have additional class names based on props', async () => {
|
|
const page = await newE2EPage();
|
|
await page.setContent('<ifx-link href="https://example.com" color="primary" bold="false" underline="false">Example Link</ifx-link>');
|
|
const linkElement = await page.find('ifx-link');
|
|
const anchorElement = await page.find('ifx-link >>> a');
|
|
expect(linkElement).toHaveClass('hydrated');
|
|
expect(anchorElement).toHaveClass('primary');
|
|
expect(anchorElement).not.toHaveClass('underline');
|
|
});
|
|
});
|
|
//# sourceMappingURL=link.e2e.js.map
|