Skip to content

Instantly share code, notes, and snippets.

@ArquillianResource
private AjaxHalter ajaxHalter;
@Test
public void testAjaxHalter() {
ajaxHalter.enable();
xhr.click();
AjaxHalter halter = ajaxHalter.getHandleBlocking();
@jhuska
jhuska / xhrhalter.adoc
Last active August 29, 2015 14:06
XHRHalter Alpha2
  1. Enum XHRState:

    1. Ma to simulovat XHRRequest state ? + nejake dalsie stavy navyse, ktore su potrebne k implementacii ?

    2. Ak ano tak v specifikacii sa tie stavy volaju trocha inak.

  2. Zjednotenie AjaxHalter vs. XHRHalter

    1. Premenoval som XHRHalter interface na AjaxHalter, z toho isteho dovodu, preco bolo premenovany guardXHR na guarAjax. Chceme to ? Alebo to je taka low-level featura ze nam to nevadi ?

    2. Ak chceme pouzivat AjaxHalter, bolo by fajn keby zjednotime, upravime nazvy tried v baliku: https://github.com/arquillian/arquillian-graphene/tree/ARQGRA-86/impl/src/main/java/org/jboss/arquillian/graphene/page/interception a taktiez nazov JS suboru a objektu: https://github.com/arquillian/arquillian-graphene/blob/ARQGRA-86/impl/src/main/javascript/Graphene.Page.XHRHalter.js

@jhuska
jhuska / Foo.java
Created September 16, 2014 11:37
lalala tralala
@Test
@RegressionTest("https://issues.jboss.org/browse/RFPL-1194")
public void testMultipleRequestsWithNoDelay() {
attributes.set(QueueAttributes.requestDelay, 0);
AjaxHalter.enable();
queue.fireEvent(1);
queue.checkCounts(1, 1, 0);
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Arquillian test run report</title>
<style type="text/css">
body { margin: 1em; padding: 0; }
h1 { font-size: 300%; margin: 0; padding: 0; display: inline-block; }
h1 > img { float:left; margin: 0 5px 0 0; }
h2 { font-size: 275%; margin: 0; padding: 0; }
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Arquillian test run report</title>
<style type="text/css">
body { margin: 1em; padding: 0; }
h1 { font-size: 300%; margin: 0; padding: 0; display:inline; }
h1 > img { float:left; margin: 0 5px 0 0; display:inline-block;}
h2 { font-size: 275%; margin: 0; padding: 0; }
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Arquillian test run report</title>
<style type="text/css">
body { margin: 1em; padding: 0; }
h1 { font-size: 300%; margin: 0; padding: 0; display:inline; }
h1 > img { float:left; margin: 0 5px 0 0; }
h2 { font-size: 275%; margin: 0; padding: 0; }
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Arquillian test run report</title>
<style type="text/css">
body { margin: 1em; padding: 0; }
h1 { font-size: 300%; margin: 0; padding: 0; display:inline; }
h1 > img { float:left; margin: 0 5px 0 0; }
h2 { font-size: 275%; margin: 0; padding: 0; }
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Arquillian test run report</title>
<style type="text/css">
body { margin: 1em; padding: 0; }
h1 { font-size: 300%; margin: 0; padding: 0; display:inline; }
h1 > img { float:left; margin: 0 5px 0 0; }
h2 { font-size: 275%; margin: 0; padding: 0; }
/*
* JBoss, Home of Professional Open Source
* Copyright 2013, 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.
window.Graphene = window.Graphene || {};
window.Graphene.Page = window.Graphene.Page || {};
window.Graphene.Page.XHRHalter = (function() {
var STATE_CONSTRUCT = -3,
STATE_OPEN = -2,
STATE_SEND = -1,
STATE_UNITIALIZED = 0,