18692: Replaced icons, fixed context menu confusion
[arvados-workbench2.git] / src / views-components / data-explorer / renderers.test.tsx
index fc9325bd2db66a47459000e74162a9dbf56fb09a..5bc123df60016f041aef06a78a597557ea100757 100644 (file)
@@ -33,16 +33,25 @@ describe('renderers', () => {
                         green700: 'rgb(0, 255, 0)',
                         yellow700: 'rgb(255, 255, 0)',
                         red900: 'rgb(255, 0, 0)',
+                        orange: 'rgb(240, 173, 78)',
                         grey500: 'rgb(128, 128, 128)',
                     }
-                }
+                },
+                spacing: {
+                    unit: 8,
+                },
+                palette: {
+                    common: {
+                        white: 'rgb(255, 255, 255)',
+                    },
+                },
             },
         };
 
         [
             // CR Status ; Priority ; C Status ; Exit Code ; C RuntimeStatus ; Expected label ; Expected Color
             [CR.COMMITTED, 1, C.RUNNING, null, {}, PS.RUNNING, props.theme.customs.colors.blue500],
-            [CR.COMMITTED, 1, C.RUNNING, null, {error: 'whoops'}, PS.FAILING, props.theme.customs.colors.red900],
+            [CR.COMMITTED, 1, C.RUNNING, null, {error: 'whoops'}, PS.FAILING, props.theme.customs.colors.orange],
             [CR.COMMITTED, 1, C.RUNNING, null, {warning: 'watch out!'}, PS.WARNING, props.theme.customs.colors.yellow700],
             [CR.FINAL, 1, C.CANCELLED, null, {}, PS.CANCELLED, props.theme.customs.colors.red900],
             [CR.FINAL, 1, C.COMPLETE, 137, {}, PS.FAILED, props.theme.customs.colors.red900],
@@ -75,7 +84,9 @@ describe('renderers', () => {
 
                 expect(wrapper.text()).toEqual(eLabel);
                 expect(getComputedStyle(wrapper.getDOMNode())
-                    .getPropertyValue('color')).toEqual(eColor);
+                    .getPropertyValue('color')).toEqual(props.theme.palette.common.white);
+                expect(getComputedStyle(wrapper.getDOMNode())
+                    .getPropertyValue('background-color')).toEqual(eColor);
             });
         })
     });