Commits

Sam Adams  committed e422032

Fix ATs

  • Participants
  • Parent commits 84328d6

Comments (0)

Files changed (2)

File acceptance-test-driver/src/main/java/net/chempound/acceptance/dsl/driver/browser/ItemPage.java

 package net.chempound.acceptance.dsl.driver.browser;
 
-import net.chempound.acceptance.dsl.TestContext;
 import net.chempound.acceptance.dsl.driver.ItemView;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebDriver;
     private static final String XPATH_PINGBACK = "//li[contains(@class, 'pingback')]/a[@href='%s']";
 
     private final WebDriver webDriver;
-    private final TestContext context;
 
-    public ItemPage(final WebDriver webDriver, final TestContext context) {
+    public ItemPage(final WebDriver webDriver) {
         this.webDriver = webDriver;
-        this.context = context;
     }
 
     @Override
     public boolean hasTitle(final String title) {
         final WebElement element = webDriver.findElement(By.cssSelector(".item h1.title"));
-        return context.actual(title).equals(element.getText());
+        return title.equals(element.getText());
     }
 
     @Override
 
     @Override
     public boolean hasSlug(final String slug) {
-        return webDriver.getCurrentUrl().contains('/' + context.actual(slug) + '/');
+        return webDriver.getCurrentUrl().contains('/' + slug + '/');
     }
 }

File acceptance-test-driver/src/main/java/net/chempound/acceptance/dsl/driver/browser/WebUIDriver.java

 
         webDriver.findElement(By.cssSelector(".item"));
 
-        final ItemView itemView = new ItemPage(webDriver, context);
+        final ItemView itemView = new ItemPage(webDriver);
         for (final Matcher<ItemView> matcher : matchers) {
             assertThat(itemView, matcher);
         }