Skip to content

Commit

Permalink
Merge pull request #115 from OndrejKotek/HAL-1886
Browse files Browse the repository at this point in the history
HAL-1886: Fix manatoko ExpressionFilterTest failures
  • Loading branch information
hpehl authored Sep 12, 2023
2 parents 1851b95 + 79ccb31 commit 4d078ae
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@
@Testcontainers
public class ExpressionFilterTest {

private static final String EXPRESSION_VALUE_BASE = "path(/a) -> redirect(/%s)";

@Container static WildFlyContainer wildFly = WildFlyContainer.standalone(DEFAULT);

@BeforeAll
static void setupModel() throws Exception {
Operations operations = new Operations(wildFly.managementClient());
operations.add(expressionFilterAddress(FILTER_UPDATE), Values.of(EXPRESSION, Random.name()));
operations.add(expressionFilterAddress(FILTER_DELETE), Values.of(EXPRESSION, Random.name()));
operations.add(expressionFilterAddress(FILTER_UPDATE),
Values.of(EXPRESSION, String.format(EXPRESSION_VALUE_BASE, Random.name())));
operations.add(expressionFilterAddress(FILTER_DELETE),
Values.of(EXPRESSION, String.format(EXPRESSION_VALUE_BASE, Random.name())));
}

@Inject Console console;
Expand All @@ -74,13 +78,13 @@ void prepare() {
void create() throws Exception {
crud.create(expressionFilterAddress(FILTER_CREATE), table, form -> {
form.text(NAME, FILTER_CREATE);
form.text(EXPRESSION, Random.name());
form.text(EXPRESSION, String.format(EXPRESSION_VALUE_BASE, Random.name()));
});
}

@Test
void update() throws Exception {
String expression = Random.name();
String expression = String.format(EXPRESSION_VALUE_BASE, Random.name());

table.select(FILTER_UPDATE);
crud.update(expressionFilterAddress(FILTER_UPDATE), form, f -> f.text(EXPRESSION, expression),
Expand Down

0 comments on commit 4d078ae

Please sign in to comment.