-
Notifications
You must be signed in to change notification settings - Fork 132
#389 Fix invalid bahaviour of MAGENTO_BACKEND_BASE_URL #547
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
#389 Fix invalid bahaviour of MAGENTO_BACKEND_BASE_URL #547
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. |
@lbajsarowicz Can you share the issue you had that motivated you to make the fix? Because recently we had investigated around MAGENTO_BASE_URL, MAGENTO_BACKEND_BASE_URL and MAGENTO_BACKEND_NAME, and MFTF should be able to construct Magento backend url correctly. |
@lbajsarowicz I just noticed that you are trying to fix issue #389
|
Even with the right configuration - most of the tests arund Magento Admin Panel were failing. I found out that the MAGENTO_BACKEND_BASE_URL was incorrectly implemented - especially with
Looks like I forgot to cover it. Working on it already
What actually? |
Module Resolver refactored, too... |
After changes to Module Resolver, the API Key request does not work properly. I'm investigating that. |
@jilu1 Calling you for review. |
@okolesnyk / @jilu1 Any updates? |
There's nothing about to happen regarding that. |
@jilu1 @soumyau please review original issue and check with @lbajsarowicz the fix in this pull request. |
@lbajsarowicz can you resolve conflicts on this branch, so that I can test this out on builds/ configurations? |
EDIT: I haven't managed time during the night, I'll do that another night. |
@lbajsarowicz since this is configuration related bug-fix, we intend to roll this out for both 2.x and 3.x releases. Can I also request you to create another pull request as a patch to 2.x (last patch release being |
Hey @lbajsarowicz Thank you |
Please test it very thoroughly, as I was working on this at the very beginning of the year. Now we have almost July, so some things have changed :-) |
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.
Changes look good. Got a green build for 2.3-develop for default configuration ( storefront and admin on same domain). Internal pipeline doesn't support different domain configuration, so couldn't run all tests.
On running a few tests locally with different domain and backend name configuration, found that we have many *Page.xml where url is defined, probably incorrectly.
eg: In AdminShipmentNewPage, url has value order_shipment/new/order_id/
The test failed with this error -
Step See in current url "http://magentoadmin.local/backend/order_shipment/new/order_id/" Fail Failed asserting that 'http://magentoadmin.local/backend/admin/order_shipment/new/order_id/1/' contains "http://magentoadmin.local/backend/order_shipment/new/order_id/".
The right value, in this case should have been admin/order_shipment/new/order_id/
.
Someone using a different MAGENTO_BACKEND_NAME
to run existing magento tests, may end up with many test failures.
Many magento admin pages have this format as URL:
MAGENTO_BASE_URL/MAGENTO_BACKEND_NAME/admin/rest_of_the_path
.
So for amOnPage
and seeInCurrentUrl
, the argument passed should include admin/rest_of_path
in such cases.
@okolesnyk should the page urls be rectified along with the roll out of this fix, or can they be delivered separately?
UR build (with custom MAGENTO_BACKEND_NAME value): https://m2build-ur.devops.magento.com/job/All-User-Requested-Tests/34043/
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.
Approved! Discussed with team, test fixes will be done in scope of https://jira.corp.magento.com/browse/MQE-1801
@lbajsarowicz good work! You can now proceed creating a PR to develop
I'll provide that for |
@lbajsarowicz any updates on your PR to |
Description
Finally - for
admin
area I've changed the method fromamOnPage
toamOnUrl
. This solution works like a charm. Also introduced the single class to provide proper URL, as it was done inconsistently across the applicationFixed Issues (if relevant)
Contribution checklist