-
Notifications
You must be signed in to change notification settings - Fork 37
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
Refactor luma tests #48
base: main
Are you sure you want to change the base?
Conversation
@vladhorielov could you do a review on this? Since we're not doing Luma anymore, I have no project to test this on. |
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.
I checked the tests, below is a list of tests that do not work now
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.
@peterjaap
cypress/integration/luma/cart/cart.spec.js - does not work
cypress/integration/luma/products/category.spec.js - does not work
cypress/integration/luma/products/product.spec.js - does not work
cypress/integration/luma/checkout/checkout.spec.js - does not work
cypress/integration/luma/search/product-searches.spec.js - does not work
cypress/integration/luma/user/account.spec.js - does not work
Almost all tests stopped working
@vladhorielov How are you running these? Against a default Magento luma installation with test data? What fails? They work perfectly fine in the instance I tested them in but that's one with a few customizations here and there. |
I ran on a default Magento 2 Luma with a simple date. I have problem with some selectors and cy.intercept/cy.wait |
@vladhorielov how is this review going? @kolaente have you looked at Vlad's results yet? |
@peterjaap I've looked into it briefly but didn't had the time yet to properly fix this. I hope to get to that next week. |
I think most of the tests should work now - only the account tests needs further testing. |
@kolaente @peterjaap The cart test fails at the coupon code generation stage. I don't think it's right to create code via rest api, as it requires additional steps for testing (create a token and additional logic for the request), what do you think? I think it's better to leave the standard code "H20" for this product "affirm-water-bottle.html" Category test not working The checkout test does not work, we also use € as the currency, although the default should be $ Account test still not working |
I initially added the create random coupon step because we didn't have a usable coupon in our test dump and I'd have to create one anyway via the api. Might as well do it directly in the test.
You mean the test should work in a store with $? |
yes |
it doesn't work everywhere, i think we need use another way for testing this, the default code "H20" for this product "affirm-water-bottle.html" doesn't work for you ? |
Any work being done on this still @vladhorielov @kolaente ? |
@peterjaap nope from my side. I was just a code reviewer, but it doesn't work for me. |
@peterjaap currently not. |
This PR refactors luma tests, mainly by adding
cy.intercept
to get rid of calls tocy.wait
with a fixed number of seconds. There are still a few of those in there but I think this already improves the reliability of the tests.The PR also uses the methods introduced in #47 to assert for success and error messages.
The things changed and fixed in this PR are mostly those I noticed while implementing the cypress test suite for a luma based shop. I've also added a few test cases from our MFTF-based testing suite (which we're going to retire very soon, thanks to Cypress!) which may be useful to others.
Each area of changes is in a separate commit, I could also split this PR into multiple smaller ones if that makes it easier to review.