Keep extra query params when focusing on a spec or suite

[finish #29578495]
This commit is contained in:
slackersoft
2014-12-15 18:30:32 -08:00
parent fbe38018c9
commit 503f4b7f49
7 changed files with 56 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
describe("QueryString", function() {
describe("#setParam", function() {
describe("#navigateWithNewParam", function() {
it("sets the query string to include the given key/value pair", function() {
var windowLocation = {
search: ""
@@ -9,7 +9,7 @@ describe("QueryString", function() {
getWindowLocation: function() { return windowLocation }
});
queryString.setParam("foo", "bar baz");
queryString.navigateWithNewParam("foo", "bar baz");
expect(windowLocation.search).toMatch(/foo=bar%20baz/);
});
@@ -22,13 +22,29 @@ describe("QueryString", function() {
getWindowLocation: function() { return windowLocation }
});
queryString.setParam("baz", "quux");
queryString.navigateWithNewParam("baz", "quux");
expect(windowLocation.search).toMatch(/foo=bar/);
expect(windowLocation.search).toMatch(/baz=quux/);
});
});
describe('#fullStringWithNewParam', function() {
it("gets the query string including the given key/value pair", function() {
var windowLocation = {
search: "?foo=bar"
},
queryString = new j$.QueryString({
getWindowLocation: function() { return windowLocation }
});
var result = queryString.fullStringWithNewParam("baz", "quux");
expect(result).toMatch(/foo=bar/);
expect(result).toMatch(/baz=quux/);
});
});
describe("#getParam", function() {
it("returns the value of the requested key", function() {