<commit_before>/*jshint node: true */
'use strict';

/*
* Name :  PagesListViewSpec.js
* Module : UnitTest
* Location : /frontend/test/unit/View
*
* History :
* Version       Date        Programmer                  Description
* =================================================================================================
* 0.1.0         2015-06-13  <NAME>   Add all attributes and all methods
*
* 0.0.1         2015-06-13  <NAME>   Initial code      
* =================================================================================================
*
*/

describe('PagesListView', function(){

	beforeEach(angular.mock.module('norris-nrti'));

	var element, scope;
	var PageFactory;

	beforeEach(inject(function($rootScope, $compile, $injector) {
    	scope = $rootScope.$new();
    	PageFactory = $injector.get('PageFactory');
    	var page1 = PageFactory.build(),
    		page2 = PageFactory.build(),
    		page3 = PageFactory.build();

    	scope.pagesList = [
    		{ 'id': 1, 'page' : page1 },
    		{ 'id': 2, 'page' : page2 },
    		{ 'id': 3, 'page' : page3 }
    	];

    	element = angular.element('<div id="pagesList">' + 
					'<ul>' +
						'<li ng-repeat="page in pagesList">' +
							'<a ng-href="#/page/{{$index}}"> {{ page.page.getName() }} </a>' +
							'<p> {{ page.page.getDescription() }} </p>' +
						'</li>' +
					'</ul>' +
			'</div>');

    	element = $compile(element)(scope);
    	scope.$apply();
    	console.log(element.html);

  	}));

  	describe('template', function() {
		it('works fine', function() {
			var elm = element.find('div');
			expect(elm.list.length).toBe(3);
		});
	});

});<commit_msg>some fixes<commit_after>/*jshint node: true */
'use strict';

/*
* Name :  PagesListViewSpec.js
* Module : UnitTest
* Location : /frontend/test/unit/View
*
* History :
* Version       Date        Programmer                  Description
* =================================================================================================
* 0.1.0         2015-06-13  <NAME>   Add all attributes and all methods
*
* 0.0.1         2015-06-13  <NAME>   Initial code      
* =================================================================================================
*
*/

describe('PagesListView', function(){

	beforeEach(angular.mock.module('norris-nrti'));

	var element, scope;
	var PageFactory;

	beforeEach(inject(function($rootScope, $compile, $injector) {
    	scope = $rootScope.$new();
    	PageFactory = $injector.get('PageFactory');
    	var page1 = PageFactory.build(),
    		page2 = PageFactory.build(),
    		page3 = PageFactory.build();

    	scope.pagesList = [
    		{ 'id': 1, 'page' : page1 },
    		{ 'id': 2, 'page' : page2 },
    		{ 'id': 3, 'page' : page3 }
    	];

    	element = angular.element('<div id="pagesList">' + 
					'<ul>' +
						'<li ng-repeat="page in pagesList">' +
							'<a ng-href="#/page/{{$index}}"> {{ page.page.getName() }} </a>' +
							'<p> {{ page.page.getDescription() }} </p>' +
						'</li>' +
					'</ul>' +
			'</div>');

    	element = $compile(element)(scope);
    	scope.$digest();

  	}));

  	describe('template', function() {
		it('works fine', function() {
			var elm = element.find('li');
			expect(elm.list.length).toBe(3);
		});
	});

});
{'fraction_non_alphanumeric': 0.29578331794398277, 'fraction_numerical': 0.019698368728839642, 'mean_word_length': 3.022277227722772, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2002025', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1018, 'n_words': 192}