Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 35d91d7

Browse files
author
vikasrohit
committed
Fixed error in running badges-tooltip and toggle-password directives unit tests.
1 parent a285984 commit 35d91d7

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

app/directives/account/toggle-password/toggle-password.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* jshint -W117, -W030 */
2-
xdescribe('Toggle Password Directive', function() {
2+
describe('Toggle Password Directive', function() {
33
var scope;
44
var element;
55

app/directives/badges/badge-tooltip.spec.js

+15-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ describe('Badge Tooltip Directive', function() {
66
var spotlightChallenge = mockData.getMockSpotlightChallenges()[0];
77

88
beforeEach(function() {
9-
bard.appModule('tcUIComponents');
9+
bard.appModule('topcoder');
1010
bard.inject(this, '$compile', '$rootScope');
1111
scope = $rootScope.$new();
1212
});
1313

1414
bard.verifyNoOutstandingHttpRequests();
1515

16-
xdescribe('Badge Tooltip', function() {
16+
describe('Badge Tooltip', function() {
1717
var tooltip;
1818

1919
beforeEach(function() {
@@ -89,5 +89,18 @@ describe('Badge Tooltip Directive', function() {
8989
expect(dataDiv).not.to.null;
9090
expect(dataDiv.hasClass('ng-hide')).to.equal(true);
9191
});
92+
93+
it('should trigger mouseenter handler ', function() {
94+
tooltip.trigger('mouseenter');
95+
var tooltipElement = tooltip.children(0);
96+
expect(tooltipElement.css('z-index')).to.equal('2000');
97+
expect(tooltip.isolateScope().hide).to.equal(false);
98+
});
99+
100+
it('should trigger mouseleave handler ', function() {
101+
tooltip.trigger('mouseleave');
102+
tooltipElement = tooltip.children(0);
103+
expect(tooltip.isolateScope().hide).to.equal(true);
104+
});
92105
});
93106
});

0 commit comments

Comments
 (0)