Skip to content

MQE-2078: [PHPUnit 9] assertContains and assertNotContains breaking c… #673

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 3 commits into from
Apr 17, 2020

Conversation

soumyau
Copy link
Contributor

@soumyau soumyau commented Apr 14, 2020

…hanges

added new actions
assertStringContainsString
assertStringContainsStringIgnoringCase

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

…hanges

added new actions
assertStringContainsString
assertStringContainsStringIgnoringCase
@coveralls
Copy link

coveralls commented Apr 14, 2020

Coverage Status

Coverage increased (+0.03%) to 53.19% when pulling b3a2c2b on MQE-2078-2 into a23844b on MQE-1704.

@KevinBKozan
Copy link
Contributor

QAing this, and I have found probable erroneous behavior:

<assertStringContainsString stepKey="1">
    <expectedResult type="string">helloworld</expectedResult>
    <actualResult type="string">hello</actualResult>
</assertStringContainsString>

Based on the above, I feel we should expect MFTF to look for hello in helloworld right? MFTF is generating this backwards:
image

@soumyau
Copy link
Contributor Author

soumyau commented Apr 15, 2020

QAing this, and I have found probable erroneous behavior:

<assertStringContainsString stepKey="1">
    <expectedResult type="string">helloworld</expectedResult>
    <actualResult type="string">hello</actualResult>
</assertStringContainsString>

Based on the above, I feel we should expect MFTF to look for hello in helloworld right? MFTF is generating this backwards:
image

Very interesting. So, this is the current behavior on develop as well. I thought we are considerexpectedResult to be the needle and actualResult to be the haystack. In the sense we are checking if expectedResult is a substring of actualResult. Is it the other way around?

…hanges

Added additional documentation for assertContains
@KevinBKozan KevinBKozan requested a review from dobooth April 15, 2020 18:26
@KevinBKozan
Copy link
Contributor

@soumyau I requested @dobooth due to doc updates, otherwise it's good to go

@soumyau soumyau merged commit 0d88dc5 into MQE-1704 Apr 17, 2020
soumyau added a commit that referenced this pull request Apr 17, 2020
* MQE-1704: MFTF Compatibility with PHPUnit 8
Upgraded PhpUnit + Codeception

* MQE-1704: MFTF Compatibility with PHPUnit 8
Added codeception modeule-* dependencies to fix functional tests

* MQE-1704: MFTF Compatibility with PHPUnit 8
fixed static checks

* MQE-1704: MFTF Compatibility with PHPUnit 8
Fixed phpmd error

* MQE-1704: MFTF Compatibility with PHPUnit 8
Removed pauseExecution to use pause

* MQE-1704: MFTF Compatibility with PHPUnit 8
Override switchToIFrame to include find by ID.

* MQE-2040: Unable to run suites from standalone MFTF
fixed static checks, fixed for MagentoAllureAdapter

* MQE-1704: MFTF Compatibility with PHPUnit 9
Updated to PHPUnit 9 and fixed unit tests

* MQE-1704: MFTF Compatibility with PHPUnit 9

remove PHP 7.2 support

* MQE-1704: MFTF Compatibility with PHPUnit 9
added Pause to MagentoWebDriver.php for step generation in console/allure

* MQE-2078: [PHPUnit 9] assertContains and assertNotContains breaking c… (#673)

* MQE-2078: [PHPUnit 9] assertContains and assertNotContains breaking changes
added new actions
assertStringContainsString
assertStringContainsStringIgnoringCase

* MQE-2078: [PHPUnit 9] assertContains and assertNotContains breaking changes

Added additional documentation for assertContains

* Grammar fixes

Co-authored-by: Donald Booth <dobooth@adobe.com>

Co-authored-by: Donald Booth <dobooth@adobe.com>
@soumyau soumyau deleted the MQE-2078-2 branch April 30, 2020 16:19
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.

4 participants