mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix and re-enable e2e test (no-changelog) (#13535)
This commit is contained in:
parent
0c266b3060
commit
1c5f1cab37
|
@ -54,11 +54,7 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||
cy.changeQuota('maxTeamProjects', -1);
|
||||
});
|
||||
|
||||
/**
|
||||
* @TODO: New Canvas - Fix this test
|
||||
*/
|
||||
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
|
||||
it.skip('should filter credentials by project ID when creating new workflow or hard reloading an opened workflow', () => {
|
||||
it('should filter credentials by project ID when creating new workflow or hard reloading an opened workflow', () => {
|
||||
cy.signinAsOwner();
|
||||
cy.visit(workflowsPage.url);
|
||||
|
||||
|
@ -453,6 +449,8 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||
});
|
||||
|
||||
it('should allow to change inaccessible credential when the workflow was moved to a team project', () => {
|
||||
cy.intercept('GET', /\/rest\/(workflows|credentials).*/).as('getResources');
|
||||
|
||||
cy.signinAsOwner();
|
||||
cy.visit(workflowsPage.url);
|
||||
|
||||
|
@ -474,15 +472,14 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||
// Create a project and add a user to it
|
||||
projects.createProject('Project 1');
|
||||
projects.addProjectMember(INSTANCE_MEMBERS[0].email);
|
||||
|
||||
clearNotifications();
|
||||
projects.getProjectSettingsSaveButton().click();
|
||||
|
||||
// Move the workflow from Home to Project 1
|
||||
projects.getHomeButton().click();
|
||||
workflowsPage.getters
|
||||
.workflowCards()
|
||||
.should('have.length', 1)
|
||||
.filter(':contains("Personal")')
|
||||
.should('exist');
|
||||
workflowsPage.getters.workflowCards().should('have.length', 1);
|
||||
workflowsPage.getters.workflowCards().filter(':contains("Personal")').should('exist');
|
||||
workflowsPage.getters.workflowCardActions('My workflow').click();
|
||||
workflowsPage.getters.workflowMoveButton().click();
|
||||
|
||||
|
@ -492,13 +489,13 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||
.contains('button', 'Move workflow')
|
||||
.should('be.disabled');
|
||||
projects.getProjectMoveSelect().click();
|
||||
getVisibleSelect()
|
||||
.find('li')
|
||||
.should('have.length', 4)
|
||||
.filter(':contains("Project 1")')
|
||||
.click();
|
||||
getVisibleSelect().find('li').should('have.length', 4);
|
||||
getVisibleSelect().find('li').filter(':contains("Project 1")').click();
|
||||
projects.getResourceMoveModal().contains('button', 'Move workflow').click();
|
||||
|
||||
clearNotifications();
|
||||
cy.wait('@getResources');
|
||||
|
||||
workflowsPage.getters
|
||||
.workflowCards()
|
||||
.should('have.length', 1)
|
||||
|
|
|
@ -16,9 +16,11 @@ export const clearNotifications = () => {
|
|||
const notificationSelector = '.el-notification:has(.el-notification--success)';
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find(notificationSelector).length) {
|
||||
cy.get(notificationSelector)
|
||||
.find('.el-notification__closeBtn')
|
||||
.click({ multiple: true, force: true });
|
||||
cy.get(notificationSelector).each(($el) => {
|
||||
if ($el.find('.el-notification__closeBtn').length) {
|
||||
cy.wrap($el).find('.el-notification__closeBtn').click({ force: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -10,7 +10,6 @@ import { ProjectTypes } from '@/types/projects.types';
|
|||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { hasPermission } from '@/utils/rbac/permissions';
|
||||
import type { IWorkflowDb } from '@/Interface';
|
||||
import { useWorkflowsStore } from '@/stores/workflows.store';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { STORES } from '@/constants';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
|
@ -21,7 +20,6 @@ export const useProjectsStore = defineStore(STORES.PROJECTS, () => {
|
|||
const route = useRoute();
|
||||
const rootStore = useRootStore();
|
||||
const settingsStore = useSettingsStore();
|
||||
const workflowsStore = useWorkflowsStore();
|
||||
const credentialsStore = useCredentialsStore();
|
||||
const usersStore = useUsersStore();
|
||||
|
||||
|
@ -168,7 +166,6 @@ export const useProjectsStore = defineStore(STORES.PROJECTS, () => {
|
|||
destinationProjectId: projectId,
|
||||
shareCredentials,
|
||||
});
|
||||
await workflowsStore.fetchAllWorkflows(currentProjectId.value);
|
||||
} else {
|
||||
await credentialsEEApi.moveCredentialToProject(
|
||||
rootStore.restApiContext,
|
||||
|
|
Loading…
Reference in a new issue