Skip to content

Commit

Permalink
fixup! fixup! fixup! test(BackgroundMedia): test for BackgroundMedia …
Browse files Browse the repository at this point in the history
…added
  • Loading branch information
niktverd committed May 3, 2023
1 parent 7a2ad75 commit e0860aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event';

import {qaIdByDefault as qaIdOfBackgroundImage} from '../../../components/BackgroundImage/BackgroundImage';
import {qaIdOfAnimatedDiv} from '../../../components/Media/Image/Image';
import {qaIdByDefault} from '../../../components/Media/Media';
import {qaIdByDefault as qaIdOfMedia} from '../../../components/Media/Media';
import {qaIdOfSourceByDefault, qaIdOfVideoByDefault} from '../../../components/Media/Video/Video';
import BackgroundMedia from '../BackgroundMedia';

Expand Down Expand Up @@ -58,7 +58,7 @@ describe('BackgroundMedia', () => {
const className = 'my-class';

render(<BackgroundMedia qa={qaId} mediaClassName={className} />);
const component = screen.getByTestId(qaIdByDefault);
const component = screen.getByTestId(qaIdOfMedia);

expect(component).toHaveClass(className);
});
Expand Down Expand Up @@ -97,7 +97,7 @@ describe('BackgroundMedia', () => {

test('render with fullWidthMedia prop', () => {
render(<BackgroundMedia qa={qaId} fullWidthMedia />);
const component = screen.getByTestId(qaIdByDefault);
const component = screen.getByTestId(qaIdOfMedia);

expect(component).toHaveClass('pc-BackgroundMedia__media_full-width-media');
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/Media/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {getMediaImage} from './utils';

import './Image.scss';

export const qaIdOfAnimatedDiv = 'image-animated-div';
export const qaIdOfAnimatedDiv = 'qa-image-animated-div';

const b = block('media-component-image');

Expand Down
2 changes: 1 addition & 1 deletion src/components/Media/Media.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Video, {VideoAdditionProps} from './Video/Video';

import './Media.scss';

export const qaIdByDefault = 'media-component';
export const qaIdByDefault = 'qa-media';

const b = block('Media');

Expand Down

0 comments on commit e0860aa

Please sign in to comment.