storefront icon indicating copy to clipboard operation
storefront copied to clipboard

Use 'wp-scripts test-e2e' instead of directly calling jest

Open Aljullu opened this issue 2 years ago • 1 comments

Supersedes #1958 and it better aligns Storefront e2e tests with what we have in WC Blocks.

How to test the changes in this Pull Request:

  1. Make sure e2e tests pass in this PR.
  2. Optionally, run npm run test:e2e to verify they pass locally as well.

Aljullu avatar Jun 01 '22 13:06 Aljullu

looks good but wanted to confirm - do we still need after moving to wp-env the jest-puppeteer dependency and jest config on lines 63-71? https://github.com/woocommerce/storefront/blob/8b74758b402c5c6d32112e4134348c85c3fbf955/package.json#L63-L71

Yes, I think so. Because wp-scripts test-e2e internally calls Jest. At least, I couldn't get it to work when removing the config or jest-puppeteer.

Aljullu avatar Jun 02 '22 15:06 Aljullu

@Aljullu looks like the last activity on this PR was ~10 months ago. Is this still relevant?

I'd be happy to review it, if so. Otherwise I'll go ahead and close it out.

danielwrobert avatar Mar 18 '23 01:03 danielwrobert

@Aljullu looks like the last activity on this PR was ~10 months ago. Is this still relevant?

Ups, I completely forgot about it! While I don't think it's urgent, I do think it's worth merging it as it makes the Storefront e2e testing infrastructure closer to other projects like WC Blocks.

Aljullu avatar Mar 20 '23 17:03 Aljullu

While I don't think it's urgent, I do think it's worth merging it as it makes the Storefront e2e testing infrastructure closer to other projects like WC Blocks.

No worries, I'll add it to my list to review today or tomorrow!

danielwrobert avatar Mar 22 '23 20:03 danielwrobert

Everything tests as described here all tests in this suite are passing locally. It looks like come ESLint checks are failing, however. I tried to re-run them and see if they'd pass but that didn't seem to help.

danielwrobert avatar Mar 23 '23 18:03 danielwrobert

Everything tests as described here all tests in this suite are passing locally. It looks like come ESLint checks are failing, however. I tried to re-run them and see if they'd pass but that didn't seem to help.

Right... they don't seem to be introduced by this PR, though. So not sure if this should block merging or not. :thinking:

Aljullu avatar Mar 24 '23 10:03 Aljullu

perhaps a rebase will get them sorted out?

This branch is already up-to-date. Honestly, I'm not sure why those jobs are passing in other PRs because the fails seem legit.

In any case, I will go ahead and merge this PR as-is. We can work on the failing jobs in follow-ups.

Aljullu avatar Mar 28 '23 17:03 Aljullu