Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

GraphQl-662: Test coverage of USPS shipping method #537

Merged
merged 17 commits into from
Jun 19, 2019

Conversation

atwixfirster
Copy link
Contributor

@atwixfirster atwixfirster commented Mar 26, 2019

#662

Description (*)

Works with sandbox USPS account.

01

@naydav , unfortunately I did not find a way how to emulate USPS service without values in the "User ID" and "Password" fields.

On my local instance to verify Magento\GraphQl\Usps\SetUspsShippingMethodsOnCartTest::testSetUpsShippingMethod() test I used my USPS sandbox account.

Thank you!

1. Fix
Location of /home/travis/build/magento/graphql-ce/dev/tests/integration/testsuite/Magento/Usps/SetUspsShippingMethodsOnCartTest.php does not match formal namespace: Magento\Usps
1. Test USPS shipping method with sandbox params
@atwixfirster
Copy link
Contributor Author

@naydav , I've a proposition for you here.

On my local environment I've used my USPS sandbox account.

May be a good idea to have the appropriate one for Magento test instance. To provide USPS credentials and hide them from the 3rd eyes my proposition is use
dev/tests/api-functional/config/config-global.php config file with the next content (for USPS):

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

return [
    'carriers' => [
        'usps' => [
            'userid' => '0:3:xxxxxxxx==',
            'password' => '0:3:yyyyyyyyy==',
        ]
    ]
];

where 0:3:xxxxxxxx== is an encoded User ID and 0:3:yyyyyyyyy== is an encoded account Password.

Please let me know your thoughts.

Thank you!

Merge remote-tracking branch 'origin/2.3-develop' into 282-shipping-methods-USPS
Merge remote-tracking branch 'origin/2.3-develop' into 282-shipping-methods-USPS
@atwixfirster
Copy link
Contributor Author

@naydav , ticket is ready for your review.

Thank you!

Merge remote-tracking branch 'origin/2.3-develop' into 282-shipping-methods-USPS
@naydav naydav changed the title 282 shipping methods USPS GraphQl-662: Test coverage of USPS shipping method May 2, 2019
Copy link
Contributor

@naydav naydav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atwixfirster
As we talk early, need to introduce some mock object instead of 'real caller' object
Our tests should not depend on external system

The best way is creating preference in GraphQLTestModule and replace real object on our internal mock object

@lenaorobei lenaorobei requested a review from naydav June 13, 2019 16:26
@magento-engcom-team
Copy link
Contributor

Hi @lenaorobei, thank you for the review.
ENGCOM-5284 has been created to process this Pull Request
✳️ @lenaorobei, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@magento-engcom-team
Copy link
Contributor

Hi @naydav, thank you for the review.
ENGCOM-5284 has been created to process this Pull Request
✳️ @naydav, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

- added comment about selected shipping methods
@magento-engcom-team
Copy link
Contributor

Hi @naydav, thank you for the review.
ENGCOM-5284 has been created to process this Pull Request

@magento-engcom-team magento-engcom-team merged commit 23ab51c into 2.3-develop Jun 19, 2019
@ghost
Copy link

ghost commented Jun 19, 2019

Hi @atwixfirster, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants