@@ -0,0 +1,1410 @@
+/******************************************************************************* %0A * Copyright (c) 2017 Red Hat, Inc. %0A * Distributed under license by Red Hat, Inc. All rights reserved. %0A * This program is made available under the terms of the %0A * Eclipse Public License v1.0 which accompanies this distribution, %0A * and is available at http://www.eclipse.org/legal/epl-v10.html %0A * %0A * Contributors: %0A * Red Hat, Inc. - initial API and implementation %0A ******************************************************************************/ %0Apackage org.jboss.reddeer.workbench.condition;%0A%0Aimport org.jboss.reddeer.common.condition.AbstractWaitCondition;%0Aimport org.jboss.reddeer.workbench.api.View;%0A%0A/**%0A * Wait condition for views checking whether specified view is open%0A * %0A * @author rawagner@redhat.com%0A */%0Apublic class ViewIsOpen extends AbstractWaitCondition%7B%0A%09%0A%09private View view;%0A%09%0A%09/**%0A%09 * Checks whether specified view is open%0A%09 * @param view view to check if it is open%0A%09 */%0A%09public ViewIsOpen(View view) %7B%0A%09%09this.view = view;%0A%09%7D%0A%0A%09@Override%0A%09public boolean test() %7B%0A%09%09return view.isOpened();%0A%09%7D%0A%09%0A%09@Override%0A%09public String description() %7B%0A%09%09return %22'%22+view.getTitle()+%22' view is open%22;%0A%09%7D%0A%09%0A%09@Override%0A%09public String errorMessageUntil() %7B%0A%09%09return %22'%22+view.getTitle()+%22' view is not open%22;%0A%09%7D%0A%09%0A%09%0A%09@Override%0A%09public String errorMessageWhile() %7B%0A%09%09return %22'%22+view.getTitle()+%22' view is still open%22;%0A%09%7D%0A%0A%7D%0A

Add ViewIsOpen wait condition. Fixes #1615