Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

AEM BDD Test case fails while doing component configuration #415

Open
gkravi opened this issue Jan 27, 2020 · 0 comments
Open

AEM BDD Test case fails while doing component configuration #415

gkravi opened this issue Jan 27, 2020 · 0 comments

Comments

@gkravi
Copy link

gkravi commented Jan 27, 2020

Environment

Bobcat version: 2.1.0

Bobcat modules used:

  • bb-core 2.1.0
  • bb-aem-core 2.1.0
  • bb-aem-64 2.1.0
  • bb-cumber 1.4.0
  • io.cucumber:cucumber-java 4.8.0
  • io.cucumber:cucumber-java8 4.8.0
  • io.cucumber:cucumber-guice 4.8.0
  • junit 4.4

Browser + version: Chrome 79.0.3945.130

Git code repo: link

Expected Behavior

The test case needs to update the text and title component from the yaml file.

Actual Behavior

Test case not able to update the component configuration.
And getting exception:
`When i am running the feature file below snippet for title and text component:

@and("^I configure the Title component Title field to be Test Page Title")
public void I_configure_the_title_component() throws ActionException {
controller.execute(AemActions.CONFIGURE_COMPONENT,
new ConfigureComponentData("container", "Title", 0,
new ResourceFileLocation("title.yaml")));
} `

Exception:
`I am getting error while bobcat tries to edit the component step, the error log below:

For title test case:

When I open the test title page # TitleFeatureSteps.I_open_the_test_page(String)

And I configure the Title component Title field to be Test Page Title # TitleFeatureSteps.I_configure_the_title_component()
  java.lang.IllegalStateException: YAML file could not be read
at com.cognifide.qa.bb.utils.YamlReader.readFromTestResources(YamlReader.java:93)
at com.cognifide.qa.bb.aem.core.component.configuration.ComponentConfigResourceFileReader.readConfiguration(ComponentConfigResourceFileReader.java:45)
at com.cognifide.qa.bb.aem.core.component.configuration.ComponentConfigResourceFileReader.readConfiguration(ComponentConfigResourceFileReader.java:34)
at com.cognifide.qa.bb.aem.core.component.actions.ConfigureComponent.execute(ConfigureComponent.java:64)
at com.cognifide.qa.bb.frame.FrameAspect.switchFrameAndProceed(FrameAspect.java:70)
at com.cognifide.qa.bb.frame.FrameAspect.invoke(FrameAspect.java:58)
at com.cognifide.qa.bb.aem.core.component.actions.ConfigureComponent.execute(ConfigureComponent.java:40)
at com.cognifide.qa.bb.api.actions.internal.DefaultController.execute(DefaultController.java:55)
at com.honeywell.honeywell.steps.TitleFeatureSteps.I_configure_the_title_component(TitleFeatureSteps.java:75)
at ?.I configure the Title component Title field to be Test Page Title(file:src/test/resources/features/title.feature:8)

Caused by: com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: UNKNOWN; line: 1, column: 1]`

`For text component:

java.lang.NullPointerException
at com.cognifide.qa.bb.aem.core.component.dialog.DialogFieldRetrieverImpl.getFields(DialogFieldRetrieverImpl.java:95)
at com.cognifide.qa.bb.aem.core.component.dialog.DialogFieldRetrieverImpl.getDialogField(DialogFieldRetrieverImpl.java:68)
at com.cognifide.qa.bb.aem.core.component.dialog.ConfigDialogImpl.lambda$setFields$4(ConfigDialogImpl.java:208)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
at com.cognifide.qa.bb.aem.core.component.dialog.ConfigDialogImpl.setFields(ConfigDialogImpl.java:207)
at com.cognifide.qa.bb.aem.core.component.dialog.ConfigDialogImpl.lambda$configure$3(ConfigDialogImpl.java:201)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
at com.cognifide.qa.bb.aem.core.component.dialog.ConfigDialogImpl.configure(ConfigDialogImpl.java:199)
at com.cognifide.qa.bb.aem.core.component.dialog.ConfigDialogImpl.configureWith(ConfigDialogImpl.java:133)
at com.cognifide.qa.bb.frame.FrameAspect.switchFrameAndProceed(FrameAspect.java:70)
at com.cognifide.qa.bb.frame.FrameAspect.invoke(FrameAspect.java:58)
at com.cognifide.qa.bb.aem.core.component.actions.ConfigureComponent.execute(ConfigureComponent.java:65)
at com.cognifide.qa.bb.frame.FrameAspect.switchFrameAndProceed(FrameAspect.java:70)
at com.cognifide.qa.bb.frame.FrameAspect.invoke(FrameAspect.java:58)
at com.cognifide.qa.bb.aem.core.component.actions.ConfigureComponent.execute(ConfigureComponent.java:40)
at com.cognifide.qa.bb.api.actions.internal.DefaultController.execute(DefaultController.java:55)
at com.honeywell.honeywell.steps.TextFeatureSteps.I_configure_the_title_component(TextFeatureSteps.java:74)
at ?.I configure the Text component text field to be Test Page Text(file:src/test/resources/features/text.feature:8)`

Please help me as i am stuck in this for quite some time.

Thanks!
Ravi

Steps to reproduce

Git repo for code to reproduce the issue:
Git link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant