Fix all broken CIs (#7439)
Fix all the broken CIs :p This includes an ongoing effort to simplify test maintenance by having 1 unique source of truth about metadata and data mocks (that will later be generated from a unique source of seeds: dev = demo = test) Regressions: - Unit line coverage: 60 > 55 - Storybook Pages branch coverage: 40 > 35 We will need to write tests to increase those coverage - RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a regression here - Removed perf story about RawJSON > We will need to re-add it
This commit is contained in:
committed by
Charles Bochet
parent
bd305c8432
commit
d8c4af9279
@ -11,7 +11,6 @@ import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { getPeopleMock, peopleQueryResult } from '~/testing/mock-data/people';
|
||||
import { mockedWorkspaceMemberData } from '~/testing/mock-data/users';
|
||||
|
||||
import { viewQueryResultMock } from '~/testing/mock-data/views';
|
||||
import { RecordShowPage } from '../RecordShowPage';
|
||||
|
||||
const peopleMock = getPeopleMock();
|
||||
@ -63,13 +62,6 @@ const meta: Meta<PageDecoratorArgs> = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphql.query('FindManyViews', () => {
|
||||
return HttpResponse.json({
|
||||
data: {
|
||||
views: viewQueryResultMock,
|
||||
},
|
||||
});
|
||||
}),
|
||||
graphqlMocks.handlers,
|
||||
],
|
||||
},
|
||||
|
||||
@ -38,6 +38,24 @@ export const Default: Story = {
|
||||
},
|
||||
};
|
||||
|
||||
export const DateTimeSettingsTimeFormat: Story = {
|
||||
play: async () => {
|
||||
const canvas = within(document.body);
|
||||
|
||||
await canvas.findByText('Date and time');
|
||||
|
||||
const timeFormatSelect = await canvas.findByText('24h (08:33)');
|
||||
|
||||
userEvent.click(timeFormatSelect);
|
||||
|
||||
const timeFormatOptions = await canvas.findByText('12h (8:33 AM)');
|
||||
|
||||
userEvent.click(timeFormatOptions);
|
||||
|
||||
await canvas.findByText('12h (8:33 AM)');
|
||||
},
|
||||
};
|
||||
|
||||
export const DateTimeSettingsTimezone: Story = {
|
||||
play: async () => {
|
||||
const canvas = within(document.body);
|
||||
@ -77,21 +95,3 @@ export const DateTimeSettingsDateFormat: Story = {
|
||||
await canvas.findByText('Jun 13, 2022');
|
||||
},
|
||||
};
|
||||
|
||||
export const DateTimeSettingsTimeFormat: Story = {
|
||||
play: async () => {
|
||||
const canvas = within(document.body);
|
||||
|
||||
await canvas.findByText('Date and time');
|
||||
|
||||
const timeFormatSelect = await canvas.findByText('24h (08:33)');
|
||||
|
||||
userEvent.click(timeFormatSelect);
|
||||
|
||||
const timeFormatOptions = await canvas.findByText('12h (8:33 AM)');
|
||||
|
||||
userEvent.click(timeFormatOptions);
|
||||
|
||||
await canvas.findByText('12h (8:33 AM)');
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { expect } from '@storybook/jest';
|
||||
import { Meta, StoryObj } from '@storybook/react';
|
||||
import { within } from '@storybook/test';
|
||||
|
||||
@ -33,6 +34,6 @@ export const Default: Story = {
|
||||
const canvas = within(canvasElement);
|
||||
sleep(1000);
|
||||
|
||||
await canvas.findByText('PostgreSQL database');
|
||||
expect(await canvas.findByText('PostgreSQL database')).toBeInTheDocument();
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user