<commit_before>describe("goDialogue.services", function(){
    beforeEach(module('goDialogue.services'));

    describe(".shapes", function(){
        describe(".circle", function(){
            it("should set the circle color", inject(function(shapes){
                var svg = angular.element('<svg width="100" height="100"></svg>');
                var circle = shapes.circle({color: '#eeeeee'});
                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'b',
                            r: 2,
                            name: 'Surname'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('.circle')).to.have.length(2);
                    expect(svg.find('.circle').eq(0).css('fill')).to.equal('#eeeeee');
                    expect(svg.find('.circle').eq(1).css('fill')).to.equal('#eeeeee');

                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: '<NAME>'
                        }, {
                        key: 'c',
                            r: 2,
                            name: '<NAME>'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('.circle')).to.have.length(2);
                    expect(svg.find('.circle').eq(0).css('fill')).to.equal('#eeeeee');
                    expect(svg.find('.circle').eq(1).css('fill')).to.equal('#eeeeee');
            }));

            it("should redraw text properly", inject(function(shapes){
                var svg = angular.element('<svg width="100" height="100"></svg>');
                var circle = shapes.circle({color: '#eeeeee'});
                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'b',
                            r: 2,
                            name: 'Surname'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('text')).to.have.length(2);
                    expect(svg.find('.circle').eq(0).find('Client name').text());
                    expect(svg.find('.circle').eq(1).find('Surname').text());

                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'c',
                            r: 2,
                            name: '<NAME>'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('text')).to.have.length(3);
                    expect(svg.find('.circle').eq(0).find('Client name').text());
                    expect(svg.find('.circle').eq(1).find('Bye Screen').text());

            }));
        });
    });<commit_msg>Fixed minor issues in the test<commit_after>describe("goDialogue.services", function(){
    beforeEach(module('goDialogue.services'));

    describe(".shapes", function(){
        describe(".circle", function(){
            it("should set the circle color", inject(function(shapes){
                var svg = angular.element('<svg width="100" height="100"></svg>');
                var circle = shapes.circle({color: '#eeeeee'});
                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'b',
                            r: 2,
                            name: 'Surname'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('.circle')).to.have.length(2);
                    expect(svg.find('.circle').eq(0).css('fill')).to.equal('#eeeeee');
                    expect(svg.find('.circle').eq(1).css('fill')).to.equal('#eeeeee');

                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'c',
                            r: 2,
                            name: '<NAME>'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('.circle')).to.have.length(2);
                    expect(svg.find('.circle').eq(0).css('fill')).to.equal('#eeeeee');
                    expect(svg.find('.circle').eq(1).css('fill')).to.equal('#eeeeee');
            }));

            it("should redraw text properly", inject(function(shapes){
                var svg = angular.element('<svg width="100" height="100"></svg>');
                var circle = shapes.circle({color: '#eeeeee'});
                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'b',
                            r: 2,
                            name: 'Surname'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('text')).to.have.length(2);
                    expect(svg.find('text').eq(0).text()).to.equal('Client name');
                    expect(svg.find('text').eq(1).text()).to.equal('Surname');

                d3.select(svg.get(0)).selectAll('.circle')
                    .data([{
                        key: 'a',
                            r: 3,
                            name: 'Client name'
                        }, {
                        key: 'c',
                            r: 2,
                            name: '<NAME>'
                        }], function(d){return d.key;})
                    .call(circle);

                    expect(svg.find('text')).to.have.length(3);
                    expect(svg.find('text').eq(0).text()).to.equal('Client name');
                    expect(svg.find('text').eq(2).text()).to.equal('Bye Screen');
            }));
        });
    });
{'fraction_non_alphanumeric': 0.16654319158393835, 'fraction_numerical': 0.01185360794191732, 'mean_word_length': 0.9982238010657194, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '7433402', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1640, 'n_words': 250}