diff --git a/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx b/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
index c162825d8..d32bc5059 100644
--- a/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
+++ b/src/components/BackgroundImage/__tests__/BackgroundImage.test.tsx
@@ -5,6 +5,7 @@ import {render, screen} from '@testing-library/react';
import {testCustomClassName, testCustomStyle} from '../../../../test-utils/shared/common';
import {testSourceProps} from '../../../../test-utils/shared/image';
import {BackgroundImageProps} from '../../../models';
+import {getQaAttrubutes} from '../../../utils';
import BackgroundImage from '../BackgroundImage';
const qa = 'background-image-component';
@@ -12,6 +13,8 @@ const qa = 'background-image-component';
const imageSrc =
'https://storage.yandexcloud.net/cloud-www-assets/constructor/storybook/images/img-gray.png';
+const qaAttributes = getQaAttrubutes(qa, 'image-display-source');
+
describe('BackgroundImage', () => {
test('Render BackgroundImage by default', async () => {
render();
@@ -24,14 +27,16 @@ describe('BackgroundImage', () => {
test('add image as src prop', () => {
testSourceProps({
component: BackgroundImage,
- props: {src: imageSrc, qa: qaId},
+ props: {src: imageSrc, qa},
+ options: {qaId: qaAttributes.imageDisplaySource},
});
});
test('add image as desktop prop', () => {
testSourceProps({
component: BackgroundImage,
- props: {desktop: imageSrc, qa: qaId},
+ props: {desktop: imageSrc, qa},
+ options: {qaId: qaAttributes.imageDisplaySource},
});
});
diff --git a/src/components/Button/__tests__/Button.test.tsx b/src/components/Button/__tests__/Button.test.tsx
index 42b0b9862..a7afd6ec7 100644
--- a/src/components/Button/__tests__/Button.test.tsx
+++ b/src/components/Button/__tests__/Button.test.tsx
@@ -64,7 +64,7 @@ describe('Button', () => {
test('call onClick', async () => {
testOnClick({
component: Button,
- props: {text: buttonProps.text, qa: qaId},
+ props: {text: buttonProps.text, qa},
});
});
diff --git a/src/components/Image/Image.tsx b/src/components/Image/Image.tsx
index 92ab8c075..167f408bd 100644
--- a/src/components/Image/Image.tsx
+++ b/src/components/Image/Image.tsx
@@ -38,14 +38,10 @@ const DeviceSpecificFragment = ({
srcSet={checkWebP(src)}
type="image/webp"
media={`(max-width: ${BREAKPOINTS[breakpoint]}px)`}
- data-qa={`${qa}-${breakpoint}`}
+ data-qa={`${qa}-compressed`}
/>
)}
-
+
);
@@ -90,10 +86,20 @@ const Image = (props: ImageProps) => {
return (