diff --git a/cypress/e2e/2-credentials.cy.ts b/cypress/e2e/2-credentials.cy.ts index dbc613bd64e60..8ce3bc4080e83 100644 --- a/cypress/e2e/2-credentials.cy.ts +++ b/cypress/e2e/2-credentials.cy.ts @@ -15,7 +15,7 @@ import { TRELLO_NODE_NAME, } from '../constants'; import { CredentialsModal, CredentialsPage, NDV, WorkflowPage } from '../pages'; -import { successToast } from '../pages/notifications'; +import { errorToast, successToast } from '../pages/notifications'; import { getVisibleSelect } from '../utils'; const credentialsPage = new CredentialsPage(); @@ -278,4 +278,25 @@ describe('Credentials', () => { credentialsModal.getters.credentialAuthTypeRadioButtons().first().click(); nodeDetailsView.getters.copyInput().should('not.exist'); }); + + it('ADO-2583 should show notifications above credential modal overlay', () => { + // check error notifications because they are sticky + cy.intercept('POST', '/rest/credentials', { forceNetworkError: true }); + credentialsPage.getters.createCredentialButton().click(); + + credentialsModal.getters.newCredentialModal().should('be.visible'); + credentialsModal.getters.newCredentialTypeSelect().should('be.visible'); + credentialsModal.getters.newCredentialTypeOption('Notion API').click(); + + credentialsModal.getters.newCredentialTypeButton().click(); + credentialsModal.getters.connectionParameter('Internal Integration Secret').type('1234567890'); + + credentialsModal.actions.setName('My awesome Notion account'); + credentialsModal.getters.saveButton().click({ force: true }); + errorToast().should('have.length', 1); + errorToast().should('be.visible'); + + errorToast().should('have.css', 'z-index', '2100'); + cy.get('.el-overlay').should('have.css', 'z-index', '2001'); + }); }); diff --git a/packages/editor-ui/src/App.vue b/packages/editor-ui/src/App.vue index 4c849fb5d945f..77d371855cbc3 100644 --- a/packages/editor-ui/src/App.vue +++ b/packages/editor-ui/src/App.vue @@ -16,6 +16,7 @@ import { useUIStore } from '@/stores/ui.store'; import { useUsersStore } from '@/stores/users.store'; import { useSettingsStore } from '@/stores/settings.store'; import { useHistoryHelper } from '@/composables/useHistoryHelper'; +import { useStyles } from './composables/useStyles'; const route = useRoute(); const rootStore = useRootStore(); @@ -24,6 +25,8 @@ const uiStore = useUIStore(); const usersStore = useUsersStore(); const settingsStore = useSettingsStore(); +const { setAppZIndexes } = useStyles(); + // Initialize undo/redo useHistoryHelper(route); @@ -41,6 +44,7 @@ watch(defaultLocale, (newLocale) => { }); onMounted(async () => { + setAppZIndexes(); logHiringBanner(); void useExternalHooks().run('app.mount'); loading.value = false; @@ -134,7 +138,7 @@ const updateGridWidth = async () => { .banners { grid-area: banners; - z-index: 999; + z-index: var(--z-index-top-banners); } .content { @@ -154,13 +158,13 @@ const updateGridWidth = async () => { .header { grid-area: header; - z-index: 99; + z-index: var(--z-index-app-header); } .sidebar { grid-area: sidebar; height: 100%; - z-index: 999; + z-index: var(--z-index-app-sidebar); } .modals { diff --git a/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue b/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue index bef68236f82f8..db4d8ee1057c9 100644 --- a/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue +++ b/packages/editor-ui/src/components/AskAssistant/AskAssistantChat.vue @@ -106,7 +106,7 @@ function onClose() { .container { height: 100%; flex-basis: content; - z-index: 300; + z-index: var(--z-index-ask-assistant-chat); } .wrapper { diff --git a/packages/editor-ui/src/components/AskAssistant/AskAssistantFloatingButton.vue b/packages/editor-ui/src/components/AskAssistant/AskAssistantFloatingButton.vue index b147ecca9ffdb..70f6ed84fd717 100644 --- a/packages/editor-ui/src/components/AskAssistant/AskAssistantFloatingButton.vue +++ b/packages/editor-ui/src/components/AskAssistant/AskAssistantFloatingButton.vue @@ -1,5 +1,6 @@ - - - - diff --git a/packages/editor-ui/src/components/Modal.vue b/packages/editor-ui/src/components/Modal.vue index 3877b8dc53026..3f98e2a02396b 100644 --- a/packages/editor-ui/src/components/Modal.vue +++ b/packages/editor-ui/src/components/Modal.vue @@ -5,6 +5,7 @@ import type { EventBus } from 'n8n-design-system'; import { useUIStore } from '@/stores/ui.store'; import type { ModalKey } from '@/Interface'; import { APP_MODALS_ELEMENT_ID } from '@/constants'; +import { useStyles } from '@/composables/useStyles'; const props = withDefaults( defineProps<{ @@ -50,6 +51,8 @@ const props = withDefaults( const emit = defineEmits<{ enter: [] }>(); +const { APP_Z_INDEXES } = useStyles(); + const styles = computed(() => { const styles: { [prop: string]: string } = {}; if (props.height) { @@ -143,7 +146,7 @@ function getCustomClass() { :append-to-body="appendToBody" :data-test-id="`${name}-modal`" :modal-class="center ? $style.center : ''" - :z-index="2000" + :z-index="APP_Z_INDEXES.MODALS" >