private TimedCondition isNotLikedAjaxSuccessful() { return this.likeSummary.timed().hasAttribute("data-liked", "false"); }
/** * @return timed condition that returns true if the applinks list is empty (there is no applinks) */ @Nonnull public TimedCondition isEmpty() { return applinksTable.withTimeout(TimeoutType.PAGE_LOAD).timed().hasAttribute("data-empty", "empty"); }
public TimedCondition isApplicationIndeterminate(final String applicationKey) { return applicationCheckbox(applicationKey).timed().hasAttribute("indeterminate", "true"); }
@Nonnull public TimedCondition isStatusLoaded() { return getStatusContainer() .withTimeout(TimeoutType.SLOW_PAGE_LOAD) .timed() .hasAttribute("data-status-loaded", Boolean.TRUE.toString()); }
public AutoComplete query(final String query) { this.field.type(query); Poller.waitUntilTrue(container.timed().hasAttribute("data-query", query)); return this; }
@Override public TimedCondition isAt() { TimedCondition present = issueTypeToFieldConfigurationAssociationsTable.timed().isPresent(); if (fieldConfigurationSchemeId >= 0) { present = Conditions.and(present, name.timed().hasAttribute(DATA_ID, valueOf(fieldConfigurationSchemeId))); } return present; }
@Override public TimedCondition isAt() { TimedCondition result = name.timed().isPresent(); if (fieldConfigId >= 0) { result = Conditions.and(result, name.timed().hasAttribute(DATA_ID, valueOf(fieldConfigId))); } return result; }
/** * Used to check whether the tooltip of the restrictions icon matches the specified text * * @param text The expect text value of the title * @return A {@link com.atlassian.pageobjects.elements.query.TimedCondition} for the matching tooltip */ public TimedCondition hasRestrictionsTooltip(String text) { waitUntilTrue(pageRestrictions.timed().isVisible()); return Conditions.or( pageRestrictions.timed().hasAttribute("title", text), pageRestrictions.timed().hasAttribute("original-title", text) ); }
@Override public TimedCondition isAt() { TimedCondition present = screensTable.timed().isPresent(); if (schemeId >= 0) { present = Conditions.and(present, name.timed().hasAttribute(DATA_ID, valueOf(schemeId))); } return present; }
@Override public TimedCondition isAt() { TimedCondition condition = name.timed().isPresent(); if (issueTypeScreenSchemeId >= 0) { condition = Conditions.and(condition, name.timed().hasAttribute(ATTRIBUTE_SCHEME_ID, valueOf(issueTypeScreenSchemeId))); } return condition; }
private TimedCondition hasQuery(String query) { return and(container.timed().isPresent(), container.timed().hasAttribute("data-query", query)); }
public TimedCondition isReady() { waitUntilTrue("Labels container should be present", labelContainer.timed().isPresent()); return labelContainer.timed().hasAttribute("data-ready", "true"); }
public <T> T promote(ItContentBlueprint blueprint, Class<T> templatePage, Space space) { PageElement promoteOrDemoteLink = getPromoteOrDemoteLink(blueprint); if (promoteOrDemoteLink.hasAttribute(DATA_PROMOTED, "false")) { promoteOrDemoteLink.click(); Poller.waitUntilTrue(promoteOrDemoteLink.timed().hasAttribute(DATA_PROMOTED, "true")); } return returnBoundPage(templatePage, space); }
public <T> T demote(final ItContentBlueprint blueprint, Class<T> templatePage, Space space) { PageElement promoteOrDemoteLink = getPromoteOrDemoteLink(blueprint); if (promoteOrDemoteLink.hasAttribute(DATA_PROMOTED, "true")) { promoteOrDemoteLink.click(); Poller.waitUntilTrue(promoteOrDemoteLink.timed().hasAttribute(DATA_PROMOTED, "false")); } return returnBoundPage(templatePage, space); }
public void clickUnfavouriteButton() { webdriverUtils.scrollToElementWithOffset(favouriteButton, 150); favouriteButton.click(); waitUntilTrue(favouriteButton.timed().hasAttribute("title", "Save for later (f)")); waitUntilFalse(favouriteButton.timed().hasClass("selected")); }
public void clickFavouriteButton() { webdriverUtils.scrollToElementWithOffset(favouriteButton, 150); favouriteButton.click(); waitUntilTrue(favouriteButton.timed().hasClass("selected")); waitUntilTrue(favouriteButton.timed().hasAttribute("title", "Remove (f)")); }
public SpacePicker selectSpace(Space space) { results.find(By.xpath("//div[@title='" + space.getName() + "']")).click(); waitUntilTrue(templates.timed().hasAttribute("data-space-key", space.getKey())); return this; }
public ViewPage clickAndCreatePage() { assertFalse(macroButton.hasAttribute("aria-disabled", "true")); // If the new page is successfully created, after the click the browser will go to *another* ViewPage that // has a different pageId. String currentPageId = parentPage.pageId.getAttribute("content"); macroButton.click(); Poller.waitUntilFalse(parentPage.pageId.timed().hasAttribute("content", currentPageId)); return pageBinder.bind(ViewPage.class); }
private <T extends DashboardEntitiesTab> T gotoTab(PageElement link, Class<T> tab, By tabSelector) { if (entitiesPanel.hasAttribute("data-ready-for-interaction", "false")) Poller.waitUntil("wait for global entities panel to load", pageElementFinder.find(By.cssSelector(".aui-tabs.global-entities")).withTimeout(TimeoutType.AJAX_ACTION).timed().hasAttribute("data-ready-for-interaction", "true"), is(true)); link.click(); final T tabPane = pageBinder.bind(tab); assertTrue(tabPane.isVisible()); Poller.waitUntil("wait for dashboard tab to load", pageElementFinder.find(tabSelector).withTimeout(TimeoutType.AJAX_ACTION).timed().hasClass("content-loaded"), is(true)); return tabPane; } }
/** * For Confluence 5.8 or later, this will return the tooltip of the restrictions icon in the page metadata next to * the breadcrumbs. For pre-5.8, this will return the visible text on the restrictions button in the page footer. */ public TimedCondition hasRestrictionsButtonText(String text) { waitUntilTrue(restrictionsButton.timed().isVisible()); if (restrictionsButton.find(By.className("trigger-text")).isPresent()) { return restrictionsButton.find(By.className("trigger-text")).timed().hasText(text); } else { return restrictionsButton.timed().hasAttribute("data-tooltip", text); } }