f090_magic_strings_refactoring #35
@@ -24,14 +24,13 @@ describe('Footer component', () => {
|
||||
id: 'admin'
|
||||
}
|
||||
};
|
||||
const { container } = render(Footer, { props: { data: mockData } });
|
||||
render(Footer, { props: { data: mockData } });
|
||||
const linkElement = screen.getByText('admin', { exact: false });
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
expect(linkElement).toHaveAttribute('href', ROUTE_NAMES.ROOT);
|
||||
|
||||
// Check for presence of `Profile` component
|
||||
// Look for the <svg> element with class="w-6 h-6"
|
||||
const svg = container.querySelector('svg.w-6.h-6');
|
||||
const svg = screen.getByTestId('profile-component');
|
||||
expect(svg).toBeTruthy();
|
||||
});
|
||||
test('Enthält Profil-Icon und entsprechenden Link: nicht angemeldet', () => {
|
||||
@@ -46,8 +45,7 @@ describe('Footer component', () => {
|
||||
expect(ID_displayElement).not.toBeInTheDocument();
|
||||
|
||||
// Check for presence of `Profile` component
|
||||
// Look for the <svg> element with class="w-6 h-6"
|
||||
const svg = container.querySelector('svg.w-6.h-6');
|
||||
const svg = screen.getByTestId('profile-component');
|
||||
expect(svg).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user