forked from bluesmoon/boomerang
-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f253d1b
commit a2acc34
Showing
38 changed files
with
305 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ tests/page-templates/12-react/support/app.js | |
*#* | ||
*~ | ||
.idea/ | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<%= header %> | ||
<%= boomerangSnippet %> | ||
<script type="text/javascript"> | ||
window.mainServer = "<%= mainServer %>"; | ||
window.secondaryServer = "<%= secondaryServer %>"; | ||
|
||
window.mainPort = (parseInt(window.location.port) || 4002); | ||
window.secondaryPort = (parseInt(window.location.port) || 4002) + 1; | ||
|
||
</script> | ||
<script src="11-local-domains.js" type="text/javascript"></script> | ||
|
||
<pre> Why is this test here? | ||
====================== | ||
|
||
Some tests require us to have a proper domain and port assigned and requesting resources from those domains+ports | ||
as this is the only way we can ensure a cookie is created and session details can be validated. | ||
|
||
In this set of tests we ensure that both the port and domain are setup as expected in our environment. | ||
</pre> | ||
|
||
<script type="text/javascript"> | ||
BOOMR_test.init({ | ||
testAfterOnBeacon: true | ||
}); | ||
</script> | ||
|
||
<%= footer %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/*eslint-env mocha*/ | ||
/*global BOOMR,BOOMR_test,describe,it*/ | ||
|
||
/* | ||
Why is this test here? | ||
====================== | ||
Some tests require us to have a proper domain and port assigned and requesting resources from those domains+ports | ||
as this is the only way we can ensure a cookie is created and session details can be validated. | ||
In this set of tests we ensure that both the port and domain are setup as expected in our environment. | ||
*/ | ||
|
||
describe("e2e/00-basic/11-local-domains", function() { | ||
var tf = BOOMR.plugins.TestFramework; | ||
var t = BOOMR_test; | ||
|
||
it("Should have successfully requested a resource from it's main server domain (--main-domain in grunt)", function(done){ | ||
var xhr1 = new XMLHttpRequest(); | ||
|
||
xhr1.open("GET", "http://" + window.mainServer + ":" + (window.mainPort) + "/pages/00-basic/support/generic.html"); | ||
xhr1.send(null); | ||
|
||
xhr1.addEventListener("load", function() { | ||
if (xhr1.readyState === XMLHttpRequest.DONE) { | ||
done(); | ||
} | ||
}); | ||
}); | ||
|
||
it("Should have successfully requested a resource from it's secondary server domain (--secondary-domain in grunt)", function(done){ | ||
var xhr2 = new XMLHttpRequest(); | ||
|
||
xhr2.open("GET", "http://" + window.secondaryServer + ":" + (window.secondaryPort) + "/pages/00-basic/support/generic.html"); | ||
xhr2.send(null); | ||
|
||
xhr2.addEventListener("load", function() { | ||
if (xhr2.readyState === XMLHttpRequest.DONE) { | ||
done(); | ||
} | ||
}); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.