diff --git a/packages/editor-ui/src/components/CommunityPackageInstallModal.vue b/packages/editor-ui/src/components/CommunityPackageInstallModal.vue
index 66bf8470c0..3a0b4d7574 100644
--- a/packages/editor-ui/src/components/CommunityPackageInstallModal.vue
+++ b/packages/editor-ui/src/components/CommunityPackageInstallModal.vue
@@ -61,6 +61,7 @@
:class="[$style.checkbox, checkboxWarning ? $style.error : '', 'mt-l']"
:disabled="loading"
@update:modelValue="onCheckboxChecked"
+ data-test-id="user-agreement-checkbox"
>
{{ $locale.baseText('settings.communityNodes.installModal.checkbox.label') }}
diff --git a/packages/editor-ui/src/components/__tests__/CommunityPackageInstallModal.spec.ts b/packages/editor-ui/src/components/__tests__/CommunityPackageInstallModal.spec.ts
new file mode 100644
index 0000000000..4e21495287
--- /dev/null
+++ b/packages/editor-ui/src/components/__tests__/CommunityPackageInstallModal.spec.ts
@@ -0,0 +1,55 @@
+import { createComponentRenderer } from '@/__tests__/render';
+import CommunityPackageInstallModal from '../CommunityPackageInstallModal.vue';
+import { createTestingPinia } from '@pinia/testing';
+import { COMMUNITY_PACKAGE_INSTALL_MODAL_KEY, STORES } from '@/constants';
+import userEvent from '@testing-library/user-event';
+import { retry } from '@/__tests__/utils';
+
+const renderComponent = createComponentRenderer(CommunityPackageInstallModal, {
+ props: {
+ appendToBody: false,
+ },
+ data() {
+ return {
+ packageName: 'n8n-nodes-hello',
+ };
+ },
+ pinia: createTestingPinia({
+ initialState: {
+ [STORES.UI]: {
+ modals: {
+ [COMMUNITY_PACKAGE_INSTALL_MODAL_KEY]: { open: true },
+ },
+ },
+ [STORES.SETTINGS]: {
+ settings: {
+ templates: {
+ host: '',
+ },
+ },
+ },
+ },
+ }),
+});
+
+describe('CommunityPackageInstallModal', () => {
+ it('should disable install button until user agrees', async () => {
+ const wrapper = renderComponent();
+
+ await retry(() =>
+ expect(wrapper.container.querySelector('.modal-content')).toBeInTheDocument(),
+ );
+
+ const installButton = wrapper.getByTestId('install-community-package-button');
+
+ expect(installButton).toBeDisabled();
+
+ await userEvent.click(wrapper.getByTestId('user-agreement-checkbox'));
+
+ expect(installButton).toBeEnabled();
+
+ await userEvent.click(wrapper.getByTestId('user-agreement-checkbox'));
+
+ expect(installButton).toBeDisabled();
+ });
+});