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
285 stars 548 forks source link

Integration Tests Failure - GraphQLIT.java #349

Closed godanny86 closed 1 year ago

godanny86 commented 2 years ago

Expected Behaviour

Integration tests in it.tests should run successfully.

Actual Behaviour

Integration tests fail:

[ERROR] Tests run: 6, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.486 s <<< FAILURE! - in com.adobe.aem.guides.wknd.it.tests.GraphQlIT
[ERROR] testQuery(com.adobe.aem.guides.wknd.it.tests.GraphQlIT)  Time elapsed: 0.087 s  <<< ERROR!
com.adobe.aem.graphql.client.AEMHeadlessClientException: GraphQL Response has error(s): Validation error of type FieldUndefined: Field 'author' in type 'ArticleModel' is undefined @ 'articleList/items/author'
        at com.adobe.aem.guides.wknd.it.tests.GraphQlIT.testQuery(GraphQlIT.java:80)

[ERROR] testQueryWithParameters(com.adobe.aem.guides.wknd.it.tests.GraphQlIT)  Time elapsed: 0.038 s  <<< ERROR!
com.adobe.aem.graphql.client.AEMHeadlessClientException: GraphQL Response has error(s): Validation error of type WrongType: argument 'filter' with value 'ObjectValue{objectFields=[ObjectField{name='author', value=ObjectValue{objectFields=[ObjectField{name='_expressions', value=ArrayValue{values=[ObjectValue{objectFields=[ObjectField{name='value', value=VariableReference{name='author'}}]}]}}]}}]}' contains a field not in 'ArticleModelFilter': 'author' @ 'articleList', Validation error of type FieldUndefined: Field 'author' in type 'ArticleModel' is undefined @ 'articleList/items/author'
        at com.adobe.aem.guides.wknd.it.tests.GraphQlIT.testQueryWithParameters(GraphQlIT.java:134)

Reproduce Scenario (including but not limited to)

Can be reproduced on local and in Stage/Prod environments.

Steps to Reproduce

Run the integration tests locally or in the cloud.

Platform and Version

Cloud and Local

Sample Code that illustrates the problem

Issue is that the Content Fragment Models have been modified with PR #348