@Component
public class AGStepDefinitions
extends java.lang.Object
Constructor and Description |
---|
AGStepDefinitions() |
Modifier and Type | Method and Description |
---|---|
void |
autoselectPostcode(java.lang.String alias,
java.lang.String postcode)
The postcode suggestion box is a pain in the ass.
|
void |
clickElementWithDatepicker(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String attributeValueAlias,
java.lang.String attributeValue,
java.lang.String exists)
Clicks an element on the page of the datepicker.
|
@When(value="I autoselect the post code of( alias)? \"([^\"]*)\"") public void autoselectPostcode(java.lang.String alias, java.lang.String postcode)
So, to work around this, we use a utility method from the branding project in jquery.address.js to set the value of the post code.
postcode
- The postcode to enter into the suburb text boxalias
- Include this text if the value to be added to the postcode box is an alias@When(value="^I click (?:a|the) datepicker with (?:a|an|the) attribute( alias)? of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\"( if it exists)?$") public void clickElementWithDatepicker(java.lang.String attributeNameAlias, java.lang.String attributeName, java.lang.String attributeValueAlias, java.lang.String attributeValue, java.lang.String exists)
attributeNameAlias
- If this word is found in the step, it means the attributeName is found from
the data set.attributeName
- The name of the attribute to match.attributeValueAlias
- If this word is found in the step, it means the attributeValue is found from
the data set.attributeValue
- The value of the attribute to match - Currently supported values are today
and tomorrow only.exists
- If this text is set, an error that would be thrown because the element was
not found is ignored. Essentially setting this text makes this an optional
statement.