Fix storybook / chromatic tests flakyness and integration tests (#11687)
## Storybook flakyness ### Actor Display image flakyness <img width="1512" alt="image" src="https://github.com/user-attachments/assets/875c0738-5e31-4aba-9231-4ba5f78d1355" /> **Fix:** stop using a random usage ### Task Groups broken <img width="1512" alt="image" src="https://github.com/user-attachments/assets/c67e47a1-a027-43f1-9601-68d61a8052b4" /> **Fix:** add missing TabListComponentInstance ## Flaky dates Add https://github.com/k35o/storybook-addon-mock-date ## Integration tests Fix broken tests due to relation refactoring
This commit is contained in:
@ -37,11 +37,6 @@ export class WorkspaceSchemaFactory {
|
||||
return new GraphQLSchema({});
|
||||
}
|
||||
|
||||
const cachedIsNewRelationEnabled =
|
||||
await this.workspaceCacheStorageService.getIsNewRelationEnabled(
|
||||
authContext.workspace.id,
|
||||
);
|
||||
|
||||
const isNewRelationEnabled = await this.featureFlagService.isFeatureEnabled(
|
||||
FeatureFlagKey.IsNewRelationEnabled,
|
||||
authContext.workspace.id,
|
||||
@ -79,35 +74,6 @@ export class WorkspaceSchemaFactory {
|
||||
);
|
||||
}
|
||||
|
||||
// TODO: remove this after the feature flag is droped
|
||||
if (
|
||||
(isNewRelationEnabled && cachedIsNewRelationEnabled === undefined) ||
|
||||
(isNewRelationEnabled !== cachedIsNewRelationEnabled &&
|
||||
cachedIsNewRelationEnabled !== undefined)
|
||||
) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
chalk.yellow('Recomputing due to new relation feature flag'),
|
||||
{
|
||||
isNewRelationEnabled,
|
||||
},
|
||||
);
|
||||
|
||||
await this.workspaceCacheStorageService.setIsNewRelationEnabled(
|
||||
authContext.workspace.id,
|
||||
isNewRelationEnabled,
|
||||
);
|
||||
|
||||
await this.workspaceMetadataCacheService.recomputeMetadataCache({
|
||||
workspaceId: authContext.workspace.id,
|
||||
});
|
||||
|
||||
throw new GraphqlQueryRunnerException(
|
||||
'Metadata cache recomputation required due to relation feature flag change',
|
||||
GraphqlQueryRunnerExceptionCode.METADATA_CACHE_FEATURE_FLAG_RECOMPUTATION_REQUIRED,
|
||||
);
|
||||
}
|
||||
|
||||
const objectMetadataMaps =
|
||||
await this.workspaceCacheStorageService.getObjectMetadataMaps(
|
||||
authContext.workspace.id,
|
||||
|
||||
Reference in New Issue
Block a user