adobe / aem-guides-wknd

Tutorial Code companion for Getting Started Developing with AEM Sites WKND Tutorial
https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-develop/overview.html
MIT License
288 stars 569 forks source link

GraphQlIT tests are too strict #431

Closed gknobloch closed 1 year ago

gknobloch commented 1 year ago

Expected Behaviour

Tests should be stable and not depend too much on content.

Actual Behaviour

GraphQlIT tests are too flaky: as long as you add a persisted query, an adventure, etc. - since the check is on an exact number of results, they would easily fail if someone modifies them on the AEM cloud instance.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

AEM Cloud Service

Sample Code that illustrates the problem

Logs taken while reproducing problem

[ERROR] Failures: 
[ERROR]   GraphQlIT.testPersistedQuery:188 expected:<16> but was:<32>
[ERROR]   GraphQlIT.testQuery:105 expected:<7> but was:<14>
[ERROR]   GraphQlIT.testQueryWithParameters:172 expected:<1> but was:<2>