Files
explore/ui/shared/Utilization.spec.tsx
T
2022-10-11 11:47:11 +03:00

26 lines
709 B
TypeScript

import { test, expect } from '@playwright/experimental-ct-react';
import React from 'react';
import RenderWithChakra from '../test-helpers/RenderWithChakra';
import Utilization from './Utilization';
test.use({ viewport: { width: 100, height: 50 } });
test('Utilization light', async({ mount }) => {
const component = await mount(
<RenderWithChakra>
<Utilization value={ 0.1 }/>
</RenderWithChakra>,
);
await expect(component).toHaveScreenshot();
});
test('Utilization dark', async({ mount }) => {
const component = await mount(
<RenderWithChakra colorMode="dark">
<Utilization value={ 0.1 }/>
</RenderWithChakra>,
);
await expect(component).toHaveScreenshot();
});