Skip to content

Commit

Permalink
Fix test.permalink.js
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 authored and erictheise committed Dec 31, 2023
1 parent 0cff3fc commit e2ab6fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test.permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ describe("ide.permalink", function () {
var q =
'<!--\nThis is an example Overpass query.\nTry it out by pressing the Run button above!\nYou can find more examples with the Load tool.\n-->\n<query type="node">\n <has-kv k="amenity" v="drinking_water"/>\n <bbox-query {{bbox}}/><!--this is auto-completed with the\n current map view coordinates.-->\n</query>\n<print/>';
var p = ide.compose_share_link(q, false, false, false);
expect(p).to.have.string(
"?Q=%3C!--%0AThis%20is%20an%20example%20Overpass%20query.%0ATry%20it%20out%20by%20pressing%20the%20Run%20button%20above!%0AYou%20can%20find%20more%20examples%20with%20the%20Load%20tool.%0A--%3E%0A%3Cquery%20type%3D%22node%22%3E%0A%20%20%3Chas-kv%20k%3D%22amenity%22%20v%3D%22drinking_water%22%2F%3E%0A%20%20%3Cbbox-query%20%7B%7Bbbox%7D%7D%2F%3E%3C!--this%20is%20auto-completed%20with%20the%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20current%20map%20view%20coordinates.--%3E%0A%3C%2Fquery%3E%0A%3Cprint%2F%3E"
expect(p).to.eql(
"?Q=%3C%21--%0AThis+is+an+example+Overpass+query.%0ATry+it+out+by+pressing+the+Run+button+above%21%0AYou+can+find+more+examples+with+the+Load+tool.%0A--%3E%0A%3Cquery+type%3D%22node%22%3E%0A++%3Chas-kv+k%3D%22amenity%22+v%3D%22drinking_water%22%2F%3E%0A++%3Cbbox-query+%7B%7Bbbox%7D%7D%2F%3E%3C%21--this+is+auto-completed+with+the%0A+++++++++++++++++++current+map+view+coordinates.--%3E%0A%3C%2Fquery%3E%0A%3Cprint%2F%3E"
);
expect(p).not.to.have.string("?q=");
expect(p).not.to.have.string("&C=");
Expand All @@ -20,7 +20,7 @@ describe("ide.permalink", function () {
'<!--\nThis is an example Overpass query.\nTry it out by pressing the Run button above!\nYou can find more examples with the Load tool.\n-->\n<query type="node">\n <has-kv k="amenity" v="drinking_water"/>\n <bbox-query {{bbox}}/><!--this is auto-completed with the\n current map view coordinates.-->\n</query>\n<print/>';
var p = ide.compose_share_link(q, true, false, false);
expect(p).not.to.have.string("?Q=");
expect(p).to.have.string(
expect(p).to.eql(
"?q=PCEtLQpUaGlzIMSHIGFuIGV4YW1wbGUgT3ZlcnBhc8SIcXXEmXkuxIRyecSJdCBvdcSoYsSmcHJlxJ1pbmcgdGjElVJ1xI1ixKt0b8SNYWJvxJghClnEqiBjxIwgZsSzZCBtb8SwxI7EkMSSxJTEiHdpxLfEtsS4IExvYcWQxL9vbMSjxII-CjzEn8ShxLZ5cGU9Im5vZGUixakgIDxoxJwta3Yga8WyxJFlbsWbeSIgdsWyZHLEs2vEs2dfd2F0xJkiL8W5xbtixYN4LcWsxKUge3vGnW94fX3GmsSAxILEt8SKxIphxKtvLWNvxZdlxpfFkMWaxZzEt2UKxbrHgMeBx4LHgmN1csSwbsSobWFwxotpZXfFim_Fk2TEs8aWxLEuxajFqi_GoXnFqTzEr8SzdMaa"
);
expect(p).not.to.have.string("&C=");
Expand All @@ -39,7 +39,7 @@ describe("ide.permalink", function () {
};
var p;
p = ide.compose_share_link(q, false, true, false);
expect(p).to.have.string("&C=12.3456;-65.4321;8");
expect(p).to.have.string("&C=12.3456%3B-65.4321%3B8");
expect(p).not.to.have.string("&c=");
p = ide.compose_share_link(q, true, true, false);
expect(p).not.to.have.string("&C=");
Expand Down

0 comments on commit e2ab6fb

Please sign in to comment.