use of com.aire.features.FeatureDescriptor in project aire-components by aire-ux.
the class InMemoryFeatureManagerTest method ensureDisablingViewPreventsItFromBeingRegistered.
@ViewTest
void ensureDisablingViewPreventsItFromBeingRegistered(@Context TestContext $) {
val descriptor = new FeatureDescriptor("test.view.feature", "Test View Feature", ":application:modules:module-management:test-view", "Cool feature descriptor");
featureManager.registerFeature(descriptor);
assertTrue(featureManager.enable("test.view.feature"));
$.navigate(TestFeatureView.class);
$.flush();
var button = $.selectFirst("vaadin-button[text*=test]", Button.class);
assertTrue(button.isPresent());
featureManager.disable("test.view.feature");
$.navigate(MainView.class);
$.navigate(TestFeatureView.class);
button = $.selectFirst("vaadin-button[text*=test]", Button.class);
assertFalse(button.isPresent());
}
use of com.aire.features.FeatureDescriptor in project aire-components by aire-ux.
the class AddFeatureFlagOverlay method onSuccess.
private void onSuccess(ClickEvent<Button> buttonClickEvent) {
value = new FeatureDescriptor(keyInputField.getValue(), nameInputField.getValue(), pathInputField.getValue(), descriptionInput.getValue());
val tagValue = tagInputField.getValue();
if (tagValue != null) {
val tags = tagValue.split(",");
for (val tag : tags) {
if (!tag.isBlank()) {
value.addTag(tag);
}
}
}
close();
}
Aggregations