Skip to content

The open alternative to Salesforce, designed for AI.

Fix storybook tests on IconPicker (#4510)

Charles Bochetfeebc45d317e
diff --git a/packages/twenty-docker/prod/twenty-server/Dockerfile b/packages/twenty-docker/prod/twenty-server/Dockerfile
index 62d15763129..fe952b31ac5 100644
--- a/packages/twenty-docker/prod/twenty-server/Dockerfile
+++ b/packages/twenty-docker/prod/twenty-server/Dockerfile
@@ -16,14 +16,11 @@ RUN npx nx reset
RUN npx nx run twenty-server:build:packageJson
RUN mv /app/packages/twenty-server/dist/package.json /app/packages/twenty-server/package.json
RUN npx nx run twenty-server:build
-RUN rm -rf /app/node_modules
+RUN yarn workspaces focus twenty-emails twenty-server
FROM node:18.17.1-alpine as twenty-server
COPY --from=twenty-server-build /app /app
-WORKDIR /app
-
-RUN yarn workspaces focus twenty-emails twenty-server
WORKDIR /app/packages/twenty-server
diff --git a/packages/twenty-front/src/modules/ui/input/components/__stories__/IconPicker.stories.tsx b/packages/twenty-front/src/modules/ui/input/components/__stories__/IconPicker.stories.tsx
index 95b433dfa1d..8167a00cb5e 100644
--- a/packages/twenty-front/src/modules/ui/input/components/__stories__/IconPicker.stories.tsx
+++ b/packages/twenty-front/src/modules/ui/input/components/__stories__/IconPicker.stories.tsx
@@ -58,7 +58,7 @@ export const WithSearch: Story = {
await sleep(100);
- const searchedIcon = canvas.getByRole('button', {
+ const searchedIcon = await canvas.findByRole('button', {
name: 'Icon Building Skyscraper',
});
@@ -81,7 +81,7 @@ export const WithSearchAndClose: Story = {
await sleep(100);
- const searchedIcon = canvas.getByRole('button', {
+ const searchedIcon = await canvas.findByRole('button', {
name: 'Icon Building Skyscraper',
});