Skip to content
Browse files

update changelog

  • Loading branch information...
1 parent 2d187ea commit 2114d1c0fbe8ce64767858add1d03c6405c1ef3a @podefr podefr committed Sep 7, 2013
Showing with 43 additions and 8 deletions.
  1. +37 −2 README.md
  2. +6 −6 specs/integration.spec.js
View
39 README.md
@@ -967,6 +967,29 @@ describe("Stack for stacking UI element, ordering and hiding/showing them", func
expect(parent.childNodes[1]).toBe(UI2);
expect(parent.childNodes[2]).toBe(UI3);
});
+
+ it("can transit between views", function () {
+ var stack = new Stack();
+ var parent = document.createElement("div");
+ var UI1 = document.createElement("span");
+ var UI2 = document.createElement("div");
+ var UI3 = document.createElement("ul");
+
+ stack.add(UI1);
+ stack.add(UI2);
+
+ stack.place(parent);
+
+ stack.hideAll();
+
+ stack.transit(UI1);
+
+ expect(parent.childNodes[0]).toBe(UI1);
+
+ stack.transit(UI2);
+
+ expect(parent.childNodes[0]).toBe(UI2);
+ });
});
```
@@ -988,6 +1011,19 @@ describe("LocationRouter is a router that watches hashmark changes and updates i
expect(spy).toHaveBeenCalledWith("66");
});
+ it("falls back to the route provided by default if no route is specified in the URL", function () {
+ var locationRouter = new LocationRouter();
+ var spy = jasmine.createSpy();
+
+ locationRouter.set("default", spy);
+
+ window.location.hash = "";
+
+ locationRouter.start("default");
+
+ expect(spy).toHaveBeenCalled();
+ });
+
it("updates the hashmark when navigating to routes", function () {
var locationRouter = new LocationRouter();
@@ -1039,7 +1075,6 @@ describe("LocationRouter is a router that watches hashmark changes and updates i
* [The todo application](http://flams.github.com/olives/todo/index.html) Available on [TodoMVC](http://todomvc.com)
* [Ideafy by Taiaut](http://www.taiaut.com/taiaut.com/index.php)
-* [Suggestions (Unavailable ATM)]()
## Changelog
@@ -1049,7 +1084,7 @@ describe("LocationRouter is a router that watches hashmark changes and updates i
* locationRouter can start at a default route
* Stack can also transit between two views by showing the new one and hiding the previously displayed
-###1.5.2 - 04 SEP 2013
+####1.5.2 - 04 SEP 2013
* Fix a bug in LocationRouter that caused the URL not to be updated while navigating
View
12 specs/integration.spec.js
@@ -824,7 +824,7 @@ function(OObject, Plugins, EventPlugin, BindPlugin, Store, DomUtils, PlacePlugin
it("can transit between views", function () {
var stack = new Stack();
var parent = document.createElement("div");
- var UI1 = document.createElement("span");
+ var UI1 = document.createElement("span");
var UI2 = document.createElement("div");
var UI3 = document.createElement("ul");
@@ -861,16 +861,16 @@ function(OObject, Plugins, EventPlugin, BindPlugin, Store, DomUtils, PlacePlugin
});
it("falls back to the route provided by default if no route is specified in the URL", function () {
- var locationRouter = new LocationRouter();
- var spy = jasmine.createSpy();
+ var locationRouter = new LocationRouter();
+ var spy = jasmine.createSpy();
locationRouter.set("default", spy);
- window.location.hash = "";
+ window.location.hash = "";
- locationRouter.start("default");
+ locationRouter.start("default");
- expect(spy).toHaveBeenCalled();
+ expect(spy).toHaveBeenCalled();
});
it("updates the hashmark when navigating to routes", function () {

0 comments on commit 2114d1c

Please sign in to comment.
Something went wrong with that request. Please try again.