Skip to content

[WIP] Extracting MFTF tests in separate test files #27154

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

Closed
wants to merge 10 commits into from

Conversation

eduard13
Copy link
Contributor

@eduard13 eduard13 commented Mar 4, 2020

Description (*)

This PR extracts the MFTF tests into separate test files based on the MFTF Best Practices for the following modules:

  • Bundle
  • Captcha
  • ConfigurableProduct
  • Customer
  • Tax

Additionally, it also replaces the admin logging out <amOnPage url="{{AdminLogoutPage.url}}" stepKey="logout"/> action by AdminLogoutActionGroup action group.

Related Pull Requests

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

N/A

Questions or comments

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/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Mar 4, 2020

Hi @eduard13. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@lbajsarowicz
Copy link
Contributor

@eduard13 awesome!
Keep going with other modules!

Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

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

Could you also replace all the occurences of LoginAsAdmin in changed files to AdminLoginActionGroup?

Thanks!


<before>
<createData entity="ApiCategory" stepKey="createCategory"/>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use AdminLoginActionGroup instead.

<requiredEntity createDataKey="createConfigChildProduct6"/>
</createData>

<actionGroup ref="LoginAsAdmin" stepKey="login"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use AdminLoginActionGroup instead

<see selector="{{StorefrontProductInfoMainSection.productAttributeOptions1}}" userInput="option2" stepKey="seeOption2Storefront"/>

<!--go to admin and disable an option-->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Use AdminLoginActionGroup instead

@eduard13
Copy link
Contributor Author

eduard13 commented Mar 4, 2020

Hi @lbajsarowicz thank you for the suggestions, was planning to do that after finishing with all the modules.
Have the feeling that this process is never ending 😫.
Also planning to rename the test files to match the test that's inside (for those that I'm currently adjusting).

@lbajsarowicz
Copy link
Contributor

Don't change the names unless my PRs related to change Test names is merged, please.

@eduard13
Copy link
Contributor Author

eduard13 commented Mar 4, 2020

Agreed, thank you for letting me know.

@lbajsarowicz
Copy link
Contributor

lbajsarowicz commented Mar 4, 2020

@eduard13
Copy link
Contributor Author

eduard13 commented Mar 9, 2020

Hi @lbajsarowicz, I'd like to proceed with the other modules in a separate PR, in order to provide these changes is a smaller bunches (also if there will be some conflicts, will be easier to manage them). What do you think?
Also, the failing tests don't look to be somehow related with the changes of this PR.

@lbajsarowicz
Copy link
Contributor

@eduard13 doing changes per module is the easiest way of doing major changes.

My changes to action groups were waiting 7 months for review (single pr) so I split them per module and in 3 months - were merged 😀

The failed tests are not related to your changes

@eduard13 eduard13 closed this Mar 15, 2020
@m2-assistant
Copy link

m2-assistant bot commented Mar 15, 2020

Hi @eduard13, 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 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.

3 participants