tmf.swtbot: Add a failure message to 'isTableCellFilled'
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Mon, 7 Nov 2016 18:41:40 +0000 (13:41 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Tue, 8 Nov 2016 18:36:25 +0000 (13:36 -0500)
This patch adds a failure message for the isTableCellFilled SWTbot
condition to tell what text was in the cell, if any and what was
expected

Change-Id: I8a3a8290af9a5a37c08ecf48cece6d67b1c96f44
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/84609
Reviewed-by: Hudson CI
Reviewed-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java

index c1ecf95e428ac0d1ad9223fae29aea72e4ca820d..aa58f69fbfea8e74ffaabb75239412808083ac3c 100644 (file)
@@ -309,6 +309,15 @@ public final class ConditionHelpers {
                 }
                 return false;
             }
+
+            @Override
+            public String getFailureMessage() {
+                String cell = table.cell(row, column);
+                if (cell == null) {
+                    return NLS.bind("Cell absent, expected: {0}", content);
+                }
+                return NLS.bind("Cell content: {0} expected: {1}", cell, content);
+            }
         };
     }
 
This page took 0.024565 seconds and 5 git commands to generate.