test(editor): Fix first project add button in closed sidebar (#14991)

This commit is contained in:
Csaba Tuncsik
2025-04-29 16:55:30 +02:00
committed by GitHub
parent 48f0c91a47
commit 598aa8e131
2 changed files with 15 additions and 1 deletions

View File

@@ -213,4 +213,17 @@ describe('ProjectsNavigation', () => {
expect(addFirstProjectButton).toBeVisible();
expect(addFirstProjectButton).toBeDisabled();
});
it('should show add first project button without text when the menu is collapsed', async () => {
projectsStore.teamProjectsLimit = -1;
const { getByTestId } = renderComponent({
props: {
collapsed: true,
},
});
expect(getByTestId('add-first-project-button')).toBeVisible();
expect(getByTestId('add-first-project-button').classList.contains('collapsed')).toBe(true);
});
});