Skip to content
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] - Different Shipping Charges Types Tests #7

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

GediminasGaubys
Copy link
Owner

This pull request does not have a related issue as it's part of the delivery for development agreed directly with @AndreiPanko

Different shipping charges types Tests
Automated tests for changes microsoft#26708

GediminasGaubys and others added 21 commits October 31, 2024 11:40
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes microsoft#26819

### Existing metafield engine applied to integrate Customer and Company
metafields

Changes done to apply the engine:

- Extended `ShpfyGQLCompany.Codeunit.al` and
`ShpfyGQLCustomer.Codeunit.al` GQL query to get metafields with required
properties in response. Removed the namespace from query to retreive all
metafields.
- Created 2 new GraphQL queries `Shpfy GQL CustomerMetafieldIds` and
`Shpfy GQL CompanyMetafieldIds` to make `RetrieveMetafieldsFromShopify`
function work with Company and Customer.
- Created 2 new IMetafield Owner Type implementation codeunits for
Company and Customer
- Added values to related interface enums
- Added UpdateMetafield functions in API codeunits to update metafields
if there are metafields in response
- Removed old not working code to update metafields
- Add Metafields actions to Company/Customer list and card pages.
- Add owner type Company to `GetOwnerType` procedure in `Shpfy
Metafield` table
- Changed parameters in `CollectMetafieldIds` local procedure in `Shpfy
Metafield API` codeunit to support all Ownet types in function

Fixes
[AB#556298](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556298)

---------

Co-authored-by: Piotr Michalak <[email protected]>
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes microsoft#26819

### Add Item As Variant Test

Automated tests for changes microsoft#26712 


Fixes
[AB#555979](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555979)

---------

Co-authored-by: Piotr Michalak <[email protected]>
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
When users try to synchronize prices through the action available on
Shopify Catalogs page. Only the 100 first prices are synchronized. So if
the Shopify Catalog contains more than 100 product, only 100 of them
will be updated.

This problem results from a difference between two GraphQL requests made
during this process:

1) codeunit 30296 "Shpfy GQL CatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id currency prices(first:100) {edges {cursor node {variant
{id product {id}} price {amount} compareAtPrice {amount}}} pageInfo
{hasNextPage}}}}}"}'

2) codeunit 30297 "Shpfy GQL NextCatalogPrices"
'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id prices(first:100, after:"{{After}}") {edges {cursor
node {variant {id} price {amount} compareAtPrice {amount}}} pageInfo
{hasNextPage}}}}}"}'

Some necessary nodes are missing in NextCatalogPrices. Here is a fixed
request :

'{"query": "query { catalog(id: "gid://shopify/Catalog/{{CatalogId}}") {
id priceList {id currency prices(first:100, after:"{{After}}") {edges
{cursor node {variant {id product {id}} price {amount} compareAtPrice
{amount}}} pageInfo {hasNextPage}}}}}"}'


#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes microsoft#27535


Fixes
[AB#556528](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556528)
This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko
Fixes microsoft#26819

Add Item As Variant Test
Automated tests for changes
microsoft#26728
Fixes
[AB#556527](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556527)

---------

Co-authored-by: Piotr Michalak <[email protected]>
…icrosoft#27570)

This pull request does not have a related issue as it's part of delivery
for development agreed directly with @AndreiPanko

Add Item As Variant Test
Automated tests for changes
microsoft#26748
Fixes microsoft#26819
Fixes
[AB#556529](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556529)

---------

Co-authored-by: Jesper Schulz-Wedde <[email protected]>
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Reenable tests by uninstalling apps that aren't supported in W1 before
we start running tests. This will ensure tests don't accidently trigger
e.g. event subscribers from apps that aren't supported in W1 anyway.
Right now we are building, publishing and testing apps on top of a W1
Base App even though some of them aren't supported in W1.

We'll continue to compile the apps. We just won't have them installed
when running tests. With this change, tests are working again:
https://github.com/microsoft/ALAppExtensions/actions/runs/11664233820

Another way we could solve this from AL-Go would could define anti
patterns for app/test folders. In that case we would have the following
in the AL-Go settings `testFolders: [ Apps/W1/*/app/,
!Apps/W1/INTaxEngine/app ] `

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#556300](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556300)
…t#27527)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary: Initial upload of the Dynamics SL Historical Data
extension

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes microsoft#27620

Fixes
[AB#556923](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/556923)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #

Co-authored-by: magnushar <[email protected]>
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to AlAppExtensions please read our pull request guideline
below
* https://github.com/microsoft/ALAppExtensions/blob/main/CONTRIBUTING.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #

Co-authored-by: magnushar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants