import React from 'react';
import { render } from 'lib/testHelpers';
import theme from 'theme/theme';
import { screen } from '@testing-library/react';
import * as S from 'components/Nav/ClusterTab/ClusterTab.styled';
import { ServerStatus } from 'generated-sources';
describe('Cluster Styled Components', () => {
describe('Wrapper Component', () => {
it('should check the rendering and correct Styling when it is open', () => {
render();
expect(screen.getByRole('menuitem')).toHaveStyle(
`color:${theme.menu.color.isOpen}`
);
});
it('should check the rendering and correct Styling when it is Not open', () => {
render();
expect(screen.getByRole('menuitem')).toHaveStyle(
`color:${theme.menu.color.normal}`
);
});
});
describe('StatusIcon Component', () => {
it('should check the rendering and correct Styling when it is online', () => {
render();
expect(screen.getByRole('status-circle')).toHaveStyle(
`fill:${theme.menu.statusIconColor.online}`
);
});
it('should check the rendering and correct Styling when it is offline', () => {
render();
expect(screen.getByRole('status-circle')).toHaveStyle(
`fill:${theme.menu.statusIconColor.offline}`
);
});
it('should check the rendering and correct Styling when it is Initializing', () => {
render();
expect(screen.getByRole('status-circle')).toHaveStyle(
`fill:${theme.menu.statusIconColor.initializing}`
);
});
});
});