From 79ccb3181db4e87e43fe6fbf34e6acfb4e4c6b6c Mon Sep 17 00:00:00 2001 From: Ondrej Kotek Date: Tue, 12 Sep 2023 11:46:43 +0200 Subject: [PATCH] HAL-1886: Fix manatoko ExpressionFilterTest failures --- .../test/configuration/web/ExpressionFilterTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test-configuration-web/src/test/java/org/jboss/hal/testsuite/test/configuration/web/ExpressionFilterTest.java b/test-configuration-web/src/test/java/org/jboss/hal/testsuite/test/configuration/web/ExpressionFilterTest.java index cc02e3c4..435faeb9 100644 --- a/test-configuration-web/src/test/java/org/jboss/hal/testsuite/test/configuration/web/ExpressionFilterTest.java +++ b/test-configuration-web/src/test/java/org/jboss/hal/testsuite/test/configuration/web/ExpressionFilterTest.java @@ -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; @@ -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),