fix: app cypress e2e tests failing on core major version change

This commit is contained in:
Rainer Killinger
2025-07-01 11:42:24 +02:00
parent c8e290200f
commit a5c5c31d09
2 changed files with 9 additions and 3 deletions

View File

@@ -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');
}
/**

View File

@@ -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",