Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#author :Dmitriy Sukharev
#date :20131222
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.0.0.CR1
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
WILDFLY_ARCHIVE_NAME=$WILDFLY_FILENAME.tar.gz
@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
/*
* 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.
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;
@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(#' {} \;
(E) ManagerProcessing
  (O) LoadableExtensionLoader.load
	(E) ServiceLoader
(E) ManagerStarted
	(O) ConfigurationRegistrar.loadConfiguration
	(E) ArquillianDescriptor
		(O) ProtocolRegistryCreator.createRegistry
		(E) ProtocolRegistry
		(O) ContainerRegistryCreator.createRegistry
@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> () {
@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() {
@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 / 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;