-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Shopify] - Add Item As Variant Tests #4
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,130 @@ | |||
codeunit 139581 "Shpfy Create Item Variant Test" |
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'm not sure what the agreement is on how thorough the tests should be. I see you're mainly doing unit tests on a level of a procedure. I'd also like to see a tests or two that handle the cases where Option > 1 and one for removing the default variant.
VariantAPI: Codeunit "Shpfy Variant API"; | ||
VariantId: BigInteger; | ||
ActualQueryTxt: Text; | ||
ExpexctedQueryTok: Label '{"query":"mutation {productVariantDelete(id: \"gid://shopify/ProductVariant/%1\") {deletedProductVariantId userErrors{field message}}}"}', Locked = true; |
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.
In this case, it's fine. as it's a small query, but I feel we'd be breaking these kinds of tests over time, as we change the queries in the actual app.
It might be better to only assert if the part of the query that you really care about is in it?
Like, you care that it contains productVariantDelete and your id, but you don't really care too much about the rest...
Add Item As Variant Test
Automated tests for changes microsoft#26712