use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method testGetDropdownByTextNonsense.
@Test(expected = SystemException.class)
public void testGetDropdownByTextNonsense() {
SeleniumWMultiDropdownWebElement component = getByLabel(WMultiDropdownTestingExample.LABEL_SOME_SELECTED);
String notInThisWorld = StringUtils.join(WMultiDropdownTestingExample.DATA_SOME_SELECTED, " ");
component.getDropdown(notInThisWorld);
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method testGetDropdownsReadOnly.
@Test(expected = SystemException.class)
public void testGetDropdownsReadOnly() {
SeleniumWMultiDropdownWebElement component = getByLabel(WMultiDropdownTestingExample.LABEL_RO_ONE_SELECTED);
component.getDropdowns();
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method testGetDropdownByIdxReadOnly.
@Test(expected = SystemException.class)
public void testGetDropdownByIdxReadOnly() {
SeleniumWMultiDropdownWebElement component = getByLabel(WMultiDropdownTestingExample.LABEL_RO_SOME_SELECTED);
component.getDropdown(0);
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method getOptionsHelper.
/**
* Helper for getOptions tests for read-only components.
* @param component the component to test
* @param expected the list of strings we expect to be selected
*/
private void getOptionsHelper(final SeleniumWMultiDropdownWebElement component, final List expected) {
List<WebElement> options = component.getOptions();
Assert.assertEquals(expected.size(), options.size());
for (WebElement option : options) {
Assert.assertTrue(expected.contains(option.getText()));
}
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method getOptionsHelper.
/**
* Helper for getOptions tests.
* @param component the SeleniumWMultiDropdownWebElement to test
*/
private void getOptionsHelper(final SeleniumWMultiDropdownWebElement component) {
List<WebElement> options = component.getOptions();
Assert.assertEquals(WMultiDropdownTestingExample.DATA_LIST.size(), options.size());
for (WebElement option : options) {
Assert.assertTrue(WMultiDropdownTestingExample.DATA_LIST.contains(option.getText()));
}
}
Aggregations