mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Task notes modals (#8521)
* Merged in develop * Show task notes modal on click * Began adding tests * Removed extra characters * Fixed lingering popup * Added markdown * Fixed line endings
This commit is contained in:
35
test/client-old/spec/directives/task.directive.js
Normal file
35
test/client-old/spec/directives/task.directive.js
Normal file
@@ -0,0 +1,35 @@
|
||||
describe('task Directive', () => {
|
||||
var compile, scope, directiveElem, $modal;
|
||||
|
||||
beforeEach(function(){
|
||||
module(function($provide) {
|
||||
$modal = {
|
||||
open: sandbox.spy(),
|
||||
};
|
||||
$provide.value('$modal', $modal);
|
||||
});
|
||||
|
||||
inject(function($compile, $rootScope, $templateCache) {
|
||||
compile = $compile;
|
||||
scope = $rootScope.$new();
|
||||
|
||||
$templateCache.put('templates/task.html', '<div>Task</div>');
|
||||
});
|
||||
|
||||
|
||||
directiveElem = getCompiledElement();
|
||||
});
|
||||
|
||||
function getCompiledElement(){
|
||||
var element = angular.element('<task></task>');
|
||||
var compiledElement = compile(element)(scope);
|
||||
scope.$digest();
|
||||
return compiledElement;
|
||||
}
|
||||
|
||||
xit('opens task note modal', () => {
|
||||
scope.showNoteDetails();
|
||||
|
||||
expect($modal.open).to.be.calledOnce;
|
||||
});
|
||||
})
|
||||
Reference in New Issue
Block a user