Skip to content

Instantly share code, notes, and snippets.

@lfryc
lfryc / Pom.xml
Created July 26, 2012 16:11 — forked from nallachaitu/Pom.xml
pom file for drone test
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.arquillian.example</groupId>
<artifactId>arquillian-tutorial</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencyManagement>
@lfryc
lfryc / gist:3508324
Created August 29, 2012 08:06 — forked from bleathem/gist:3508270
Graphene Login component
public class LoginComponent {
@Root
private WebElement driver;
@FindBy(id="loginForm:username")
private WebElement usernameInput;
@FindBy(id="loginForm:password")
private WebElement passwordInput;
@lfryc
lfryc / TestHandler.java
Created September 3, 2012 19:26 — forked from nallachaitu/lukas.java
test file that contains the javascript test functions
class TestHandler {
static void runQUnitMethod(WebDriver browser, String className, String methodName) {
String url = ...; // compose URL
browser.get("...");
// wait and read results
}
}
@lfryc
lfryc / WarpAnonymousServerAssertion.java
Created September 4, 2012 13:41 — forked from aslakknutsen/WarpAnonymousServerAssertion.java
Warp rewrite Anonymous ServerAssertions to 'real' classes and transfer to Container. Rewrite 'external' references to client callback
@Travelling
SomeObject obj;
@Test
public void should() {
Warp.execute(new ClientAction() {
public void action() {
page.doAction();
}
}).verify(new ServerAssertion() {
@Test
public void table_sort() throws InterruptedException {
// given
browser.get(contextPath.toExternalForm() + "sort.jsf");
WebElement cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
Assert.assertEquals("9", cell.getText());
guardXhr(sortLink).click();
waitAjax().until(new Predicate<WebDriver> () {
(E) ManagerProcessing
  (O) LoadableExtensionLoader.load
	(E) ServiceLoader
(E) ManagerStarted
	(O) ConfigurationRegistrar.loadConfiguration
	(E) ArquillianDescriptor
		(O) ProtocolRegistryCreator.createRegistry
		(E) ProtocolRegistry
		(O) ContainerRegistryCreator.createRegistry
@lfryc
lfryc / gist:4275537
Created December 13, 2012 10:24 — forked from anonymous/gist:4275523
Migration script from Warp API Alpha1 to Alpha2
find -name "*.java" -exec sed -ri 's#ClientAction#Activity#g' {} \;
find -name "*.java" -exec sed -ri 's#ServerAssertion#Inspection#g' {} \;
find -name "*.java" -exec sed -ri 's#org\.jboss\.arquillian\.warp\.extension\.phaser#org.jboss.arquillian.warp.jsf#g' {} \;
find -name "*.java" -exec grep -q '@WarpTest' {} \; -exec sed -ri 's#execute\(#initiate(#' {} \;
find -name "*.java" -exec grep -q '@WarpTest' {} \; -exec sed -ri 's#public void action\(\)#public void perform()#' {} \;
find -name "*.java" -exec grep -q '@WarpTest' {} \; -exec sed -ri 's#filter\(#observe(#' {} \;
find -name "*.java" -exec grep -q '@WarpTest' {} \; -exec sed -ri 's#verify\(#inspect(#' {} \;
package org.ced.web.rest.conference.test;
import static com.jayway.restassured.RestAssured.given;
import static org.hamcrest.Matchers.equalTo;
import java.io.File;
import java.net.URL;
import java.util.Date;
import org.ced.domain.Repository;
/*
* JBoss, Home of Professional Open Source
* Copyright ${year}, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
@lfryc
lfryc / accordion.java
Last active December 20, 2015 10:59 — forked from jhuska/accordion
package org.richfaces.tests.page.fragments.impl;
import org.jboss.arquillian.graphene.enricher.findby.FindBy;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.richfaces.tests.page.fragments.impl.accordion.RichFacesAccordion;
public class TestCase {
@Test