PromucFlow_constructor/app/client/cypress/support/Objects/FeatureFlags.ts
Hetu Nandu 54f6803671
chore: App Sidebar testing (#28479)
Updates the Cypress testing suite to handle the new app sidebar as a new
way to navigation

This change will enable the sidebar feature flag by default for all tests so that all new changes keep the sidebar in mind.

fixes: #28388

---------

Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
2023-11-15 08:01:12 +05:30

22 lines
455 B
TypeScript

export const featureFlagIntercept = (
flags: Record<string, boolean> = {},
reload = true,
) => {
const response = {
responseMeta: {
status: 200,
success: true,
},
data: {
...flags,
release_app_sidebar_enabled: true,
},
errorDisplay: "",
};
cy.intercept("GET", "/api/v1/users/features", response);
if (reload) {
cy.reload();
cy.wait(2000); //for the page to re-load finish for CI runs
}
};