From e5d76a33ed004e6c6a95df81f253fdbd35f9b1fe Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sat, 13 Jul 2024 22:30:11 +0200 Subject: [PATCH] Fix performance tests (#6245) --- nx.json | 2 +- .../__stories__/perf/AddressFieldDisplay.perf.stories.tsx | 4 ++-- .../api-keys/SettingsDevelopersApiKeysDetail.stories.tsx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nx.json b/nx.json index 81be371e47..35b6e75017 100644 --- a/nx.json +++ b/nx.json @@ -162,7 +162,7 @@ "options": { "cwd": "{projectRoot}", "commands": [ - "test-storybook --url http://localhost:{args.port} --maxWorkers=3" + "test-storybook --url http://localhost:{args.port} --maxWorkers=2" ], "port": 6006 } diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/AddressFieldDisplay.perf.stories.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/AddressFieldDisplay.perf.stories.tsx index 50e86a4c6d..f97418a5af 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/AddressFieldDisplay.perf.stories.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/AddressFieldDisplay.perf.stories.tsx @@ -49,6 +49,6 @@ export const Elipsis: Story = { export const Performance = getProfilingStory({ componentName: 'AddressFieldDisplay', averageThresholdInMs: 0.15, - numberOfRuns: 30, - numberOfTestsPerRun: 50, + numberOfRuns: 20, + numberOfTestsPerRun: 100, }); diff --git a/packages/twenty-front/src/pages/settings/developers/__stories__/api-keys/SettingsDevelopersApiKeysDetail.stories.tsx b/packages/twenty-front/src/pages/settings/developers/__stories__/api-keys/SettingsDevelopersApiKeysDetail.stories.tsx index 34d0f6ccfa..4428ce4e1b 100644 --- a/packages/twenty-front/src/pages/settings/developers/__stories__/api-keys/SettingsDevelopersApiKeysDetail.stories.tsx +++ b/packages/twenty-front/src/pages/settings/developers/__stories__/api-keys/SettingsDevelopersApiKeysDetail.stories.tsx @@ -60,7 +60,7 @@ export const RegenerateApiKey: Story = { const canvas = within(canvasElement); await canvas.findByText('Settings'); - await userEvent.click(canvas.getByText('Regenerate Key')); + await userEvent.click(await canvas.findByText('Regenerate Key')); await canvas.findByText('Cancel'); const confirmationInput = await canvas.findByPlaceholderText('yes'); @@ -85,7 +85,7 @@ export const DeleteApiKey: Story = { const canvas = within(canvasElement); await canvas.findByText('Settings'); - await userEvent.click(canvas.getByText('Delete')); + await userEvent.click(await canvas.findByText('Delete')); await canvas.findByText('Cancel'); const confirmationInput = await canvas.findByPlaceholderText('yes');