From ff578d8e2572ff02f84b79fc89fabefc3e350247 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Genevi=C3=A8ve=20Bastien?= Date: Mon, 7 Nov 2016 13:41:40 -0500 Subject: [PATCH] tmf.swtbot: Add a failure message to 'isTableCellFilled' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- .../tmf/ui/swtbot/tests/shared/ConditionHelpers.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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); + } }; } -- 2.34.1