use of io.jmix.ui.sys.TestIdManager in project jmix by jmix-framework.
the class ValuePickerImpl method setDebugId.
@Override
public void setDebugId(@Nullable String id) {
super.setDebugId(id);
if (id != null && AppUI.getCurrent() != null) {
String debugId = getDebugId();
TestIdManager testIdManager = AppUI.getCurrent().getTestIdManager();
for (Action action : actions) {
JmixButton button = actionButtons.get(action);
if (button != null && Strings.isNullOrEmpty(button.getId())) {
button.setId(testIdManager.getTestId(debugId + "_" + action.getId()));
}
}
}
}
use of io.jmix.ui.sys.TestIdManager in project jmix by jmix-framework.
the class PopupButtonImpl method createActionButton.
protected JmixButton createActionButton(Action action) {
JmixButton button = new JmixButton();
button.setWidth(100, Sizeable.Unit.PERCENTAGE);
button.setPrimaryStyleName(CONTEXT_MENU_BUTTON_STYLENAME);
setPopupButtonAction(button, action);
AppUI ui = AppUI.getCurrent();
if (ui != null) {
if (ui.isTestMode()) {
button.setJTestId(action.getId());
}
if (ui.isPerformanceTestMode()) {
String debugId = getDebugId();
if (debugId != null) {
TestIdManager testIdManager = ui.getTestIdManager();
button.setId(testIdManager.getTestId(debugId + "_" + action.getId()));
}
}
}
return button;
}
use of io.jmix.ui.sys.TestIdManager in project jmix by jmix-framework.
the class WindowBreadCrumbs method componentAttachedToUI.
protected void componentAttachedToUI() {
adjustParentStyles();
if (ui.isTestMode()) {
linksLayout.setJTestId("breadCrumbs");
if (closeBtn != null) {
closeBtn.setJTestId("closeBtn");
}
}
if (ui.isPerformanceTestMode()) {
TestIdManager testIdManager = ui.getTestIdManager();
linksLayout.setId(testIdManager.getTestId("breadCrumbs"));
if (closeBtn != null) {
closeBtn.setId(testIdManager.getTestId("closeBtn"));
}
}
}
Aggregations