Skip to content

Commit

Permalink
Added UI Testing of search modal
Browse files Browse the repository at this point in the history
  • Loading branch information
woloszyna committed May 19, 2020
1 parent 47e3b4a commit b0008a1
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed ScreenShots/screenshot1589829908462.jpg
Binary file not shown.
Binary file removed ScreenShots/screenshot1589829909051.jpg
Binary file not shown.
Binary file removed ScreenShots/screenshot1589829909534.jpg
Binary file not shown.
Binary file removed ScreenShots/screenshot1589829909899.jpg
Binary file not shown.
5 changes: 5 additions & 0 deletions src/main/java/Pages/Frontend/LandingPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public class LandingPage extends BasicOperations {

public WebElement destinationSearch = driver.findElement(By.xpath("//*[@id=\"hotels\"]/div/div/form/div/div/div[1]/div/div[2]"));
public WebElement checkin = driver.findElement(By.xpath("//*[@id=\"airDatepickerRange-hotel\"]/div[1]/div/div[2]"));
public WebElement checkout = driver.findElement(By.xpath("//*[@id=\"airDatepickerRange-hotel\"]/div[2]/div/div[2]"));
public WebElement adult = driver.findElement(By.xpath("//*[@id=\"hotels\"]/div/div/form/div/div/div[3]/div/div/div/div/div/div/div[1]/div/div[2]"));
public WebElement child = driver.findElement(By.xpath("//*[@id=\"hotels\"]/div/div/form/div/div/div[3]/div/div/div/div/div/div/div[2]/div/div[2]"));
public WebElement searchBtn = driver.findElement(By.className("btn-primary"));


//TODO: start here

Expand Down
24 changes: 23 additions & 1 deletion src/test/java/Frontend/VerifyLandingPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import Basis.BasicOperations;
import Pages.Frontend.LandingPage;
import org.apache.hc.core5.reactor.Command;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.Select;
Expand All @@ -23,7 +24,7 @@ public void OpenChromeFrontend() {

}

@Test
@Test(priority = 1)
public void VerifyTopBanner() {

LandingPage LandingPage = new LandingPage();
Expand Down Expand Up @@ -85,6 +86,27 @@ public void VerifyTopBanner() {
Assert.assertEquals(LandingPage.PhoneNumberText,"phone Call Now : +1-234-56789");
}

@Test(priority = 2)
public void VerifySearchModal() {

LandingPage LandingPage = new LandingPage();

Assert.assertTrue(LandingPage.holsModal.isDisplayed());
Assert.assertTrue(LandingPage.hotels.isDisplayed());
Assert.assertTrue(LandingPage.flights.isDisplayed());
Assert.assertTrue(LandingPage.tours.isDisplayed());
Assert.assertTrue(LandingPage.cars.isDisplayed());
Assert.assertTrue(LandingPage.visa.isDisplayed());

Assert.assertTrue(LandingPage.destinationSearch.isDisplayed());
Assert.assertTrue(LandingPage.checkin.isDisplayed());
Assert.assertTrue(LandingPage.checkout.isDisplayed());
Assert.assertTrue(LandingPage.adult.isDisplayed());
Assert.assertTrue(LandingPage.child.isDisplayed());
Assert.assertTrue(LandingPage.searchBtn.isDisplayed());

}

@AfterMethod
public void Close() {

Expand Down
Binary file modified target/classes/Pages/Frontend/LandingPage.class
Binary file not shown.
Binary file modified target/test-classes/Frontend/VerifyLandingPage.class
Binary file not shown.

0 comments on commit b0008a1

Please sign in to comment.