Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified Transaction tab test #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class hawkularApplicationTransactionConstatnts {

public static final By transactionMetrics= By.xpath(".//*[@id='hk-deployments']/div[2]/div[1]/div[2]/h3");
public static final By transactionGraph= By.xpath(".//*[@id='hk-deployments']/div[2]/div[1]/div[3]/div[2]/div/hawkular-chart/svg");
public static final By transactionGraph= By.xpath(".//*[@id='hk-deployments']/div[2]/div[1]/div[3]/div[2]/div");
public static final By transactionsAlert= By.xpath(".//*[@id='hk-deployments']/div[2]/div[2]/div/div[1]/h2");
public static final By transactionStatus= By.xpath(".//*[@id='hk-deployments']/div[1]/h3");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.qe.hawkular.page;

import junit.framework.Assert;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.qe.hawkular.element.HawkularAppServerPageConstants;
Expand All @@ -17,28 +19,19 @@ public hawkularApplicationTransactionPage(WebDriver driver) {

}

By ApplicationServerTab= HawkularApplicationOverviewConstants.ApplicationServerTab;

By localWildfyServerLink= HawkularAppServerPageConstants.localWildfyServerLink;
By appserverTransactionsTabLink= HawkularAppServerPageConstants.appserverTransactionsTabLink;

By transactionMetrics=hawkularApplicationTransactionConstatnts.transactionMetrics;
By transactionGraph=hawkularApplicationTransactionConstatnts.transactionGraph;
By transactionsAlert=hawkularApplicationTransactionConstatnts.transactionsAlert;
By transactionStatus=hawkularApplicationTransactionConstatnts.transactionStatus;

public void checkAppTransaction()

{

HawkularUtils utils = new HawkularUtils(driver);
utils.navigateTo(ApplicationServerTab);
utils.navigateTo(localWildfyServerLink);
utils.navigateTo(appserverTransactionsTabLink);
utils.waitForElementPresent(transactionMetrics);
// utils.waitForElementPresent(transactionGraph);
utils.waitForElementPresent(transactionsAlert);
utils.waitForElementPresent(transactionStatus);
utils.navigateTo(HawkularApplicationOverviewConstants.ApplicationServerTab);
utils.navigateTo( HawkularAppServerPageConstants.localWildfyServerLink);
utils.navigateTo( HawkularAppServerPageConstants.appserverTransactionsTabLink);
Assert.assertTrue(utils.waitForElementPresent(hawkularApplicationTransactionConstatnts.transactionMetrics));
Assert.assertTrue(utils.waitForElementPresent(hawkularApplicationTransactionConstatnts.transactionGraph));
Assert.assertTrue(utils.waitForElementPresent(hawkularApplicationTransactionConstatnts.transactionsAlert));
Assert.assertTrue(utils.waitForElementPresent(hawkularApplicationTransactionConstatnts.transactionStatus));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public void closeSession() {

@Test
public void hawkularApplicationTransactionTest() throws Exception {

_logger.info("verifying the newly added transaction tab and its Element");

driver = hawkularLoginToDeployments();
hawkularApplicationTransactionPage verify = new hawkularApplicationTransactionPage(driver);

Expand Down