Commit c478c61a authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Limpia restos y añade tests pendientes para Facets

parent f8166afd
Loading
Loading
Loading
Loading
+25 −1
Original line number Diff line number Diff line
@@ -52,7 +52,31 @@ define([

						assert.strictEqual(checked, true, 'El checkbox no se ha marcado tras pulsar el label');
					}).end();
			}
			},

			Should_CloseFacetsGroup_When_OpenedFacetsGroupTitleIsPressed: function() {

				// TODO
				assert.ok('TODO');
			},

			Should_OpenFacetsGroup_When_ClosedFacetsGroupTitleIsPressed: function() {

				// TODO
				assert.ok('TODO');
			},

			Should_ExpandFacetsGroup_When_FacetsGroupShowMoreIsPressed: function() {

				// TODO
				assert.ok('TODO');
			},

			Should_CollapseFacetsGroup_When_FacetsGroupShowLessIsPressed: function() {

				// TODO
				assert.ok('TODO');
			},
		}
	});
});
+37 −28
Original line number Diff line number Diff line
@@ -6,25 +6,7 @@ require([
	, FacetsImpl
) {

	var btn1Config = {
			zone: 'left',
			props: {
				'class': 'primary'
			}
		},
		btn2Config = {
			zone: 'center',
			props: {
				'class': 'success'
			}
		},
		btn3Config = {
			zone: 'right',
			props: {
				'class': 'warning'
			}
		},
		facets = new FacetsImpl({
	var facets = new FacetsImpl({
		parentChannel: 'test',
		aggs: {
			themeInspire: {
@@ -32,6 +14,12 @@ require([
				terms: {
					field: 'themeInspire.name'
				}
			},
			territorialScope: {
				open: false,
				terms: {
					field: 'scope.name'
				}
			}
		}
	});
@@ -46,6 +34,27 @@ require([
				key: 'Species distribution',
				doc_count: 1
			}]
		},
		'sterms#territorialScope': {
			buckets: [{
				key: '1',
				doc_count: 1
			},{
				key: '2',
				doc_count: 1
			},{
				key: '3',
				doc_count: 1
			},{
				key: '4',
				doc_count: 1
			},{
				key: '5',
				doc_count: 1
			},{
				key: '6',
				doc_count: 1
			}]
		}
	});
});