From: Geneviève Bastien Date: Mon, 7 Nov 2016 18:41:40 +0000 (-0500) Subject: tmf.swtbot: Add a failure message to 'isTableCellFilled' X-Git-Url: http://git.efficios.com/?p=deliverable%2Ftracecompass.git;a=commitdiff_plain;h=ff578d8e2572ff02f84b79fc89fabefc3e350247 tmf.swtbot: Add a failure message to 'isTableCellFilled' 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 Reviewed-on: https://git.eclipse.org/r/84609 Reviewed-by: Hudson CI Reviewed-by: Jean-Christian Kouame Reviewed-by: Matthew Khouzam --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java b/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java index c1ecf95e42..aa58f69fbf 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/shared/org/eclipse/tracecompass/tmf/ui/swtbot/tests/shared/ConditionHelpers.java @@ -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); + } }; }