mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
test(editor): Improve e2e pipeline performance & fix flaky tests (no-changelog) (#5672)
* Split up canvas spec, extract community nodes related tests into its own spec, various flakiness fixes * Remove unnecessary cy.waitForLoad from 7-workflow-actiosn spec
This commit is contained in:
@@ -14,28 +14,17 @@
|
||||
// ***********************************************************
|
||||
|
||||
import './commands';
|
||||
import CustomNodeFixture from '../fixtures/Custom_node.json';
|
||||
import CustomNodeWithN8nCredentialFixture from '../fixtures/Custom_node_n8n_credential.json';
|
||||
import CustomNodeWithCustomCredentialFixture from '../fixtures/Custom_node_custom_credential.json';
|
||||
import CustomCredential from '../fixtures/Custom_credential.json';
|
||||
|
||||
// Load custom nodes and credentials fixtures
|
||||
beforeEach(() => {
|
||||
cy.intercept('GET', '/types/nodes.json', (req) => {
|
||||
req.on('response', (res) => {
|
||||
const nodes = res.body || [];
|
||||
cy.intercept('GET', '/rest/settings').as('loadSettings');
|
||||
cy.intercept('GET', '/rest/login').as('loadLogin');
|
||||
|
||||
res.headers['cache-control'] = 'no-cache, no-store';
|
||||
nodes.push(CustomNodeFixture, CustomNodeWithN8nCredentialFixture, CustomNodeWithCustomCredentialFixture);
|
||||
});
|
||||
}).as('nodesIntercept');
|
||||
|
||||
cy.intercept('GET', '/types/credentials.json', (req) => {
|
||||
req.on('response', (res) => {
|
||||
const credentials = res.body || [];
|
||||
|
||||
res.headers['cache-control'] = 'no-cache, no-store';
|
||||
credentials.push(CustomCredential);
|
||||
})
|
||||
}).as('credentialsIntercept');
|
||||
// Always intercept the request to test credentials and return a success
|
||||
cy.intercept('POST', '/rest/credentials/test', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
data: { status: 'success', message: 'Tested successfully' },
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user