mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-24 10:32:45 +00:00
Compare commits
2 Commits
4da15f9675
...
@openstapp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bee38d4a59 | ||
|
|
a5c5c31d09 |
@@ -16,7 +16,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import equal from 'fast-deep-equal';
|
import equal from 'fast-deep-equal';
|
||||||
import {extendsDeepEqual} from '@openstapps/collection-utils';
|
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 = {
|
type InterceptArguments = {
|
||||||
fixture?: string | SCSearchResponse | ((request: SCSearchRequest) => SCSearchResponse);
|
fixture?: string | SCSearchResponse | ((request: SCSearchRequest) => SCSearchResponse);
|
||||||
@@ -34,7 +35,12 @@ type InterceptArguments = {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function interceptConfig(config?: string) {
|
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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ onlyBuiltDependencies:
|
|||||||
- swiper
|
- swiper
|
||||||
|
|
||||||
# PNPM 8 defaults:
|
# PNPM 8 defaults:
|
||||||
|
forceLegacyDeploy: True
|
||||||
# linkWorkspacePackages: true
|
# linkWorkspacePackages: true
|
||||||
# hoistWorkspacePackages: false
|
# hoistWorkspacePackages: false
|
||||||
# dedupePeerDependents: false
|
# dedupePeerDependents: false
|
||||||
Reference in New Issue
Block a user