From d452342ede5b6e59ca2e3f477e2166e655477919 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Thu, 21 Apr 2022 21:00:38 -0400 Subject: [PATCH] Add CTabFolder support to tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The method verifyCompositeText in DialogCheck verifies various aspects of composites, with https://github.com/eclipse-platform/eclipse.platform.team/pull/14 this now needs to understand CTabFolder (in addition to TabFolder) Also-by: Torbjörn Svensson --- tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF | 2 +- tests/org.eclipse.ui.tests.harness/pom.xml | 2 +- .../src/org/eclipse/ui/tests/harness/util/DialogCheck.java | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF b/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF index 2b795e88af6..83cfee0faa2 100644 --- a/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF +++ b/tests/org.eclipse.ui.tests.harness/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Harness Plug-in Bundle-SymbolicName: org.eclipse.ui.tests.harness;singleton:=true -Bundle-Version: 1.8.100.qualifier +Bundle-Version: 1.8.200.qualifier Eclipse-BundleShape: dir Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, diff --git a/tests/org.eclipse.ui.tests.harness/pom.xml b/tests/org.eclipse.ui.tests.harness/pom.xml index cf75e2de67e..9d2b8d9e5c3 100644 --- a/tests/org.eclipse.ui.tests.harness/pom.xml +++ b/tests/org.eclipse.ui.tests.harness/pom.xml @@ -19,7 +19,7 @@ org.eclipse.ui org.eclipse.ui.tests.harness - 1.8.100-SNAPSHOT + 1.8.200-SNAPSHOT eclipse-test-plugin diff --git a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java index 9ecf29d1dd2..f463f3cf631 100644 --- a/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java +++ b/tests/org.eclipse.ui.tests.harness/src/org/eclipse/ui/tests/harness/util/DialogCheck.java @@ -20,6 +20,7 @@ import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; @@ -122,6 +123,12 @@ private static void verifyCompositeText(Composite composite) { for (int j = 0; j < numPages; j++) { folder.setSelection(j); } + } else if (child instanceof CTabFolder) { + CTabFolder folder = (CTabFolder) child; + int numPages = folder.getItemCount(); + for (int j = 0; j < numPages; j++) { + folder.setSelection(j); + } } else if (child instanceof Button) { //verify the text if the child is a button