public void waitToFinish() { Poller.waitUntil("Setup hasn't finished.", submitButton.timed().isVisible(), is(true), Poller.by(5, TimeUnit.MINUTES)); } }
public void cancelLogScan() { waitUntil(forSupplier(new Supplier<Boolean>() { @Override public Boolean get() { return scanCancelButton.isVisible(); } }), CoreMatchers.is(true), Poller.by(5, TimeUnit.SECONDS)); scanCancelButton.click(); }
public BlueprintAddSpaceForm appendToNameAndWaitForValidation(final CharSequence extraText, final CharSequence expectedKey) { appendToName(extraText); // wait for the page load time to be bigger. Poller.waitUntil(Conditions.forSupplier(() -> expectedKey.equals(getKey()) && expectedKey.equals(spaceKey.getAttribute("data-validated-value")) && extraText.equals(name.getAttribute("data-validated-value"))), is(true), by(30, TimeUnit.SECONDS)); return this; }
public void confirm() { Poller.waitUntil("Projects have not been created within some time.", submit.timed().isEnabled(), is(true), by(30, TimeUnit.SECONDS)); submit.click(); }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
public ApplicationSetupPage submit() { submitButton.click(); //waiting for plugin system to restart Poller.waitUntil(isAt(), is(false), Poller.by(5, MINUTES)); return pageBinder.bind(ApplicationSetupPage.class); }
public void approvePullRequest() { approveButton.click(); try { Poller.waitUntil(approveButton.timed().hasText("Approve"), is(false), by(15000)); } catch (AssertionError e) { // we will continue in hope that Bitbucket did its job } }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
protected void waitWhileSubmitting() { final TimedCondition timedCondition = loading.timed().hasClass(FORM_SUBMITTING_CLASS); Poller.waitUntil(timedCondition, Matchers.is(false),by(timeouts.timeoutFor(TimeoutType.AJAX_ACTION))); }
@WaitUntil public void waitUntilSummaryTableLoaded() { waitUntil("Couldn't load summary table in time", summaryTable.timed().hasText("Generating page properties report"), Matchers.is(FALSE), by(10000)); }
public ScheduledHerculesPage openPeriodicAnalyzerDialog() { elementFinder.find(By.id("periodic-log-analyzer-button")).click(); // As the modal makes an AJAX request it can take a bit of time to return, if we don't wait it can mean tests will // fail if they do asserts directly after calling the method. waitUntil(forSupplier(new Supplier<Boolean>() { @Override public Boolean get() { return logAnalyzerModal.isVisible(); } }), CoreMatchers.is(true), Poller.by(5, TimeUnit.SECONDS)); return pageBinder.bind(ScheduledHerculesPage.class); }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
@WaitUntil public void waitForFooter() { waitUntil("Timed out waiting for footer", body.find(By.id("footer")).timed().isPresent(), is(true), Poller.by(10, TimeUnit.SECONDS)); } }
public void declinePullRequest() { rejectButton.click(); DeclinePullRequestDialog declinePullRequestDialog = elementFinder.find(By.id("bb-reject-pullrequest-dialog"), DeclinePullRequestDialog.class); declinePullRequestDialog.decline("Test decline reason"); try { Poller.waitUntil(declinePullRequestDialog.timed().isPresent(), is(false), by(15000)); } catch (AssertionError e) { // ignoring time out, Bitbucket probably didn't close the dialog } }
public static List<PageElement> findAll(String timeoutMessage, By by, PageElementFinder elementFinder) { Poller.waitUntil( timeoutMessage, elementFinder.find(by).timed().isPresent(), is(true), Poller.by(20000)); return elementFinder.findAll(by); } }
public void waitUntilAccessHasBeenGrantedSuccessfully() { waitUntil( pageElementFinder.find(By.cssSelector(".aui-flag .aui-message-success")).timed().isVisible(), is(true), by(3, TimeUnit.SECONDS) ); waitUntil( pageElementFinder.find(By.cssSelector(".grant-access-dialog")).timed().isVisible(), is(false), by(1, TimeUnit.SECONDS) ); }
@WaitUntil public void doWaitUntilTinyMceIsInit() { this.editor = pageBinder.bind(Editor.class); waitUntil(getCollaborativeEditorStatus(), isOneOf("off", "failed", "on", "connected", "fake"), by(LONG_WAIT)); if ("failed".equals(getCollaborativeEditorStatus().now())) { executor.executeScript("AJS.trigger('synchrony.connected.fake');"); waitUntil("Waiting for fake collaborative editor to become active.", getCollaborativeEditorStatus(), is("fake"), by(LONG_WAIT)); } if (!"off".equals(getCollaborativeEditorStatus().now())) { statusIndicator = pageBinder.bind(StatusIndicator.class); } }
/** * Wait for the TinyMCE editor in the comments section to be ready, as we'd get JS errors otherwise if we try to * insert text too early. */ @WaitUntil public void waitForTinyMCE() { waitUntil("waiting for AJS.Rte.BootstrapManager.isInitComplete()", jsQueryFactory.forBooleanJavascript( "return AJS && AJS.Rte && AJS.Rte.BootstrapManager && AJS.Rte.BootstrapManager.isInitComplete()"), is(true), by(timeouts.timeoutFor(TimeoutType.SLOW_PAGE_LOAD))); Poller.waitUntilFalse("waiting for editor container to be visible", loadingContainerVisibleCondition()); }