jwplayer / ott-web-app

Reference implementation for JWP-powered apps
Apache License 2.0
70 stars 52 forks source link

Test: add already subscribed/canceled check #494

Closed ChristiaanScheermeijer closed 5 months ago

ChristiaanScheermeijer commented 5 months ago

Description

Sometimes, the e2e tests fail due to a timeout on the waiting for subscription step. When this test retries, it often happens that the subscription is active.

I've added a simple check to skip the subscribe steps and only validate when the subscription is already active.

The same applies to the cancel subscription step.

My only worry is what if something didn't work as expected. Like a failure in the subscribe flow, but the subscription still ends up being active.

Edit

I forgot to mention that I split the subscription and payment tests to make the test more efficient running with workers because workers run a single test file.

github-actions[bot] commented 5 months ago

Visit the preview URL for this PR (updated for commit 0f5bae5):

https://ottwebapp--pr494-fix-e2e-flaky-subscr-gu2em2r7.web.app

(expires Wed, 22 May 2024 08:57:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c198f8a3a199ba8747819f7f1e45cf602b777529

AntonLantukh commented 5 months ago

@ChristiaanScheermeijer I see you wanted to split them to increase the efficiency, but it still looks to me that semantically they are part of the same file. The difference I see is that one is about "actions" with subscriptions, the other one is about seeing the list of options. Any naming ideas? Like "offers" and "management" while changing the folder name to "subscriptions"?