package selenium.mtgstocks;

import io.github.bonigarcia.wdm.FirefoxDriverManager;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class MtgStocksTest {

	protected WebDriver driver;

	@BeforeClass
	public static void setUpClass() {
		FirefoxDriverManager.getInstance().setup();
	}

	@Before
	public void setUp() {
		driver = new FirefoxDriver();
	}

	@Test
	public void testApp() {
		driver.get("http://www.mtgstocks.com");
		Assertions.assertThat(driver.getTitle()).isEqualTo("MTGStocks.com");
	}

	@After
	public void tearDown() {
		driver.quit();
	}
}

@@ -72,24 +72,80 @@
 verManager;%0A
+import org.assertj.core.api.AbstractCharSequenceAssert;%0A
 import org.a
@@ -172,16 +172,16 @@
 rtions;%0A
-
 import o
@@ -275,16 +275,47 @@
 .Test;%0A%0A
+import org.openqa.selenium.By;%0A
 import o
@@ -340,24 +340,63 @@
 .WebDriver;%0A
+import org.openqa.selenium.WebElement;%0A
 import org.o
@@ -685,15 +685,16 @@
 oid 
-testApp
+homePage
 () %7B
@@ -742,73 +742,719 @@
 ;%0A%09%09
-Assertions.assertThat(driver.getTitle()).isEqualTo(%22MTGStocks.com
+assertTitle();%0A%09%09assertGreetingText();%0A%09%09assertNavigationBar();%0A%09%7D%0A%0A%09private void assertTitle() %7B%0A%09%09Assertions.assertThat(driver.getTitle()).isEqualTo(%22MTGStocks.com%22);%0A%09%7D%0A%0A%09private void assertGreetingText() %7B%0A%09%09Assertions.assertThat(driver.findElement(By.xpath(%22//div%5B@class='jumbotron'%5D/p%22)).getText())%0A%09%09%09%09.isEqualTo(%22Your favorite resource for daily price updates on Magic: the Gathering cards. We track prices of all cards and report the ones that have recently fluctuated the most for your Magic finance convenience!%22);%0A%09%7D%0A%0A%09private void assertNavigationBar() %7B%0A%09%09Assertions.assertThat(driver.findElement(By.id(%22navbar%22)).getText())%0A%09%09%09%09.isEqualTo(%22Sets%5CnInterests%5CnAnalytics%5CnDecks%5CnAbout%5CnLogin%5CnSign up
 %22);%0A

test mtgstocks home page