-
Notifications
You must be signed in to change notification settings - Fork 332
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
test: [M3-7768] - Add VM Placement Group landing page empty state test #10350
test: [M3-7768] - Add VM Placement Group landing page empty state test #10350
Conversation
mockAppendFeatureFlags({ | ||
placementGroups: makeFeatureFlagData({ | ||
beta: true, | ||
enabled: true, | ||
}), | ||
}); | ||
mockGetFeatureFlagClientstream(); |
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.
The only real difference here is we're passing an object in the same shape as the feature flag rather than a true
or false
(however, there's no type safety here that'll catch us if we make a mistake).
Coverage Report: β
|
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.
Looks great! thanks for making this one, looking forward to writing more
// Mock the VM Placement Groups feature flag to be enabled for each test in this block. | ||
beforeEach(() => { | ||
mockAppendFeatureFlags({ | ||
placementGroups: makeFeatureFlagData<Flags['placementGroups']>({ |
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.
@jdamore-linode since it's a generic we can add type safety here. We'll just have to remember to do it and catch it at code reviews if not present.
Pushed a fix for this one
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.
Beautiful, wasn't aware of that Flags
type. Thanks @abailly-akamai!
By the way, do you know anything about the vmPlacement
LD flag? Was that a holdover from earlier in the project that isn't going to be used?
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.
Correct, lemme delete it now so there's no confusion anymore
@jdamore-linode Looks good and thanks for getting this started. My only reservation is whether the folder and spect should be renamed to |
Great callout, thanks @carrillo-erik! If that's more consistent and makes more sense then I absolutely agree. I'll try to take care of that before I sign out tonight! |
1e5690f
to
49d2653
Compare
Description π
Adds a quick integration test to confirm the VM Placement Groups landing page empty state. The real purpose of this PR is to provide a bare minimum example showing how to mock one of our new object-based feature flags, but it's not much different from mocking our boolean flags.
Changes π
How to test π§ͺ
yarn cy:run -s "cypress/e2e/core/vmPlacement/vm-placement-landing-page.spec.ts"
As an Author I have considered π€
Check all that apply