magento / magento2-functional-testing-framework

Magento2 Functional Testing Framework
Other
155 stars 132 forks source link

MQE-2158: support using actions from multiple modules in Suites #779

Closed jilu1 closed 4 years ago

jilu1 commented 4 years ago

Description

Fixed Issues (if relevant)

  1. magento/magento2-functional-testing-framework#: Issue title
  2. ...

Contribution checklist

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.2%) to 56.214% when pulling 9b20ffffed1b774d067a0e5ff384309d3f2e72d0 on MQE-2158 into 65298651f64258ae8b65f5265bc9867cbb5a2f13 on develop.

soumyau commented 4 years ago

changes look good. Had a couple of questions -

  1. What is the reasoning behind accessing actions in other custom modules from MagentoWebDriver? Can it live in a parent class that all other custom modules extend?
  2. How do I use actions outside of MagentoWebDriver in a Helper? Can that use case be included in a verification test?
jilu1 commented 4 years ago

changes look good. Had a couple of questions -

  1. What is the reasoning behind accessing actions in other custom modules from MagentoWebDriver? Can it live in a parent class that all other custom modules extend?

An alternative solution is use a base module that all our modules extend but I think that's too overkill. MagentoWebDriver is for sure used in Suite to handling sessions.

  1. How do I use actions outside of MagentoWebDriver in a Helper? Can that use case be included in a verification test?

I think helpers can access anything if they want to. Tests to show how helps use actions from other modules if needed is not in scope of this story.

soumyau commented 4 years ago

changes look good. Had a couple of questions -

  1. What is the reasoning behind accessing actions in other custom modules from MagentoWebDriver? Can it live in a parent class that all other custom modules extend?

An alternative solution is use a base module that all our modules extend but I think that's too overkill. MagentoWebDriver is for sure used in Suite to handling sessions. Sounds good.

  1. How do I use actions outside of MagentoWebDriver in a Helper? Can that use case be included in a verification test?

I think helpers can access anything if they want to. Tests to show how helps use actions from other modules if needed is not in scope of this story. looks like $this->getModule('\Magento\FunctionalTestingFramework\Module\MagentoWebDriver') is used in Helper classes and suites. Since actions are moved out of this class, maybe a similar mechanism of accessing container will be useful in case of Helpers too.