public static final int KEYCODE_HIDE = KeyCodes.KEY_ESCAPE;
private static final String ERROR_CLASS_NAME = "error";
+ private static final String NOT_EDITABLE_CLASS_NAME = "not-editable";
protected enum State {
INACTIVE, ACTIVATING, BINDING, ACTIVE, SAVING
columnToWidget.put(column, editor);
attachWidget(editor, cell);
}
+ } else {
+ cell.addClassName(NOT_EDITABLE_CLASS_NAME);
}
}
selectMenuPath(EDIT_ITEM_5);
assertEditorOpen();
+ GridEditorElement editor = getGridElement().getEditor();
assertFalse("Uneditable column should not have an editor widget",
- getGridElement().getEditor().isEditable(3));
+ editor.isEditable(3));
+ assertEquals(
+ "Not editable cell did not contain correct classname",
+ "not-editable",
+ editor.findElement(By.className("v-grid-editor-cells"))
+ .findElements(By.xpath("./div")).get(3)
+ .getAttribute("class"));
+
}
private WebElement getSaveButton() {