eventespresso / barista

Javascript modules & tools for Event Espresso development
GNU General Public License v3.0
5 stars 1 forks source link

Regression from PR 1277 #1281

Closed alexkuc closed 4 months ago

alexkuc commented 9 months ago

⚠️ until Cafe PR is merged, as a workaround, you can run e2e tests on demand against specific branches #1286 ⚠️


After fixing catastrophic bug in E2E tests for Barista repo (https://github.com/eventespresso/actions/pull/57) it was revealed that PR #1277 has introduced regression. The scope of this issue and subsequent PR is to resolve bugs and restore E2E tests to a passable state.


TODOs

alexkuc commented 8 months ago

It looks like the actual datetime is missing the required fields as there is an error saying missing properties (for the fields introduced by PR #1277)

alexkuc commented 8 months ago

In regards to actual data, these fields do exist:

https://github.com/eventespresso/cafe/blob/c3631a5fb1fe8e8a17a47ee0e5d071a555f13b59/plugins/event-espresso-core/core/domain/services/graphql/types/Event.php#L114-L119

https://github.com/eventespresso/cafe/blob/c3631a5fb1fe8e8a17a47ee0e5d071a555f13b59/plugins/event-espresso-core/core/domain/services/graphql/types/Event.php#L132-L137

Not sure about field status though 🤔

alexkuc commented 8 months ago

Gonna run quick check against Apollo client to confirm the data is actually coming from Cafe with the correct fields

alexkuc commented 8 months ago

Coping comment from actions repository

🚧 Regression detected in Barista repository❗

Currently working on pinpointing which PR has caused the regression…

E2E Outcome PR Git Commit
https://github.com/eventespresso/barista/pull/1277 97408d93
https://github.com/eventespresso/barista/pull/1275 88527b6a

Edit: make sure to run yarn build before starting E2E tests after checking out aforementioned PRs

alexkuc commented 8 months ago

Will proceed to first investigate the data coming from the server then will check GraphQL queries in the frontend code.

alexkuc commented 8 months ago

As I had some issues with Apollo Client DevTools, I added up inspecting variable eventEspressoData which revealed that fields isPostponed and isCancelled are in fact missing. Field status is present so all good there.

alexkuc commented 8 months ago

Maybe fix is required from Cafe's end since variable eventEspressoData is supplied by Cafe repository

alexkuc commented 8 months ago

Closer inspection of Cafe repository reveals that fields isPostponed and isCancelled exist only for entity Event but not for entity Datetimes

alexkuc commented 8 months ago

Adding those fields to GraphQL fixed the fatal issue with frontend code but now datetimes and tickets are missing i.e. gone no results found even without filters. Investigating...

alexkuc commented 8 months ago

As per PR's #1277 initial comment, branch NEW/CORE/datetime-status is required from the Cafe repository.

alexkuc commented 8 months ago

Currently checking if merging https://github.com/eventespresso/cafe/pull/978 will enough to resolve bugs for E2E in Barista repository

alexkuc commented 8 months ago

Test fails because tooltip was changed from open event datetime main menu to event datetime main menu. Investigating.

alexkuc commented 8 months ago

Everything is good with the label and the tooltip. The issue comes from #1277 as the newly created datetime has now status TBD or To Be Determined.

alexkuc commented 8 months ago

Fix looks simple - need to set datetime status to Calendar controlled.

Edit: instead, removed filter

alexkuc commented 8 months ago

This issue will be fixed by 2 PRs:

alexkuc commented 5 months ago

After discussion with @tn3rb on Slack, I'll change the default branch for Cafe from DEV to NEW/CORE/datetime-status. After the affecting Cafe PR is merged, the branch can be changed back to DEV.

alexkuc commented 4 months ago

PR #1277 was removed from branch master hence this is no longer applies