playground-tools icon indicating copy to clipboard operation
playground-tools copied to clipboard

WP-NOW: add plugin update tests

Open sejas opened this issue 1 year ago • 0 comments

  • Related: https://github.com/WordPress/playground-tools/issues/178

[!NOTE] We won't merge this PR until the plugin update error is fixed

What?

Add tests to validate the WordPress Plugin Update flow.

Why?

Currently that flow fails and after fixing the underlaying error, these tests will confirm it works.

How?

It uses WordPress functions to trigger a plugin update.

Testing Instructions

Run:

  • nvm use
  • npm install
  • npx nx run wp-now:test

Manual testing

This test introduces an automatic verification of the plugin update.

Here is a screencast of the manual testing where it fails:

https://github.com/WordPress/playground-tools/assets/779993/5eb2c2ab-29f4-4c72-a217-5535dda1be27

You can observe that after updating the plugin, the folder is "removed": The filesystem returns that the folder and its files does not exist. While php function $wp_filesystem->exists returns true for the folder and its files.

sejas avatar May 17 '24 09:05 sejas