mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat: Redirect users without feature flag from template cred setup (no-changelog) (#8302)
This commit is contained in:
12
cypress/composables/featureFlags.ts
Normal file
12
cypress/composables/featureFlags.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export const overrideFeatureFlag = (name: string, value: boolean | string) => {
|
||||
cy.window().then((win) => {
|
||||
// If feature flags hasn't been initialized yet, we store the override
|
||||
// in local storage and it gets loaded when the feature flags are
|
||||
// initialized.
|
||||
win.localStorage.setItem('N8N_EXPERIMENT_OVERRIDES', JSON.stringify({ [name]: value }));
|
||||
|
||||
if (win.featureFlags) {
|
||||
win.featureFlags.override(name, value);
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user