use of com.haulmont.cuba.gui.sys.TestIdManager in project cuba by cuba-platform.
the class WindowBreadCrumbs method componentAttachedToUI.
protected void componentAttachedToUI() {
adjustParentStyles();
if (ui.isTestMode()) {
linksLayout.setCubaId("breadCrumbs");
if (closeBtn != null) {
closeBtn.setCubaId("closeBtn");
}
}
if (ui.isPerformanceTestMode()) {
TestIdManager testIdManager = ui.getTestIdManager();
linksLayout.setId(testIdManager.getTestId("breadCrumbs"));
if (closeBtn != null) {
closeBtn.setId(testIdManager.getTestId("closeBtn"));
}
}
}
use of com.haulmont.cuba.gui.sys.TestIdManager in project cuba by cuba-platform.
the class WebFieldGroup method assignDebugId.
protected void assignDebugId(FieldConfig fc, com.vaadin.ui.Component composition) {
AppUI ui = AppUI.getCurrent();
if (ui == null) {
return;
}
String debugId = getDebugId();
if (ui.isTestMode()) {
if (composition != null) {
composition.setCubaId(fc.getId());
}
}
if (ui.isPerformanceTestMode()) {
if (composition != null && debugId != null) {
TestIdManager testIdManager = ui.getTestIdManager();
composition.setId(testIdManager.getTestId(debugId + "_" + fc.getId()));
}
}
}
use of com.haulmont.cuba.gui.sys.TestIdManager in project cuba by cuba-platform.
the class WebAccordion method setDebugId.
@Override
public void setDebugId(String id) {
super.setDebugId(id);
String debugId = getDebugId();
AppUI ui = AppUI.getCurrent();
if (debugId != null && ui != null) {
TestIdManager testIdManager = ui.getTestIdManager();
for (Map.Entry<com.vaadin.ui.Component, ComponentDescriptor> tabEntry : tabMapping.entrySet()) {
com.vaadin.ui.Component tabComponent = tabEntry.getKey();
com.vaadin.ui.Accordion.Tab tab = component.getTab(tabComponent);
ComponentDescriptor componentDescriptor = tabEntry.getValue();
String name = componentDescriptor.name;
component.setTestId(tab, testIdManager.getTestId(debugId + "." + name));
}
}
}
use of com.haulmont.cuba.gui.sys.TestIdManager in project cuba by cuba-platform.
the class WebDateField method setDebugId.
@Override
public void setDebugId(String id) {
super.setDebugId(id);
if (id != null) {
TestIdManager testIdManager = AppUI.getCurrent().getTestIdManager();
timeField.setId(testIdManager.getTestId(id + "_time"));
dateField.setId(testIdManager.getTestId(id + "_date"));
}
}
use of com.haulmont.cuba.gui.sys.TestIdManager in project cuba by cuba-platform.
the class WebTabSheet method setDebugId.
@Override
public void setDebugId(String id) {
super.setDebugId(id);
String debugId = getDebugId();
if (debugId != null) {
TestIdManager testIdManager = AppUI.getCurrent().getTestIdManager();
for (Map.Entry<com.vaadin.ui.Component, ComponentDescriptor> tabEntry : tabMapping.entrySet()) {
com.vaadin.ui.Component tabComponent = tabEntry.getKey();
com.vaadin.ui.TabSheet.Tab tab = component.getTab(tabComponent);
ComponentDescriptor componentDescriptor = tabEntry.getValue();
String name = componentDescriptor.name;
component.setTestId(tab, testIdManager.getTestId(debugId + "." + name));
}
}
}
Aggregations