Commit f5cdab03 authored by Ben Hayward's avatar Ben Hayward

Update

1 merge request!566WIP: [Sprint/NuancedNumbat](fix) E2E tests for staging and production #1948
Pipeline #83884356 canceled with stages
in 17 minutes and 10 seconds
......@@ -7,20 +7,10 @@ context('Comment Permissions', () => {
before(() => {
//make a post new.
cy.overrideFeatureFlag({
'blockchain_creditcard': true,
'suggested-users': true,
'helpdesk': true,
'top-feeds': true,
'es-feeds': true,
'allow-comments-toggle': true,
'permissions': true,
'wire-multi-currency': true,
'dark-mode': true,
'pro': true
'allow-comments-toggle': false,
});
//make a post new.
cy.getCookie('minds_sess')
.then((sessionCookie) => {
if (sessionCookie === null) {
......
......@@ -145,7 +145,7 @@ Cypress.Commands.add('newUser', (username = '', password = '') => {
});
Cypress.Commands.add('preserveCookies', () => {
Cypress.Cookies.preserveOnce('staging', 'minds_sess', 'mwa', 'XSRF-TOKEN');
Cypress.Cookies.preserveOnce('staging', 'minds_sess', 'mwa', 'XSRF-TOKEN', 'staging-features');
});
/**
......
......@@ -22,10 +22,9 @@ export class FeaturesService {
// Inverted check. Useful for *mIfFeature
return !this.has(feature.substring(1));
}
const overrides = JSON.parse(atob(this.cookie.get('staging-features')));
if (feature in overrides) {
return true;
return overrides[feature];
}
if (typeof this._features[feature] === 'undefined') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment