imagify-plugin icon indicating copy to clipboard operation
imagify-plugin copied to clipboard

Add Unit Test to Imagify

Open Khadreal opened this issue 10 months ago • 6 comments

Unit tests are absent for this PR: https://github.com/wp-media/imagify-plugin/pull/878. To avoid delaying the PR for 2.2.2, I'm creating this note so we can keep track of it.

Khadreal avatar Apr 18 '24 16:04 Khadreal

@Khadreal would it be possible to create integration tests for the Pr instead of unit tests?

CrochetFeve0251 avatar Apr 18 '24 20:04 CrochetFeve0251

Add to that, we need to add the VFS support to our tests like what we do in WP Rocket, check my comment here:

https://github.com/wp-media/imagify-plugin/pull/877#issuecomment-2066283005

wordpressfan avatar Apr 19 '24 10:04 wordpressfan

After discussing with @wordpressfan, it could be a good opportunity to combine this with WP Launchpad: instead of copy/pasting files between repositories, we could have a common library for all this, so that we have the same test framework on all our plugins. So, to tackle this issue, it would be good to discuss with @CrochetFeve0251 to get up to speed on WP Launchpad and see how we could:

  • make Imagify benefit from testing capabilities currently on WP Rocket
  • preparing those features to be implemented in WP Launchpad (or putting them there directly)
  • preparing Imagify to benefin from WP Launchpad

MathieuLamiot avatar May 02 '24 13:05 MathieuLamiot

@wordpressfan @CrochetFeve0251 Do you have an update on the targeted approach here? Thanks

MathieuLamiot avatar May 13 '24 11:05 MathieuLamiot

I met last Friday with @CrochetFeve0251 and @Tabrisrp to talk about this and we have like a plan of moving some parts of code from WPR to wp-media/phpunit repository so we can use this package across all of our plugins.

@CrochetFeve0251 can u plz share the points that we discussed so we all are aligned.

wordpressfan avatar May 13 '24 12:05 wordpressfan

@wordpressfan I created an issue on the related repository: https://github.com/wp-media/phpunit/issues/30

CrochetFeve0251 avatar May 13 '24 12:05 CrochetFeve0251