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

Core components list handling fixes #381

Merged
merged 6 commits into from
Oct 8, 2019

Conversation

kaczymuczy
Copy link

@kaczymuczy kaczymuczy commented Sep 18, 2019

Description

This PR enables Bobcat to handle the List from Core Components and is required for it's BB tests to work wttech/bobcat-aem-tests#7 for #373

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code styleguide of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

public class DefaultMultifield implements Multifield {

@FindBy(css = "button.coral3-Button.coral3-Button--secondary")
@FindBy(css = "* button[coral-multifield-add]")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a star selector here?

By.cssSelector(".foundation-picker-buttonlist.coral3-Overlay.is-open")));
label.get(0).click();
bobcatWait.until(elementToBeClickable(firstResult));
firstResult.click();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can chain these two.

Copy link
Contributor

@mkrzyzanowski mkrzyzanowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cosmetic changes :)

@PageObject(css = Locators.AUTOCOMPLETE_CSS)
public class DefaultTagBrowser implements TagBrowser {

@FindBy(className = "coral3-Textfield")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the css locator strategy here - it will be more consistent


@Override
public void setValue(Object value) {
List<String> tags = new ArrayList<>(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap in new ArrayList<>() is unnecessary here

@mkrzyzanowski mkrzyzanowski merged commit b0ac411 into master Oct 8, 2019
@mkrzyzanowski mkrzyzanowski deleted the core-components-list-handling-fixes branch October 8, 2019 10:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants