From a5c5c31d0964b429d6b83efd9172c65a2ed5b399 Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Tue, 1 Jul 2025 11:42:24 +0200 Subject: [PATCH] fix: app cypress e2e tests failing on core major version change --- frontend/app/cypress/support/commands/backend.ts | 10 ++++++++-- package.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/app/cypress/support/commands/backend.ts b/frontend/app/cypress/support/commands/backend.ts index 6c3dcdb8..df054293 100644 --- a/frontend/app/cypress/support/commands/backend.ts +++ b/frontend/app/cypress/support/commands/backend.ts @@ -16,7 +16,8 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import equal from 'fast-deep-equal'; import {extendsDeepEqual} from '@openstapps/collection-utils'; -import {SCSearchRequest, SCSearchResponse} from '@openstapps/core'; +import {CORE_VERSION, SCIndexResponse, SCSearchRequest, SCSearchResponse} from '@openstapps/core'; +import * as defaultConfig from '../../fixtures/config/default-config.json'; type InterceptArguments = { fixture?: string | SCSearchResponse | ((request: SCSearchRequest) => SCSearchResponse); @@ -34,7 +35,12 @@ type InterceptArguments = { * */ export function interceptConfig(config?: string) { - cy.intercept({url: '/', method: 'POST'}, {fixture: config || 'config/default-config.json'}).as('config'); + let localConfig: SCIndexResponse = defaultConfig as unknown as SCIndexResponse; + localConfig.backend.SCVersion = CORE_VERSION; + cy.intercept( + {url: '/', method: 'POST'}, + config ? {fixture: config} : {body: JSON.stringify(localConfig)}, + ).as('config'); } /** diff --git a/package.json b/package.json index 3eb65056..9ec7f2af 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,12 @@ "devDependencies": { "@changesets/changelog-git": "0.1.14", "@changesets/cli": "2.26.1", - "merge-cobertura": "1.0.1", "deepmerge": "4.3.1", "dotenv-cli": "7.2.1", "glob": "10.3.10", "http-server": "14.1.1", "junit-report-merger": "6.0.3", + "merge-cobertura": "1.0.1", "prettier": "3.1.1", "syncpack": "12.3.0", "turbo": "1.13.4",