Commit 9d4ad245 authored by tom's avatar tom

update screenshots

parent 8ab312fc
...@@ -11,8 +11,6 @@ const test = base.extend<{ context: BrowserContext }>({ ...@@ -11,8 +11,6 @@ const test = base.extend<{ context: BrowserContext }>({
context: contextWithAuth, context: contextWithAuth,
}); });
test.use({ viewport: { width: 200, height: 200 } });
test.describe('with multiple items', () => { test.describe('with multiple items', () => {
const hooksConfig = { const hooksConfig = {
router: { router: {
...@@ -30,14 +28,14 @@ test.describe('with multiple items', () => { ...@@ -30,14 +28,14 @@ test.describe('with multiple items', () => {
const component = await render(<AccountActionsMenu/>, { hooksConfig }); const component = await render(<AccountActionsMenu/>, { hooksConfig });
await component.getByRole('button').click(); await component.getByRole('button').click();
await expect(page).toHaveScreenshot(); await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 200, height: 200 } });
}); });
test('base view with styles', async({ render, page }) => { test('base view with styles', async({ render, page }) => {
const component = await render(<AccountActionsMenu m={ 2 } outline="1px solid lightpink"/>, { hooksConfig }); const component = await render(<AccountActionsMenu m={ 2 } outline="1px solid lightpink"/>, { hooksConfig });
await component.getByRole('button').click(); await component.getByRole('button').click();
await expect(page).toHaveScreenshot(); await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 200, height: 200 } });
}); });
test('loading', async({ render }) => { test('loading', async({ render }) => {
...@@ -65,15 +63,15 @@ test.describe('with one item', () => { ...@@ -65,15 +63,15 @@ test.describe('with one item', () => {
test('base view', async({ render, page }) => { test('base view', async({ render, page }) => {
const component = await render(<AccountActionsMenu/>, { hooksConfig }); const component = await render(<AccountActionsMenu/>, { hooksConfig });
await component.getByRole('button').hover(); await component.getByRole('button').hover();
await expect(page.getByText('Add private tag')).toBeVisible();
await expect(page).toHaveScreenshot(); await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 200, height: 200 } });
}); });
test('base view with styles', async({ render, page }) => { test('base view with styles', async({ render, page }) => {
const component = await render(<AccountActionsMenu m={ 2 } outline="1px solid lightpink"/>, { hooksConfig }); const component = await render(<AccountActionsMenu m={ 2 } outline="1px solid lightpink"/>, { hooksConfig });
await component.getByRole('button').hover(); await component.getByRole('button').hover();
await expect(page.getByText('Add private tag')).toBeVisible();
await expect(page).toHaveScreenshot(); await expect(page).toHaveScreenshot({ clip: { x: 0, y: 0, width: 200, height: 200 } });
}); });
test('loading', async({ render }) => { test('loading', async({ render }) => {
......
...@@ -67,12 +67,12 @@ const ChartsWidgetsList = ({ filterQuery, isError, isPlaceholderData, charts, in ...@@ -67,12 +67,12 @@ const ChartsWidgetsList = ({ filterQuery, isError, isPlaceholderData, charts, in
charts?.map((section) => ( charts?.map((section) => (
<Box <Box
key={ section.id } key={ section.id }
mb={ 8 } mb={{ base: 6, lg: 8 }}
_last={{ _last={{
marginBottom: 0, marginBottom: 0,
}} }}
> >
<Skeleton loading={ isPlaceholderData } mb={ 3 } display="inline-flex" alignItems="center" columnGap={ 2 } id={ section.id }> <Skeleton loading={ isPlaceholderData } mb={{ base: 3, lg: 4 }} display="inline-flex" alignItems="center" columnGap={ 2 } id={ section.id }>
<Heading level="2" id={ section.id }> <Heading level="2" id={ section.id }>
{ section.title } { section.title }
</Heading> </Heading>
...@@ -85,7 +85,7 @@ const ChartsWidgetsList = ({ filterQuery, isError, isPlaceholderData, charts, in ...@@ -85,7 +85,7 @@ const ChartsWidgetsList = ({ filterQuery, isError, isPlaceholderData, charts, in
<Grid <Grid
templateColumns={{ lg: 'repeat(2, minmax(0, 1fr))' }} templateColumns={{ lg: 'repeat(2, minmax(0, 1fr))' }}
gap={ 4 } gap={{ base: 3, lg: 4 }}
> >
{ section.charts.map((chart) => ( { section.charts.map((chart) => (
<ChartWidgetContainer <ChartWidgetContainer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment