Преглед изворни кода

[UI] Changed Content to Value and updated a Test (#2812)

* Changed Content to Value and Update a Test

* Corrected content->value in tests

Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
Aditya Bhattad пре 2 година
родитељ
комит
e87178136c

+ 2 - 2
kafka-ui-react-app/src/components/Topics/Topic/Messages/MessageContent/MessageContent.tsx

@@ -82,7 +82,7 @@ const MessageContent: React.FC<MessageContentProps> = ({
                 type="button"
                 type="button"
                 onClick={handleContentTabClick}
                 onClick={handleContentTabClick}
               >
               >
-                Content
+                Value
               </S.Tab>
               </S.Tab>
               <S.Tab
               <S.Tab
                 $active={activeTab === 'headers'}
                 $active={activeTab === 'headers'}
@@ -108,7 +108,7 @@ const MessageContent: React.FC<MessageContentProps> = ({
             </S.Metadata>
             </S.Metadata>
 
 
             <S.Metadata>
             <S.Metadata>
-              <S.MetadataLabel>Content</S.MetadataLabel>
+              <S.MetadataLabel>Value</S.MetadataLabel>
               <span>
               <span>
                 <S.MetadataValue>{messageContentFormat}</S.MetadataValue>
                 <S.MetadataValue>{messageContentFormat}</S.MetadataValue>
                 <S.MetadataMeta>
                 <S.MetadataMeta>

+ 4 - 4
kafka-ui-react-app/src/components/Topics/Topic/Messages/MessageContent/__tests__/MessageContent.spec.tsx

@@ -61,7 +61,7 @@ describe('MessageContent screen', () => {
   });
   });
 
 
   describe('when switched to display the headers', () => {
   describe('when switched to display the headers', () => {
-    it('makes Headers tab active', () => {
+    it('makes headers tab active', () => {
       userEvent.click(screen.getByText('Headers'));
       userEvent.click(screen.getByText('Headers'));
       expect(screen.getByText('Headers')).toHaveStyleRule(
       expect(screen.getByText('Headers')).toHaveStyleRule(
         'background-color',
         'background-color',
@@ -70,9 +70,9 @@ describe('MessageContent screen', () => {
     });
     });
   });
   });
 
 
-  describe('when switched to display the content', () => {
-    it('makes content tab active', () => {
-      const contentTab = screen.getAllByText('Content');
+  describe('when switched to display the value', () => {
+    it('makes value tab active', () => {
+      const contentTab = screen.getAllByText('Value');
       userEvent.click(contentTab[0]);
       userEvent.click(contentTab[0]);
       expect(contentTab[0]).toHaveStyleRule(
       expect(contentTab[0]).toHaveStyleRule(
         'background-color',
         'background-color',