-
Notifications
You must be signed in to change notification settings - Fork 384
change: [M3-8583] - Add support ticket mocks to MSW 2.0 #10937
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
change: [M3-8583] - Add support ticket mocks to MSW 2.0 #10937
Conversation
485262a
to
2fccb3e
Compare
export const dbSeeders = [ | ||
linodesSeeder, | ||
placementGroupSeeder, | ||
supportTicketsSeeder, |
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.
Do we want the ability to seed support tickets to test pagination, or should this really just be reserved for certain entities?
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.
sure! you've built it, it may come handy!
// TODO: handle dynamic entity selection | ||
entity: { | ||
id: 1, | ||
label: 'mock-linode-1', | ||
type: 'linode', | ||
url: '/v4/linode/instances/1', | ||
}, |
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.
I wasn't sure how best to handle the entities associated with a support ticket. To mock the dropdown in the open support ticket dialog, we'd need to mock the get requests for all products. For the time being, it populates real account data.
I guess, when we create a support ticket, we could also mock create a linode so that the mock-linode-1 link would send us to the mock linode details page. It just won't match up with whatever entity the user selects when creating the ticket.
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.
I think that's quite ok! it makes sense to have this populated by our actual products. We could mock that but that's extra work for little value
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.
thanks! looks good although something is missing
in dev-tools/load.ts
we need this added to mergedContext
supportReplies: [
...initialContext.supportReplies,
...(seedContext?.supportReplies || []),
],
supportTickets: [
...initialContext.supportTickets,
...(seedContext?.supportTickets || []),
],
// TODO: handle dynamic entity selection | ||
entity: { | ||
id: 1, | ||
label: 'mock-linode-1', | ||
type: 'linode', | ||
url: '/v4/linode/instances/1', | ||
}, |
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.
I think that's quite ok! it makes sense to have this populated by our actual products. We could mock that but that's extra work for little value
export const dbSeeders = [ | ||
linodesSeeder, | ||
placementGroupSeeder, | ||
supportTicketsSeeder, |
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.
sure! you've built it, it may come handy!
@abailly-akamai Thank you! I hadn't noticed this file. Made the change in e4915c1, but still trying to better understand what is happening here. When we enable dev tools, we want both the seeded data and the user-generated data to be part of context, but then we're passing all that context when setting up which handlers and preset to use ( |
@mjac0bs if my memory serves me well, this is necessary to set things up. When i pulled your PR, the new properties were not populated in the store, so the mocking was not working. the logic in |
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.
Great! thank you for adding this one
verified seeing ✅
verified crud operations ✅
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.
Newly-created mock ticket shows up as an open ticket ✅
Can Add Update to mock ticket ✅ (note about this below)
Can close ticket, and the status updates accordingly ✅
Can seed 100 support tickets using the MSW preset seeder ✅
When the ticket update is added, should it show as coming from test-account
too as opposed to Customer Support?
Screen.Recording.2024-10-07.at.5.19.43.PM.mov
@dwiley-akamai Sure, that would be more accurate. I overwrote a few values for the support ticket reply factory in the |
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.
🚀
Cloud Manager E2E
|
Project |
Cloud Manager E2E
|
Run status |
|
Run duration | 28m 41s |
Commit |
|
Committer | Mariah Jacobs |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
1
|
|
3
|
|
2
|
|
0
|
|
428
|
Tests for review
cypress/e2e/core/linodes/clone-linode.spec.ts • 1 failed test
Test | Artifacts | |
---|---|---|
clone linode > can clone a Linode from Linode details page |
Screenshots
Video
|
placementGroups/delete-placement-groups.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
Placement Group deletion > can delete with Linodes assigned when unexpected error show up and retry |
Screenshots
Video
|
parentChild/account-switching.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
Parent/Child account switching > From Parent to Child > can switch from Parent account user to Proxy account user from Billing page |
Screenshots
Video
|
volumes/create-volume.smoke.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
volumes > does not allow creation of a volume with invalid pricing from volumes landing |
Screenshots
Video
|
Description 📝
This PR adds CRUD request handlers and seeding for support tickets to MSW 2.0.
Preview 📷
Mocked Data
getSupportTickets
createSupportTicket
andgetSupportTicket
createSupportTicketReply
createSupportTicket
andcreateSupportTicketReply
closeSupportTicket
How to test 🧪
Verification steps
(How to verify changes)
CRUD
.Open New Ticket
, fill out the support ticket modal, and submit.Add Update
to your mock ticket.As an Author I have considered 🤔
Check all that apply