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>
22 lines
455 B
TypeScript
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
|
|
}
|
|
};
|