describe("Core htmx Regression Tests", function(){
beforeEach(function() {
this.server = makeServer();
clearWorkArea();
});
afterEach(function() {
this.server.restore();
clearWorkArea();
});
it('SVGs process properly in IE11', function()
{
var btn = make('')
});
it ('Handles https://github.com/bigskysoftware/htmx/issues/4 properly', function() {
this.server.respondWith("GET", "/index2a.php",
"
I came from message oob swap I should be second
" +
"
I came from a message2 oob swap I should be third but I am in the wrong spot
" +
"I'm page2 content (non-swap) I should be first")
var h1 = make("
Kutty CLICK ME
" +
"" +
"" +
"")
h1.click();
this.server.respond();
htmx.find("#page2").innerHTML.should.equal("I'm page2 content (non-swap) I should be first")
htmx.find("#message").innerHTML.should.equal("I came from message oob swap I should be second")
htmx.find("#message2").innerHTML.should.equal("I came from a message2 oob swap I should be third but I am in the wrong spot")
});
it ('Handles https://github.com/bigskysoftware/htmx/issues/33 "empty values" properly', function() {
this.server.respondWith("POST", "/htmx.php", function (xhr) {
xhr.respond(200, {}, xhr.requestBody);
});
var form = make('')
form.click();
this.server.respond();
form.innerHTML.should.equal("variable=")
});
it ('name=id doesnt cause an error', function(){
this.server.respondWith("GET", "/test", "Foo")
var div = make('
Get It
')
div.click();
this.server.respond();
div.innerText.should.contain("Foo")
});
it ('empty id doesnt cause an error', function(){
this.server.respondWith("GET", "/test", "Foo\n")
var div = make('
Get It
')
div.click();
this.server.respond();
div.innerText.should.contain("Foo")
});
it ('id with dot in value doesnt cause an error', function(){
this.server.respondWith("GET", "/test", "Foo ");
var div = make('
Get It
');
div.click();
this.server.respond();
div.innerText.should.contain("Foo");
});
it ('@ symbol in attributes does not break requests', function(){
this.server.respondWith("GET", "/test", "