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

Non-API operations fixes #377

Merged
merged 7 commits into from
Aug 28, 2019
Merged

Conversation

ameysar
Copy link
Contributor

@ameysar ameysar commented Jul 3, 2019

Description

  • Fixes assignment of the correct value for object return property
  • Fix assignment of the correct operation method

Steps to reproduce

  • Magento 2.3.2 CE
  • Change app/code/Magento/CatalogRule/Test/Mftf/Metadata/catalog-rule-meta.xml
    • createCatalogRule operation change url to /catalog_rule/promo_catalog/save/back/edit and add returnRegex="~\/id\/(\d+?)\/~"
    • imlement delete operation
      <operation name="DeleteCatalogRule" dataType="catalogRule" type="delete" auth="adminFormKey" url="/catalog_rule/promo_catalog/delete/id/{return}" method="POST" successRegex="/messages-message-success/"> </operation>
  • Create and run test
    <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> <test name="CreateCatalogRuleApiTest"> <createData entity="_defaultCatalogRule" stepKey="createCatalogRule"/> <deleteData createDataKey="createCatalogRule" stepKey="deleteCatalogRule"/> </test> </tests>

Expected result

Test passed successfully

Actual result

Test failed

Notice

  • The first problem is that createData assign array to object return field
  • The second - delete operation method is taken by operation type mapping, despite operation method is defined

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/verification tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)
  • Changes to Framework doesn't have backward incompatible changes for tests or have related Pull Request with fixes to tests

@magento-cicd2
Copy link

magento-cicd2 commented Jul 3, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Jul 3, 2019

Coverage Status

Coverage increased (+0.7%) to 52.864% when pulling 66c5214 on ameysar:fix-non-api-operations into 3c7ed4b on magento:develop.

@KevinBKozan
Copy link
Contributor

@ameysar thank you for your contribution! We'll be reviewing the code changes and tracking its progress internally. We'll keep this PR updated with the appropriate labels to let you know the status of the code review.

Copy link
Contributor

@jilu1 jilu1 left a comment

Choose a reason for hiding this comment

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

@ameysar The other codes look good, please address the area with comments. Thank you!

@ameysar
Copy link
Contributor Author

ameysar commented Aug 27, 2019

@jilu1 all comments are fixed. Please proceed with CR

Copy link
Contributor

@jilu1 jilu1 left a comment

Choose a reason for hiding this comment

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

Minor comment about using 0 as default index.

@ameysar
Copy link
Contributor Author

ameysar commented Aug 28, 2019

@jilu1 please proceed with CR

@jilu1 jilu1 merged commit 0fe97bb into magento:develop Aug 28, 2019
jilu1 added a commit that referenced this pull request Sep 5, 2019
KevinBKozan added a commit that referenced this pull request Sep 9, 2019
[DevDoc]MQE-1729: Added document for PR #377
magento-devops-reposync-svc pushed a commit that referenced this pull request Jan 16, 2024
 remove-abandoned-packages : Removing abandoned packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants