Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
},
"devDependencies": {
"angular-mocks": "1.3.0 - 1.5.*",
"angular-ui-router": "^0.3.2"
"angular-ui-router": "1.0.0-beta.3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to update the devDependencies to the beta version. Is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, first of all we have to keep in mind that angular-ui-router is there only for the unit tests to run properly, since it's an optional runtime dependency. Given this, I updated it so we are sure that the refactored unit tests are passing properly since the refactor was indeed needed because of the breaking changes in 1.0.0.

In other words, 0.3.2 is perfectly fine and tests will pass with both version. Anyway I thought that testing against the newer version was safer. If you want me to remove it I'll do immediately 😄

Copy link
Member

@dtaylor113 dtaylor113 Dec 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk. It is a dev dependency, which to me seems like it could be cutting edge since it shouldn't effect production code. Just my 2 cents 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, I think that 1.0.0-beta should be api-compatible with what will be 1.0.0 release.

}
}
5 changes: 4 additions & 1 deletion src/navigation/examples/vertical-navigation-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
* <li>.tooltip - (string) Tooltip to display for the badge
* <li>.badgeClass: - (string) Additional class(es) to add to the badge container
* </ul>
* <li>.uiSref - (string) Optional Angular UI Router state name. If specified, href must be not defined, and vice versa.
* <li>.uiSrefOptions - (object) Optional object to be passed to Angular UI Router $state.go() function
* </ul>
* @param {function} navigateCallback function(item) Callback method invoked on a navigation item click (one with no submenus)
* @param {function} itemClickCallback function(item) Callback method invoked on an item click
Expand Down Expand Up @@ -121,7 +123,8 @@
{
title: "Dashboard",
iconClass: "fa fa-dashboard",
uiSref: "dashboard"
uiSref: "dashboard",
uiSrefOptions: { someKey: 'SomeValue' }
},
{
title: "Dolor",
Expand Down
10 changes: 6 additions & 4 deletions test/navigation/vertical-navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,11 +713,13 @@ describe('Directive: pfVerticalNavigation with ui.router', function () {
$stateProvider.state('state0', {
url: "/state0",
controller: 'Controller0',
controllerAs: 'vm'
controllerAs: 'vm',
template: '<!-- -->'
}).state('state1', {
url: "/state1",
controller: 'Controller1',
controllerAs: 'vm'
controllerAs: 'vm',
template: '<!-- -->'
});
});

Expand Down Expand Up @@ -756,7 +758,7 @@ describe('Directive: pfVerticalNavigation with ui.router', function () {
title: "Dashboard",
iconClass: "fa fa-dashboard",
uiSref: 'state1',
uiSrefOptions: 'testing'
uiSrefOptions: {name: "testing"}
},
{
title: "Dolor",
Expand Down Expand Up @@ -806,7 +808,7 @@ describe('Directive: pfVerticalNavigation with ui.router', function () {
// Click dashboard item
wellDefinedItem.click();

expect($state.go).toHaveBeenCalledWith('state1','testing');
expect($state.go).toHaveBeenCalledWith('state1',{name: "testing"});

// Checking successful state transition
expect($state.current.name).toBe("state1");
Expand Down