wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Extract minify from option function to prevent a bug with minify JS

Open CrochetFeve0251 opened this issue 2 years ago • 1 comments

Description

Fix a problem where minified JS where created and deleted right after creating 404 errors. To fix this the logic to delete minify JS has been moved to a Subcriber and removed from the rocket_after_save_options function.

Fixes #2973

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

Is the solution different from the one proposed during the grooming?

No, the solution was right

How Has This Been Tested?

  • [x] Automated tests
  • [x] Manually on local env

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

CrochetFeve0251 avatar Apr 08 '22 12:04 CrochetFeve0251

@Tabrisrp I saw some scenarios scripts in the issue from @Mai-Saad in pseudo code. Does you think that Behat and Gerkhin could be useful to communicate that kind of behavior and transform them into real tests?

CrochetFeve0251 avatar Apr 08 '22 12:04 CrochetFeve0251