Skip to content

MQE-1886: Ability to use grab data between ActionGroups #755

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

Merged
merged 5 commits into from
Jul 22, 2020
Merged

Conversation

soumyau
Copy link
Contributor

@soumyau soumyau commented Jul 13, 2020

Description

Fixed Issues (if relevant)

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

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

@coveralls
Copy link

coveralls commented Jul 13, 2020

Coverage Status

Coverage increased (+0.04%) to 56.074% when pulling e01a26f on MQE-1886 into b889251 on develop.

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.

Simple case works as expected. I would suggest to discuss with team to clearly define cases like:

  • should we allow return be used in any where in an action group?
  • what's the expected behaviors when action groups with returns get merged? Currently it results an error
  • what's the expected behaviors when action groups with returns get extends? Currently it's results is not ideal and sometimes an error
  • Make sure to check the return in before/after case, it seems not working for me
  • Have we talked about returning more than one values in an array?

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.

And please add verification tests for merge, extends, return values in before/after, etc
added verification steps

@soumyau
Copy link
Contributor Author

soumyau commented Jul 20, 2020

Simple case works as expected. I would suggest to discuss with team to clearly define cases like:

  • should we allow return be used in any where in an action group?
    please check my comment on actionGroupSchema.xsd, looks like this is not feasible in the current setup.
  • what's the expected behaviors when action groups with returns get merged? Currently it results an error
    Added documentation on use of return in merging action groups, please check.
  • what's the expected behaviors when action groups with returns get extends? Currently it's results is not ideal and sometimes an error
    for extending action groups if return is used in both parent and child, if parent action group is referenced, it returns parent's value. If child action group is ref it returns child value. Seems logical.
  • Make sure to check the return in before/after case, it seems not working for me
    Added documentation regarding scope.
  • Have we talked about returning more than one values in an array?
    can return multiple values if grabMultiple stepKey is referenced. The use case seems rare, if there are users requesting it, we can incorporate later?

@soumyau
Copy link
Contributor Author

soumyau commented Jul 21, 2020

And please add verification tests for merge, extends, return values in before/after, etc
added verification steps

@jilu1
Copy link
Contributor

jilu1 commented Jul 21, 2020

Simple case works as expected. I would suggest to discuss with team to clearly define cases like:

  • should we allow return be used in any where in an action group?
    please check my comment on actionGroupSchema.xsd, looks like this is not feasible in the current setup.
  • what's the expected behaviors when action groups with returns get merged? Currently it results an error
    Added documentation on use of return in merging action groups, please check.
  • what's the expected behaviors when action groups with returns get extends? Currently it's results is not ideal and sometimes an error
    for extending action groups if return is used in both parent and child, if parent action group is referenced, it returns parent's value. If child action group is ref it returns child value. Seems logical.
  • Make sure to check the return in before/after case, it seems not working for me
    Added documentation regarding scope.
  • Have we talked about returning more than one values in an array?
    can return multiple values if grabMultiple stepKey is referenced. The use case seems rare, if there are users requesting it, we can incorporate later?

Do you mean currently we can return multiple values?
If not, let's document it that currently only can return one value

This is documented in action-groups.md
I think an action group should return just one value, similar to have how php functions behave. <return> supports returning an array, when <grabMultiple> stepKey is used. Similarly, <executeJS> can possibly be used to build an array from multiple action values and be used in <return> if needed.

Above issues, some of the issues are caused by existing bug (merge) or existing limitations (in before/after). Can we document the expect behavior for them? e.g.
One return is allowed among all merging action groups
This is documented in action-groups.md

added functional test.
Removed functional test for return.
@soumyau soumyau merged commit ef5be1d into develop Jul 22, 2020
@soumyau soumyau requested a review from dobooth July 22, 2020 16:53
@tomreece tomreece deleted the MQE-1886 branch July 27, 2020 14:09
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.

3 participants