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

ARQGRA-186: Rename Component Objects dependencies to Page Fragments #41

Merged
merged 1 commit into from
Sep 12, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.autocomplete;
package org.jboss.arquillian.graphene.component.object.api.autocomplete;

import java.util.List;

import org.jboss.arquillian.graphene.spi.components.scrolling.ScrollingType;
import org.jboss.arquillian.graphene.component.object.api.scrolling.ScrollingType;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.autocomplete;
package org.jboss.arquillian.graphene.component.object.api.autocomplete;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.autocomplete;
package org.jboss.arquillian.graphene.component.object.api.autocomplete;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.autocomplete;
package org.jboss.arquillian.graphene.component.object.api.autocomplete;

import org.openqa.selenium.WebElement;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.calendar;
package org.jboss.arquillian.graphene.component.object.api.calendar;

import org.joda.time.DateTime;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.calendar;
package org.jboss.arquillian.graphene.component.object.api.calendar;

import java.util.List;

import org.jboss.arquillian.graphene.spi.components.scrolling.ScrollingType;
import org.jboss.arquillian.graphene.component.object.api.scrolling.ScrollingType;
import org.joda.time.DateTime;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.checkbox;
package org.jboss.arquillian.graphene.component.object.api.checkbox;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.common;
package org.jboss.arquillian.graphene.component.object.api.common;

import java.util.List;

/**
* ComponentsContainer represents a container for components, in other words a component which can contain other components,
* which you can easily access.
* PageFragments represents a container for Page Fragments, in other words a page fragment which can contain other page
* fragments, which you can easily access.
*
* @author <a href="mailto:jhuska@redhat.com">Juraj Huska</a>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.common;
package org.jboss.arquillian.graphene.component.object.api.common;

/**
* It should ensure in the constructor that it is going represent either WebElement, Page object or Component.
*
* @author <a href="mailto:jhuska@redhat.com">Juraj Huska</a>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.numberSpinner;
package org.jboss.arquillian.graphene.component.object.api.numberSpinner;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.popup;
package org.jboss.arquillian.graphene.component.object.api.popup;

import org.jboss.arquillian.graphene.spi.components.common.ComponentsContainer;
import org.jboss.arquillian.graphene.component.object.api.common.ComponentsContainer;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.scrolling;
package org.jboss.arquillian.graphene.component.object.api.scrolling;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.scrolling;
package org.jboss.arquillian.graphene.component.object.api.scrolling;

/**
* Enum with different types of scrolling, that is the ways something can be done.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

import org.jboss.arquillian.graphene.spi.components.common.ComponentsContainer;
import org.jboss.arquillian.graphene.component.object.api.common.ComponentsContainer;

/**
* Represents one particular cell of the table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
* Represents the footer of the column or row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
* Represents the header of the column or row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

import java.util.List;

import org.jboss.arquillian.graphene.spi.components.scrolling.DataScrollerComponent;
import org.jboss.arquillian.graphene.component.object.api.scrolling.DataScrollerComponent;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.table;
package org.jboss.arquillian.graphene.component.object.api.table;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.graphene.spi.components.validation;
package org.jboss.arquillian.graphene.component.object.api.validation;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
* @author Juraj Huska
*/
@RunWith(Arquillian.class)
public class TestInitializingComponentObjects {
public class TestInitializingPageFragments {

@FindBy(xpath = "//div[@id='rootElement']")
private AbstractComponentStub abstractComponentStub;
private AbstractPageFragmentStub abstractPageFragmentStub;

@FindBy(xpath = "//input")
private WebElement input;
Expand All @@ -58,28 +58,28 @@ public class TestInitializingComponentObjects {

public void loadPage() {
URL page = this.getClass().getClassLoader()
.getResource("org/jboss/arquillian/graphene/ftest/componentObjectsEnricher/sample.html");
.getResource("org/jboss/arquillian/graphene/ftest/pageFragmentsEnricher/sample.html");

selenium.get(page.toExternalForm());
}

@Test
public void testComponentIsInitialized() {
public void testpageFragmentIsInitialized() {
loadPage();
assertNotNull("AbstractComponent should be initialised at this point!", abstractComponentStub);
assertNotNull("AbstractPageFragment should be initialised at this point!", abstractPageFragmentStub);
}

@Test
public void testComponentHasSetRootCorrectly() {
public void testPageFragmentHasSetRootCorrectly() {
loadPage();
assertEquals("The root was not set correctly!", abstractComponentStub.invokeMethodOnElementRefByXpath(),
assertEquals("The root was not set correctly!", abstractPageFragmentStub.invokeMethodOnElementRefByXpath(),
EXPECTED_NESTED_ELEMENT_TEXT);
}

@Test
public void testPageObjectInitialisedCorrectly() {
loadPage();
assertEquals("The page object was not set correctly!", testPage.getAbstractComponent()
assertEquals("The page object was not set correctly!", testPage.getAbstractPageFragment()
.invokeMethodOnElementRefByXpath(), EXPECTED_NESTED_ELEMENT_TEXT);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
package org.jboss.arquillian.graphene.enricher.page;

import org.jboss.arquillian.graphene.enricher.AbstractComponentStub;
import org.jboss.arquillian.graphene.enricher.AbstractPageFragmentStub;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

Expand All @@ -31,20 +31,20 @@
public class TestPage {

@FindBy(xpath = "//div[@id='rootElement']")
private AbstractComponentStub abstractComponent;
private AbstractPageFragmentStub abstractPageFragment;

@FindBy(xpath = "//div[@id='rootElement']")
private WebElement element;

@FindBy(xpath = "//input")
private WebElement input;

public AbstractComponentStub getAbstractComponent() {
return abstractComponent;
public AbstractPageFragmentStub getAbstractPageFragment() {
return abstractPageFragment;
}

public void setAbstractComponent(AbstractComponentStub abstractComponent) {
this.abstractComponent = abstractComponent;
public void setAbstractPageFragment(AbstractPageFragmentStub abstractPageFragment) {
this.abstractPageFragment = abstractPageFragment;
}

public WebElement getElement() {
Expand Down
4 changes: 2 additions & 2 deletions graphene-webdriver/graphene-webdriver-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
<artifactId>arquillian-config-api</artifactId>
</dependency>

<!-- Component objects dependencies -->
<!-- Page Fragments dependencies -->
<dependency>
<groupId>org.jboss.arquillian.graphene</groupId>
<artifactId>component-objects-spi</artifactId>
<artifactId>graphene-webdriver-spi</artifactId>
<version>${project.version}</version>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import org.jboss.arquillian.core.spi.LoadableExtension;
import org.jboss.arquillian.graphene.configuration.GrapheneConfigurator;
import org.jboss.arquillian.graphene.enricher.ComponentObjectsEnricher;
import org.jboss.arquillian.graphene.enricher.PageFragmentsEnricher;
import org.jboss.arquillian.graphene.page.extension.GraphenePageExtensionRegistrar;
import org.jboss.arquillian.test.spi.TestEnricher;

Expand All @@ -37,7 +37,7 @@ public void register(ExtensionBuilder builder) {
/* Configurator */
builder.observer(GrapheneConfigurator.class);
/* Component Objects */
builder.service(TestEnricher.class, ComponentObjectsEnricher.class);
builder.service(TestEnricher.class, PageFragmentsEnricher.class);
/** Page Extensions */
builder.observer(GraphenePageExtensionRegistrar.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author <a href="mailto:jhuska@redhat.com">Juraj Huska</a>
*
*/
public class AbstractComponentStub {
public class AbstractPageFragmentStub {

@Root
private WebElement root;
Expand Down