-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable hacbs by default #274
enable hacbs by default #274
Conversation
src/hacbs/hacbsFeatureFlag.ts
Outdated
export const IS_HACBS_DEFAULT = 'HACBS'; | ||
|
||
export const enableHACBSFlagFromQueryParam = (setFlag: SetFeatureFlag): void => { | ||
if (IS_HACBS_DEFAULT) { | ||
setFlag(HACBS_FLAG, true); | ||
return; | ||
} | ||
let enabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to set the default value but still allow for overriding via url and local storage.
export const IS_HACBS_DEFAULT = 'HACBS'; | |
export const enableHACBSFlagFromQueryParam = (setFlag: SetFeatureFlag): void => { | |
if (IS_HACBS_DEFAULT) { | |
setFlag(HACBS_FLAG, true); | |
return; | |
} | |
let enabled = false; | |
export const enableHACBSFlagFromQueryParam = (setFlag: SetFeatureFlag): void => { | |
let enabled = true; |
Further down we must also change how we read from localStorage:
enabled = localStorage.getItem('hacbs') === 'true';
to:
enabled = localStorage.getItem('hacbs') !== 'false';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
021d9a3
to
2dd3b0f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #274 +/- ##
=======================================
Coverage 73.65% 73.65%
=======================================
Files 435 435
Lines 9182 9182
Branches 2455 2455
=======================================
Hits 6763 6763
Misses 2281 2281
Partials 138 138
Continue to review full report at Codecov.
|
@abhinandan13jan you'll need to update the cy tests because app-studio was the default. We'll need to set this to |
2d30533
to
e309b78
Compare
@christianvogt I've updated Integration tests but they are continuously Failing with ECON_RESET |
@abhinandan13jan do they pass locally for you? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update create-application-from-sample.spec.ts
to disable the hacbs
flag.
// Need to reload the page after enabling HACBS via localStorage | ||
cy.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely don't need this anymore but do need to reload the non-hacbs tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
e309b78
to
e3cc4f6
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinandan13jan, christianvogt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@abhinandan13jan: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Fixes
https://issues.redhat.com/browse/HAC-2492
Description
true
by defaulthacbs=false
hacbs
totrue
Type of change
Screen shots / Gifs for design review
How to test or reproduce?
Changes HACBS feature flag test
Browser conformance: