This change will stub the call to `users/features` to get the feature flags. By default it will return an empty list and rely on the client default flag list to enable/disable features
18 lines
327 B
TypeScript
18 lines
327 B
TypeScript
export const featureFlagIntercept = (
|
|
flags: Record<string, boolean>,
|
|
reload = true,
|
|
) => {
|
|
const response = {
|
|
responseMeta: {
|
|
status: 200,
|
|
success: true,
|
|
},
|
|
data: flags,
|
|
errorDisplay: "",
|
|
};
|
|
cy.intercept("GET", "/api/v1/users/features", response);
|
|
if (reload) {
|
|
cy.reload();
|
|
}
|
|
};
|