-
Notifications
You must be signed in to change notification settings - Fork 132
#55 Throw Exception when cannot resolve URL attribute #546
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
#55 Throw Exception when cannot resolve URL attribute #546
Conversation
@lbajsarowicz Thank you for your contribution! I've created an internal issue to track progress on revieweing this, I'll keep you updated with comments here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super small change around readability, otherwise initial review of changes look good.
Since this has gone from a log line to an exception, I need to make sure that this does not cause exceptions in the entire magento mftf test codebase before introducing it.
src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php
Outdated
Show resolved
Hide resolved
Hey @lbajsarowicz, I'm seeing errors on Good news is that we're planning on releasing a Does that sound fair? |
Yes, it's fine. Tag this as release line 3.0 |
…url-attribute # Conflicts: # src/Magento/FunctionalTestingFramework/Test/Objects/ActionObject.php
After merging this PR, we were unable to generate tests due to a We agreed to revert it so that we can have green builds on our 3.0.0 branches. We will look further into this asap. TLDR: I'm reverting this. |
Revert "Merge pull request #546 from lbajsarowicz/bugfix/55-missing-url-attribute"
@tomreece Could you provide more details? |
@lbajsarowicz with your change in place we were receiving this error during test generation:
I tried to fix this by fixing the action groups that were not passing an argument to the page, but no matter what I tried to pass to the page url, it would not generate. |
@tomreece I have 2 - 3 huge architectural changes to Magento ongoing and 2 huge tasks as a job. When I finish them, I'd love to take a look into that. |
We also were a bit confused by another thing... It looks like you try to detect when arguments were expected but not passed in to a page url. You implemented some logic/regex to check this. But we already detect this by setting I have open a PR where I try to accomplish what we mentioned in issue #55 -- Can you help me understand what your PR does different compared to the one above? I feel that my PR accomplishes the original ask with much less changes. |
@tomreece I haven't changed logic, just extracted your Regexes to separate method, to improve the readability. I'm currently on a train, but later will have a chance to review the changes again and explain you why it fails.
was extracted into:
|
@tomreece Still cannot reproduce the issue With my code merged to the latest |
@lbajsarowicz I'm not sure what to suggest then. It did not generate tests for me locally nor on our Jenkins build server. Regardless, we already check for required parameters at this line: We did not want another implementation of this in a different object. |
Let's skip that for now. |
Description
As an answer to the issue reported by @okolesnyk I went step further with reporting the issue of missing replacements to URL:

Before my change, MFTF tried to open...

{{AdminLoginPage}}
without replacing the URL 🤦♂️Testing
app/code/Magento/Backend/Test/Mftf/ActionGroup/LoginAsAdminActionGroup.xml
) replacingurl="{{AdminLoginPage.url}}"
withurl="{{AdminLoginPage}}"
Fixed Issues (if relevant)
.url
attribute for amOnPage #55Contribution checklist