mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(editor): Add disabled state with tooltip on project creation buttons if user lacks permission (#13867)
This commit is contained in:
committed by
GitHub
parent
c7bcdc544d
commit
e33d0d7466
@@ -195,4 +195,22 @@ describe('ProjectsNavigation', () => {
|
||||
expect(getByTestId('project-plus-button')).toBeVisible();
|
||||
expect(getByTestId('add-first-project-button')).toBeVisible();
|
||||
});
|
||||
|
||||
it('should show project plus button and add first project button in disabled state if user does not have permission', async () => {
|
||||
projectsStore.teamProjectsLimit = -1;
|
||||
projectsStore.hasPermissionToCreateProjects = false;
|
||||
|
||||
const { getByTestId } = renderComponent({
|
||||
props: {
|
||||
collapsed: false,
|
||||
},
|
||||
});
|
||||
const plusButton = getByTestId('project-plus-button');
|
||||
const addFirstProjectButton = getByTestId('add-first-project-button');
|
||||
|
||||
expect(plusButton).toBeVisible();
|
||||
expect(plusButton).toBeDisabled();
|
||||
expect(addFirstProjectButton).toBeVisible();
|
||||
expect(addFirstProjectButton).toBeDisabled();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user