ci: Make pinning e2e test work locally (no-changelog) (#9954)

Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-07-05 16:52:12 +02:00
committed by GitHub
parent 2a2c79886d
commit bbb2296b3d
8 changed files with 15 additions and 15 deletions

View File

@@ -25,9 +25,4 @@ module.exports = defineConfig({
screenshotsFolder: 'screenshots',
videosFolder: 'videos',
},
env: {
MAX_PINNED_DATA_SIZE: process.env.VUE_APP_MAX_PINNED_DATA_SIZE
? parseInt(process.env.VUE_APP_MAX_PINNED_DATA_SIZE, 10)
: 16 * 1024,
},
});

View File

@@ -12,8 +12,13 @@ const workflowPage = new WorkflowPage();
const ndv = new NDV();
describe('Data pinning', () => {
const maxPinnedDataSize = 16384;
beforeEach(() => {
workflowPage.actions.visit();
cy.window().then((win) => {
win.maxPinnedDataSize = maxPinnedDataSize;
});
});
it('Should be able to pin node output', () => {
@@ -139,7 +144,7 @@ describe('Data pinning', () => {
ndv.actions.pastePinnedData([
{
test: '1'.repeat(Cypress.env('MAX_PINNED_DATA_SIZE') as number),
test: '1'.repeat(maxPinnedDataSize),
},
]);
errorToast().should('contain', 'Workflow has reached the maximum allowed pinned data size');

View File

@@ -13,7 +13,6 @@ function runTests(options) {
process.env.N8N_USER_FOLDER = userFolder;
process.env.E2E_TESTS = 'true';
process.env.NODE_OPTIONS = '--dns-result-order=ipv4first';
process.env.VUE_APP_MAX_PINNED_DATA_SIZE = `${16 * 1024}`;
if (options.customEnv) {
Object.keys(options.customEnv).forEach((key) => {

View File

@@ -64,6 +64,7 @@ declare global {
innerWidth: number;
innerHeight: number;
preventNodeViewBeforeUnload?: boolean;
maxPinnedDataSize?: number;
featureFlags: {
override: (feature: string, value: unknown) => void;
};