Skip to content
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

Fix #28011 - remove page number from query on layered navigation swatch filter #28015

Conversation

Bartlomiejsz
Copy link
Contributor

@Bartlomiejsz Bartlomiejsz commented Apr 28, 2020

Description (*)

This change makes swatch layered navigation filter consistent with standard filters, by removing p query parameter from filter url in same way as in https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Catalog/Model/Layer/Filter/Item.php
Fixes #28011

Related Pull Requests

Fixed Issues (if relevant)

  1. ElasticSearch When applying the extra filter to the product listing, Magento keeps the same page number #28011: ElasticSearch When applying the extra filter to the product listing, Magento keeps the same page number

Manual testing scenarios (*)

  1. Have at least one swatch filter on layered navigation and multiple pages of products
  2. Go to last page on PLP
  3. Use swatch attribute as filter
  4. p parameter should be removed from url and user should see first page, same as when non-swatch attribute is used as filter

Questions or comments

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/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 28, 2020

Hi @Bartlomiejsz. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ghost ghost assigned lbajsarowicz Apr 28, 2020
lbajsarowicz
lbajsarowicz previously approved these changes Apr 28, 2020
Copy link
Contributor

@lbajsarowicz lbajsarowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it's an adaptation of another bugfix (made to another part of the system), I am approving that.
Thanks for cleaning up the code style there.

@magento-engcom-team
Copy link
Contributor

Hi @lbajsarowicz, thank you for the review.
ENGCOM-7493 has been created to process this Pull Request
✳️ @lbajsarowicz, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Bartlomiejsz,
Could you fix the failing static tests and cover your change with any type of test? I see you already adjusted unit tests, but I can't see any change related to the bug itself.

@ghost ghost assigned ihor-sviziev Apr 28, 2020
@ghost ghost dismissed lbajsarowicz’s stale review April 28, 2020 12:11

Pull Request state was updated. Re-review required.

@ihor-sviziev ihor-sviziev added Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests Award: bug fix labels Apr 28, 2020
@ghost ghost added the Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. label Apr 28, 2020
@Bartlomiejsz
Copy link
Contributor Author

Hi @ihor-sviziev, indeed I only did minor adjustments to unit test because otherwise it would fail due to new dependency injected. I didn't add new unit test since this whole test file will either need to be reworked or removed for phpunit 9 because it tests mock and not real class which I think won't work anymore.
I will try to cover this change with functional test

@ghost ghost added the Priority: P3 May be fixed according to the position in the backlog. label Apr 29, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@engcom-Charlie
Copy link
Contributor

Failed functional test not related to changes from this PR.

@VladimirZaets VladimirZaets added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label May 19, 2020
@engcom-Alfa engcom-Alfa added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Jun 9, 2020
magento-engcom-team pushed a commit that referenced this pull request Jun 9, 2020
@magento-engcom-team magento-engcom-team merged commit fcdcc0e into magento:2.4-develop Jun 9, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 9, 2020

Hi @Bartlomiejsz, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@Bartlomiejsz Bartlomiejsz deleted the feature/fix_28011_page_number_on_swatch_layered_nav_filter branch August 25, 2020 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Award: test coverage Component: Catalog Component: Swatches Partner: Fast White Cat partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
9 participants