Files
oi-metrology/Server/wwwroot/package/dist/collection/components/link/link.e2e.js
Mike Phares 5c9f0d1aff Remove with Text
Remove GetEngineeringSpcReview
Better error message
EnforceCodeStyleInBuild
NginxFileSystem
Remove Reactors and Working Directory
AppSettings
Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
2024-04-15 13:13:55 -07:00

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