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

Fixed error in running badges-tooltip and toggle-password directives unit tests. #667

Merged
merged 1 commit into from
Jan 18, 2016
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* jshint -W117, -W030 */
xdescribe('Toggle Password Directive', function() {
describe('Toggle Password Directive', function() {
var scope;
var element;

Expand Down
17 changes: 15 additions & 2 deletions app/directives/badges/badge-tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ describe('Badge Tooltip Directive', function() {
var spotlightChallenge = mockData.getMockSpotlightChallenges()[0];

beforeEach(function() {
bard.appModule('tcUIComponents');
bard.appModule('topcoder');
bard.inject(this, '$compile', '$rootScope');
scope = $rootScope.$new();
});

bard.verifyNoOutstandingHttpRequests();

xdescribe('Badge Tooltip', function() {
describe('Badge Tooltip', function() {
var tooltip;

beforeEach(function() {
Expand Down Expand Up @@ -89,5 +89,18 @@ describe('Badge Tooltip Directive', function() {
expect(dataDiv).not.to.null;
expect(dataDiv.hasClass('ng-hide')).to.equal(true);
});

it('should trigger mouseenter handler ', function() {
tooltip.trigger('mouseenter');
var tooltipElement = tooltip.children(0);
expect(tooltipElement.css('z-index')).to.equal('2000');
expect(tooltip.isolateScope().hide).to.equal(false);
});

it('should trigger mouseleave handler ', function() {
tooltip.trigger('mouseleave');
tooltipElement = tooltip.children(0);
expect(tooltip.isolateScope().hide).to.equal(true);
});
});
});