Skip to content

Commit

Permalink
feat #1298 change test page amabuild check
Browse files Browse the repository at this point in the history
This fix modifies the way the test page checks if amadeus build has to be used or not.
Instead of analysing the request URL, a parameter is added ("amabuild").
close #1298
  • Loading branch information
lsimone committed Sep 17, 2014
1 parent b8b66ae commit 076aecf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/test.htm
Expand Up @@ -21,15 +21,14 @@

// serve dev files by default, unless stated otherwise in query string
var devFiles = (url.indexOf("dev=false") == -1);
// amadeus build is not used, unless stated otherwise in query string
var isAmaBuild = (url.indexOf("amabuild=true") != -1);

var atversion;
var versionMatch = url.match(/atversion\=(\d+\.\d+(\.|-)[0-9A-Z]+)/);
var isAmaBuild;
if (versionMatch) {
atversion = versionMatch[1];
isAmaBuild = (versionMatch[2] == "-");
} else {
isAmaBuild = !!(document.location.pathname.match(/\/aria\-templates(-\w+)?\/test\//));
if (isAmaBuild) {
atversion = "1.1-SNAPSHOT";
} else if (devFiles) {
Expand Down

0 comments on commit 076aecf

Please sign in to comment.